Hi,
For us to help you with this in the best possible way, please list the following information:
Regards,
Sigurd Hellesvik
It's SDK 2.5.2 on custom hardware. But we are using the Laird Pinnacle 100 module that has a 52840 paired with the Sierra Wireless modem. But we are using the Zephyr builtin mbedTLS library.
The cloud provider dug into this some and has the following comments;
-------------------------------------------------------------------------------------------------------
For some reason Azure don't send a certificate request when using a App Service hosted in docker in Azure. Our other endpoints is hosted using Azure function and the Microsoft Identity Provider intercept the call and do a rewrite of the header. That's why it works for device-dev.get-cloud.com and not auth.get-cloud.com.
The are two way of do a mTLS init connection.
1) The server ask for a certificate from the client (that's what Zephyr supports out of the box)
2) The client send the cert inside the handshake (that's what curl does).
------------------------------------------------------------------------------------------------
It seems to be related to an Azure issue;
https://github.com/MicrosoftDocs/azure-docs/issues/111230
Hopefully that sheds more light
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?
Randall said:Do you know anything about TLS 1.3 support in Zephyr?
You have triggered an automatic quote from my part:
I am not able to answer questions about our timeline. You can try to ask your local sales representative from Nordic Semiconductor for information about our timeline.
For adding the cert manually, here is some info that might help you do that:
"
I looked what happens when the TLS state machine enters the state MBEDTLS_SSL_CLIENT_CERTIFICATE
https://github.com/nrfconnect/sdk-mbedtls/blob/main/library/ssl_tls12_client.c#L3552
The mbedtls_ssl_write_certificate() function will skip sending client certificate if ssl->handshake->client_auth == 0
ssl->handshake->client_auth is only set if ServerHello contains a Certificate request here:
https://github.com/nrfconnect/sdk-mbedtls/blob/main/library/ssl_tls12_client.c#L2523
If the customer wants to hack a solution that always sends the client certificate without receiving a certificate request they can probably just set ssl->handshake->client_auth somewhere in the state machine.
"
Interesting suggestion. I tried several variants of overriding the client_auth flag. Unfortunately, it all resulted in a TLS handshake error.
Looking at the above it also appears to be using NRF_SECURITY with MBEDTLS_LIBRARY. I'm using MBEDTLS_BUILTIN. I don't know if that makes any difference.
Randall
I think that TLS code is the same for MBEDTLS NRF_SECURITY and MBEDTLS_BUILTIN. It is the underlying crypto drivers that are changed.
However, I am not 100% on that, so I suggest that you print or step through code or something like that to verify that the file is really used
I did, and the changes did attempt to write the certificate despite not receiving a request. But for some reason it still produced a TLS handshake error.
On the positive side, the cloud team has agreed to give me an alternate route to get certificate and key renewals. So I guess this ticket can be closed out.
I did, and the changes did attempt to write the certificate despite not receiving a request. But for some reason it still produced a TLS handshake error.
On the positive side, the cloud team has agreed to give me an alternate route to get certificate and key renewals. So I guess this ticket can be closed out.
Randall said:I did, and the changes did attempt to write the certificate despite not receiving a request. But for some reason it still produced a TLS handshake error.
To quote myself from talking to our developers:
"At the very least if the hack work that would be a good indication to them being correct about what goes wrong"
And especially when you are not able to make it work like that, I start to suspect that the handshake request really is not the cause here after all.
However, if you got a workaround for key renewal, that fixes your issue, and that is that.
Good luck onwards!