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
  • Hi,

    the PSA Crypto example

    Which sample specifically?

    Also, which SDK version are you using?

    Regards,
    Sigurd Hellesvik

  • https://docs.zephyrproject.org/latest/samples/tfm_integration/psa_crypto/README.html
    Link to the sample I am following 
    and the SDK is 2.6,

    Also, can identity key be used for asymmetric encryption?

  • Hi, I have tried using the newer patch but it isnt working for me. This is the error that I get

    [2/228] Generating include/generated/version.h
    -- Zephyr version: 3.5.99 (C:/ncs/v2.6.1/zephyr), build: v3.5.99-ncs1-1
    [8/228] Building C object modules/nrf/subsys/nrf_security/src/CMakeFiles/mbedcrypto_base.dir/C_/ncs/v2.6.1/modules/crypto/mbedtls/library/base64.c.obj
    FAILED: modules/nrf/subsys/nrf_security/src/CMakeFiles/mbedcrypto_base.dir/C_/ncs/v2.6.1/modules/crypto/mbedtls/library/base64.c.obj 
    C:\ncs\toolchains\cf2149caf2\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DMBEDTLS_CONFIG_FILE=\"nrf-config.h\" -DMBEDTLS_PSA_CRYPTO_CONFIG_FILE=\"nrf-psa-crypto-want-config.h\" -DMBEDTLS_PSA_CRYPTO_USER_CONFIG_FILE=\"nrf-psa-crypto-config.h\" -DNRF5340_XXAA_APPLICATION -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DPICOLIBC_LONG_LONG_PRINTF_SCANF -D_FORTIFY_SOURCE=1 -D_POSIX_C_SOURCE=200809 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/ncs/v2.6.1/zephyr/include -IC:/Users/Dell/Nordic_Projects/csr_ecdsa/build_1/zephyr/include/generated -IC:/ncs/v2.6.1/zephyr/soc/arm/nordic_nrf/nrf53 -IC:/ncs/v2.6.1/zephyr/lib/libc/common/include -IC:/ncs/v2.6.1/zephyr/soc/common/nordic_nrf/. -IC:/ncs/v2.6.1/zephyr/soc/arm/nordic_nrf/common/. -IC:/ncs/v2.6.1/nrf/include -IC:/ncs/v2.6.1/nrfxlib/crypto/nrf_cc312_mbedcrypto/include -IC:/ncs/v2.6.1/nrfxlib/crypto/nrf_cc312_mbedcrypto/include/mbedtls -IC:/ncs/v2.6.1/nrf/tests/include -IC:/ncs/v2.6.1/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.6.1/zephyr/modules/cmsis/. -IC:/ncs/v2.6.1/modules/hal/nordic/nrfx -IC:/ncs/v2.6.1/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.6.1/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.6.1/zephyr/modules/hal_nordic/nrfx/. -IC:/ncs/v2.6.1/nrfxlib/crypto/nrf_cc312_platform/include -IC:/Users/Dell/Nordic_Projects/csr_ecdsa/build_1/modules/nrf/subsys/nrf_security/src/include/generated -IC:/ncs/v2.6.1/nrf/subsys/nrf_security/include -IC:/ncs/v2.6.1/nrf/ext/oberon/psa/core/include -IC:/ncs/v2.6.1/nrf/ext/oberon/psa/core/library -IC:/ncs/v2.6.1/modules/crypto/mbedtls/include -IC:/ncs/v2.6.1/modules/crypto/mbedtls/library -IC:/ncs/v2.6.1/nrf/subsys/nrf_security/src/drivers/nrf_cc3xx/include -fno-strict-aliasing -Os -imacros C:/Users/Dell/Nordic_Projects/csr_ecdsa/build_1/zephyr/include/generated/autoconf.h -fno-printf-return-value -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee -mtp=soft --sysroot=C:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.6.1/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=C:/Users/Dell/Nordic_Projects/csr_ecdsa=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.6.1/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.6.1=WEST_TOPDIR -ffunction-sections -fdata-sections --specs=picolibc.specs -std=c99 -MD -MT modules/nrf/subsys/nrf_security/src/CMakeFiles/mbedcrypto_base.dir/C_/ncs/v2.6.1/modules/crypto/mbedtls/library/base64.c.obj -MF modules\nrf\subsys\nrf_security\src\CMakeFiles\mbedcrypto_base.dir\C_\ncs\v2.6.1\modules\crypto\mbedtls\library\base64.c.obj.d -o modules/nrf/subsys/nrf_security/src/CMakeFiles/mbedcrypto_base.dir/C_/ncs/v2.6.1/modules/crypto/mbedtls/library/base64.c.obj -c C:/ncs/v2.6.1/modules/crypto/mbedtls/library/base64.c
    C:/ncs/v2.6.1/modules/crypto/mbedtls/library/base64.c: In function 'mbedtls_base64_encode':
    C:/ncs/v2.6.1/modules/crypto/mbedtls/library/base64.c:77:16: error: 'MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL' undeclared (first use in this function); did you mean 'MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL'?
       77 |         return MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL;
          |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL
    C:/ncs/v2.6.1/modules/crypto/mbedtls/library/base64.c:77:16: note: each undeclared identifier is reported only once for each function it appears in
    C:/ncs/v2.6.1/modules/crypto/mbedtls/library/base64.c: In function 'mbedtls_base64_decode':
    C:/ncs/v2.6.1/modules/crypto/mbedtls/library/base64.c:164:20: error: 'MBEDTLS_ERR_BASE64_INVALID_CHARACTER' undeclared (first use in this function); did you mean 'MBEDTLS_ERR_MPI_INVALID_CHARACTER'?
      164 |             return MBEDTLS_ERR_BASE64_INVALID_CHARACTER;
          |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                    MBEDTLS_ERR_MPI_INVALID_CHARACTER
    C:/ncs/v2.6.1/modules/crypto/mbedtls/library/base64.c:200:16: error: 'MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL' undeclared (first use in this function); did you mean 'MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL'?
      200 |         return MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL;
          |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL
    [21/228] Building C object modules/nrf/subsys/nrf_security/src/CMakeFiles/mbedcrypto_base.dir/C_/ncs/v2.6.1/modules/crypto/mbedtls/library/bignum.c.obj
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\cf2149caf2\opt\bin\cmake.EXE' --build 'c:\Users\Dell\Nordic_Projects\csr_ecdsa\build_1'
    
     *  The terminal process terminated with exit code: 1. 
     *  Terminal will be reused by tasks, press any key to close it.

  • Also it is breaking my other codes with the error:

    #error "MBEDTLS_PEM_WRITE_C defined, but not all prerequisites"
Reply Children
Related