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

    CONFIG_MBEDTLS_X509_LIBRARY=y

    depends on

    CONFIG_NORDIC_SECURITY_BACKEND=y
    CONFIG_MBEDTLS_CFG_FILE="config-tls-generic.h"

    and the compilation results in:

    get_target_property() called with non-existent target "platform_cc310".

    I build for nrf9160dk_nrf9160ns

    How can I setup prj.conf to get the mbedTLS X509 module?

    Why does the mbedTLS depends on CONFIG_NORDIC_SECURITY_BACKEND?

    mbedTLS is a standalone lib, why is this dependency?

    Here are my mbed config settings:

    # Generate keys
    CONFIG_MBEDTLS=y
    CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED=y
    CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y
    CONFIG_MBEDTLS_ENTROPY_ENABLED=y
    # Create certificate
    CONFIG_MBEDTLS_CFG_FILE="config-tls-generic.h"
    CONFIG_NORDIC_SECURITY_BACKEND=y
    # Why this depends on CONFIG_NORDIC_SECURITY_BACKEND??
    CONFIG_MBEDTLS_X509_LIBRARY=y
    

    Best regards,

    Árpád

Children
Related