This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF91 How is it possible to generate EC 256 key pair and a self-signed X.509 certificate?

Hi,
I want to connect to Google Cloud IoT and for that I would like to generate the needed credentials on the nRF9160.
I need these ones, but the private key should be both in PEM and in DER format.
PEM is needed by the modem and DER is used by jwt_sign.
With kind regards,
Árpád
Parents Reply
  • Hi Einar,

    thank you for your answer!

    to mbedTLS configuration:

    It's really much easier to configure mbedTLS directly by an mbedTLS config file then through the predefined Zephyr config symbols. The only tricky part was having that file within my project.

    But this prj.conf snippets does it:

    # Generate credentials
    CONFIG_MBEDTLS=y
    # Configure mbedTLS directly with its configuration file instead through Zephyr config symbols
    # Relative from ncs/modules/crypto/mbedtls/configs/config-tls-generic.h
    CONFIG_MBEDTLS_CFG_FILE="../../../../MY-PROJECT/config-tls.h"
    
     

    Writing the config file is easy: all the missing mbedTLS config definitions are checked by mbedTLS itself

    during compilation or in case of a link error it's easy to find by the guard macro name.

    to the secure service causing crash:

    later.

    Best regards,

    Árpád

Children
No Data
Related