Hi Kan,
I have AES-256 key in the store (KEK), and I am trying to set 40 bytes wrap of a HMAC key (wrapped per rfc3394). sss_key_store_set_key() fails, and I have traced it down to...
in simw-top/hostlib/hostLib/se05x/src/se05x_tlv.c return value is calculated in a weird way:
smStatus_t se05x_DeCrypt(
struct Se05xSession *pSessionCtx, size_t cmd_cmacLen, uint8_t *rsp, size_t *rspLength, uint8_t hasle)
{
AX_UNUSED_ARG(cmd_cmacLen);
AX_UNUSED_ARG(hasle);
U16 rv = SM_NOT_OK;
if (*rspLength >= 2) {
rv = rsp[(*rspLength) - 2] << 8 | rsp[(*rspLength) - 1];
This function is called many times and usually rv = 0x9000 (SM_OK), but the failure happens with rv:
SM_ERR_COMMAND_NOT_ALLOWED = 0x6986, // Command not allowed - access denied based on object policy
I did not explicitly set any policy objects with AES-256 key (existing KEK) - nor do I have any policy object with the HMAC key I am trying to set. Could you please help me resolve this - the documents you provided yesterday do not ask for any policy with KEK...