Hi,
for quick evalution it would be fine to write and read binary files to/from SE050 (to get a whole chain of instructions manually run).
I can´t find any example program or ssscli command to do so.
Is there any program/ssscli command available? If not, could you provide one?
Hi @simon_ger ,
Actually there is an MW example for this function, and you may find it in the demo of "C:\se050_middleware\simw-top\demos\se05x\se05x_Delete_and_test_provision", the code is something as below:
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.
-------------------------------------------------------------------------------
@Kan_LiThanks!
Sorry, my first post was not very precise: I would like to have a example program which I can pass my own binary file to. E.g. like cmd-line parameter.
Is there any?
It would be fine to be able to "play" a whole chain of steps just by example programs (i.e. write data, gen keys, do signing, read, verify). So we could do the whole steps once manually for evaluation.
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.
-------------------------------------------------------------------------------