MBedTLS + PSA cannot connect because RSA is default on (v3.1.0 -> v3.1.1)

Hello

There has been an interesting braking change between SDK v3.1.0 -> v3.1.1. When using PSA (CONFIG_MBEDTLS_USE_PSA_CRYPTO=y) and a server with signature algorithm SHA384withECDSA, MbedTLS successfully connects to the server with v3.1.0. But when compiling exactly the same project with SDK v3.1.1, it doesn't, with the error message:

<err> mbedtls: WEST_TOPDIR/modules/crypto/mbedtls/library/ssl_tls.c:7959: mbedtls_x509_crt_parse_der() returned -14848 (-0x3a00)

Which is:

/** Elliptic curve is unsupported (only NIST curves are supported). */
#define MBEDTLS_ERR_PK_UNKNOWN_NAMED_CURVE -0x3A00

The only difference between those two builds is that, when building with v3.1.1, CONFIG_MBEDTLS_RSA_C=y is automatically turned on. When turning it off in prj.conf (CONFIG_MBEDTLS_RSA_C=n), it works again.

Am I missing something or there is a bug in PSA MbedTLS? As fas as I understand, adding RSA support (without taking anything away from elliptic curve), should be able to use both, no?

Regards
Lauri

Related