I have an embedded device, using mBedTLS, trying to open a connection to https://www.cloudflare.com and is failing with:
#define MBEDTLS_ERR_PK_UNKNOWN_NAMED_CURVE -0x3A00 /**< Elliptic curve is unsupported (only NIST curves are supported). */
Due to hardware constraints, the device only supports the following curves:
MBEDTLS_ECP_DP_SECP192R1 MBEDTLS_ECP_DP_SECP224R1 MBEDTLS_ECP_DP_SECP256R1
And has the following TLS extensions enabled:
Supported Elliptic Curves Supported Point Formats
Looking at the cloudflare.com certificates: https://www.ssllabs.com/ssltest/analyze.html?d=www.cloudflare.com&s=126.96.36.199
I can see cloudflare.com supports both and RSA and ECDSA certificates.
The ECDSA server certificate uses a 256 bit EC key but the issuer of that cert uses a 384 bit EC key.
This is what is causing the device to fail. The device is not able to validate the 384 bit cert in the chain.
So, is this an issue with cloudflare.com? Should the server see that the client does not support all the curves in its certificate chain and revert to the RSA certs instead?
i.e. The device provides a list of curves it supports, yet the server returns a cert chain with a non-supported EC in the chain. Is the server expected to review the 'Supported Elliptic Curves' TLS extension provided by the client any only return the cert chain if all the curves are supported?
Any insight is appreciated.