diff options
author | Yu Shan <shanyu@google.com> | 2018-04-09 12:28:10 +0800 |
---|---|---|
committer | Ji Luo <ji.luo@nxp.com> | 2018-08-20 21:25:45 +0800 |
commit | 65955f553b3742f433d4d8d6e94f93bc8c6ee0fb (patch) | |
tree | b4bb75d6ded2fa25b39ea1abf9d0e9418b940063 /include | |
parent | 97999553068920d16a61e870d1b03c2b91de0c34 (diff) |
[iot] Support reading ATAP certificate UUID from keymaster
Add API and IPC calls to read the ATAP certificate UUID from keymaster.
Also rename const local variables to the standard convention.
This cherry-picked the CL 649562 from trusty/external/trusty.
Bug: 76211194
Change-Id: I98ab68180c3855e07884994dc20b879f0b59965d
Signed-off-by: Haoran.Wang <elven.wang@nxp.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/interface/keymaster/keymaster.h | 1 | ||||
-rw-r--r-- | include/trusty/keymaster.h | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/include/interface/keymaster/keymaster.h b/include/interface/keymaster/keymaster.h index fa60a1aeb59..7b18a64f365 100644 --- a/include/interface/keymaster/keymaster.h +++ b/include/interface/keymaster/keymaster.h @@ -61,6 +61,7 @@ enum keymaster_command { KM_ATAP_SET_CA_RESPONSE_BEGIN = (0x5000 << KEYMASTER_REQ_SHIFT), KM_ATAP_SET_CA_RESPONSE_UPDATE = (0x6000 << KEYMASTER_REQ_SHIFT), KM_ATAP_SET_CA_RESPONSE_FINISH = (0x7000 << KEYMASTER_REQ_SHIFT), + KM_ATAP_READ_UUID = (0x8000 << KEYMASTER_REQ_SHIFT), }; typedef enum { diff --git a/include/trusty/keymaster.h b/include/trusty/keymaster.h index e69527e0fa9..beb2ff9578f 100644 --- a/include/trusty/keymaster.h +++ b/include/trusty/keymaster.h @@ -108,4 +108,13 @@ int trusty_atap_get_ca_request(const uint8_t *operation_start, int trusty_atap_set_ca_response(const uint8_t *ca_response, uint32_t ca_response_size); +/* +* Reads the UUID from the certificate of the last provisioned attestation +* credentials as a c-string into |*uuid_p|. Caller takes ownership of +* |*uuid_p|. Returns one of trusty_err. +* +* @uuid_p: location of newly allocated UUID c-string +*/ +int trusty_atap_read_uuid_str(char **uuid_p); + #endif /* TRUSTY_KEYMASTER_H_ */ |