You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: I have observed if I create a char array as global variable and load the certificate into that char array then its working. If i create a char array inside the function its not working.
The text was updated successfully, but these errors were encountered:
Hi @rajvael
without seeing the code, it's hard to diagnose.
We are not planning to implement loading cert from file for now, but this could be an interesting contribution.
It seems that the cert data passed to the TrustedCerts option is not the same as the authentication fails. Can you check that the data you pass as option is exactly the same in both cases (from file or from code)?
Also regarding the difference in behavior when placing the cert data in the function vs. as a global variable, I suspect that as the data is passed by reference, you need it to persist beyond the scope of the function.
Hope this will help you solve the issue, and eventually send over a pull request for this.
I have created new crt file with the contents in cert.c file from azure-iot-sdk.
While initiating connection I have read the crt file and set the TrustedCerts option from the content in the crt file.
I am facing certificate validation error.
Error: ERR: server's cert didn't look good, X509_V_ERR = 20: error:00000014:lib(0):func(0):SSL lib
All the content in the cert.c are matching with the crt file but certificate validation fails.
Please let me know why this issue is occur?
Protocol : WebSocket over Amqp
Branch: 2016-11-17
Attached the crt file below ::
ca-certificates.crt.txt
Note: I have observed if I create a char array as global variable and load the certificate into that char array then its working. If i create a char array inside the function its not working.
The text was updated successfully, but these errors were encountered: