The KM_PwdData structure keeps an authentication data needed to access
an item on the TA side. As such it should only be transferred from
key-manager to the TA.
Expecting such structure in an output buffer of the TA command
execution is a programmer error. It is now dealt with accordingly.
Change-Id: I209957a05700052eefc694d82b881c8aae96abb5
#include <string.h>
+#include <cassert>
+
#include <generic-backend/crypto-params.h>
namespace CKM {
return KM_SerializePwdData(buffer, size_guard, const_cast<KM_PwdData*>(&m_data));
}
-int TZSerializablePwdData::Deserialize(void **buffer, uint32_t *size_guard)
+int TZSerializablePwdData::Deserialize(void **, uint32_t *)
{
- return KM_DeserializePwdData(buffer, size_guard, &m_data);
+ // Key manager should not receive any password data from the TA
+ assert(false);
+ return -1;
}
// TZSerializableFlag