Generate CSR inside SE050

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Generate CSR inside SE050

747 Views
jb2
Contributor III

Hello,

I use SE050 MW in C on a esp32.

I can generate a key pair with sss_key function but I don't find any function to generate and sign the CSR.

I don't want to put private key out the SE050 and use mbedtls.

Thank you 

0 Kudos
5 Replies

715 Views
jb2
Contributor III

This example is for self-signed certificate. Do you have the same to create a Certificate Signing Request ?

Thank you

0 Kudos

697 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @jb2 ,

 

So far we don't have such kind of demo available, but which openssl/mbedtls version are you using? We may try to create a generic example code based on that.

 

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.
-------------------------------------------------------------------------------

0 Kudos

687 Views
jb2
Contributor III

I used mbedtls functions and I succeed to create my CSR.

I used the mbedtls example https://github.com/Mbed-TLS/mbedtls/blob/development/programs/x509/cert_req.c and I modified the file `x509write_csr.c` to use my function instead of `mbedtls_pk_sign`.

But I juste saw that `mbedtls_pk_sign_restartable( ctx, ...` use `ctx->pk_info->sign_func(...` so I think that it's cleaner to change this variable. I'll try.

0 Kudos

681 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @jb2 ,

 

Great to know that! Please kindly let me know if you have any further questions.

 

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.
-------------------------------------------------------------------------------

0 Kudos

720 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @jb2 ,

 

We have a demo on this topic, please kindly refer to simw- top/doc/demos/se05x/certificate_demo/Readme.html for details, and the source code may be found in simw-top\demos\se05x\certificate_demo .

 

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.
-------------------------------------------------------------------------------

0 Kudos