Hello @simon_ger ,
WriteBinary is e.g. used in ssscli to store a certificate on the SE:
ssscli set cert [keyid] [cert]
on example se05x_InjectCertificate here sss_key_store_set_key is used with the type of an binary (kSSS_CipherType_Binary) which ends up writing it as binary as well:
LOG_I("Injecting ECC certificate at 0x%08X", ecc_object_id);
status =
sss_key_store_set_key(&pCtx->ks, &ecc_cert_object, ecc_cert, sizeof(ecc_cert), sizeof(ecc_cert) * 8, NULL, 0);
On example se05x_delete_and_test_provision the underlying API to write a binary is directly called:
sw_status = Se05x_API_WriteBinary(&pSession->s_ctx,
NULL,
kSE05x_AppletResID_UNIQUE_ID,
0,
(uint16_t)uidLen,
const_uid,
uidLen);
Hope that helps,
Have a great day,
Kan
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------