Trouble creating a create a certificate signing request on nrf5340 for BLE Mesh Certificate based provisioning.

So basically, I am have created a key pair using the Identity key generation example and exported the public key using Identity key usage example. Now i need to create a certificate signing request, so I am trying to follow the PSA Crypto example to do the same. But it is not building as I facing the following error:

<command-line>: fatal error: user-tls-conf.h: No such file or directory

please help me with the same

Parents Reply Children
  • After looking further I have noticed that when build files are generated the nrf-config.h file does not have MBEDTLS_USE_PSA_CRYPTO defined. I have tried creating a custom header file for mbedtls but I keep getting the error that no file or directory found. I would request you to ignore the previous comment. I have defined the MBEDTLS_USE_PSA_CRYPTO in the custom header that I have created and i need help to add it to the include path. PFA the zip file

    certificatesigningrequest.zip


    I have been able to define MBEDTLS_USE_PSA_CRYPTO by editing legacy_crypto_config.h.template file in the directory but my question still exists on how to add custom header files to include path

  • Hi there,

    Sigurd is currently out-of-office, but will return next week. 
    He will continue supporting you when he's back,

    regards

    Jared

  • Hi Utkarsh,

    Sigurd Hellesvik said:
    os.mbed.com/.../using-psa-enabled-mbed-tls.html

    Did you see this guide?
    How did it go?

    I am asking cause I just want to get the whole picture

  • Yes I followed this guide to write my code for generating CSR but it resulted in the following error: Implicit declaration of function : mbedtls_pk_setup_opaque. I further looked into it and found out that even after enabling CONFIG_MBEDTLS_USE_PSA_CRYPTO it was not defined in the nrf-config.h header file, so I defined it there. This led to the code building successfully but after flashing the code onto the board, the psa_generate_key() started failing with the error -134 which stands for PSA_ERROR_NOT_SUPPORTED.

    I further looked into why was this happening, and I found out that this happens whenever CONFIG_MBEDTLS_LEGACY_CRYPTO_C is enabled. But without enabling this my code doesn't build. 

    My problem is very similar to this and I know that there is a solution as that question was solved. Please help me in this regard

  • How about this?

    I will try to make a CSR sample myself.
    Then you can use that as a reference to check your project.
    It will take some time, but I got direct access to our crypto devs so I should be able to get all potential issues I have with this figured out pretty fast.
    Im guessing I will be done with such a sample next week.

    How does that sound to you?

Related