The person that posted the issue on the Azure github seems to think it's a bug. I guess Microsoft doesn't agree as they haven't done anything to address it. So if there is a way to get Zephyr to offer up the certificate on it's own, that would be great. If not, I may be stuck unless the cloud provider offers me an alternate way to renew keys.
Thanks,
I think first, it would be good to have a closer look into this, maybe we can get some new info.
Can you get a wireshark sniffer log from the error you get?
Do you get UART logs from the device when it fails?
Try to turn on mbedlts logging and see if you get more info then.
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED=yCONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED=yCONFIG_MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED=yCONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED=yCONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED=yCONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED=yCONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED=yCONFIG_MBEDTLS_KEY_EXCHANGE_PSK_ENABLED=yCONFIG_MBEDTLS_KEY_EXCHANGE_RSA_ENABLED=yCONFIG_MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED=y
I see that you have enabled 10 options while CONFIG_MBEDTLS_KEY_EXCHANGE_ALL_ENABLED selects 11. Off-chance, but maybe you are missing the last one?
The only one missing is ECJPAKE. Doubted that key juggling is something that Microsoft is doing but I tried it anyway. And it still doesn't work. I can't really do wireshark since I'm using a cell modem. The cloud team did with a Linux-based Zephyr setup and it basically shows that the certificate isn't being sent to the authorization server. I tried to enable MBEDTLS debugging, but the level keeps getting set to 0. I tried to hard wire it with CONFIG_MBEDTLS_DEBUG_LEVEL but I didn't get any debug and looking it autoconf.h it's still set to 0. So something in the build is hard wiring it to 0 and I don't know what it is.
Try CONFIG_MBEDTLS_DEBUG?
One has to set CONFIG_MBEDTLS_DEBUG to y before setting the debug level will not trigger an error. So yes, I've already set that config to y.
Do you know anything about TLS 1.3 support in Zephyr?