Hi belussi,
We have an example of doing certificate generation here: https://github.com/wolfSSL/wolfssl-exam … gen/test.c
You would simply modify the section on lines 97 - 114 (https://github.com/wolfSSL/wolfssl-exam … test.c#L97)
/*---------------------------------------------------------------------------*/
/* Generate new ecc key */
/*---------------------------------------------------------------------------*/
printf("initializing the rng\n");
ret = wc_InitRng(&rng);
if (ret != 0) goto fail;
printf("Generating a new ecc key\n");
ret = wc_ecc_init(&newKey);
if (ret != 0) goto fail;
ret = wc_ecc_make_key(&rng, 32, &newKey);
if (ret != 0) goto fail;
printf("Successfully created new ecc key\n\n");
/*---------------------------------------------------------------------------*/
/* END */
/*---------------------------------------------------------------------------*/
To use the ECC key provided by the ATECC508A module instead of creating a new one with the software, retrieve it from the hardware.
I tried to provide "step-by-step" comments to make it easy to understand the flow of what is happening in the certificate generation example but if you have any questions please let me know.
Warm Regards,
Kaleb