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
To help with this we need to understand how the endpoint is configured:
Does the endpoint use a trusted CA certificate? (this might be a different by OS, since Linux and Windows have different trust stores)
Which version of .NET are you using?
Can you run openssl s_client -connect 10.76.75.106:8883 and paste the results here? If you are using a custom CA, run the command with the parameter --CAfile
Flow and errors should be the same on Windows and Linux.
I understand the expectation, but MQTTnet is not implementing the TLS stack, it's based on .NET having different implementations per platform, and each platform might handle CA certificates differently.
I guess the callback is not triggered in Windows because the TLS stack fails before starting the certificate validation.
.NET 7 introduced a new API to validate the chain with a CAfile, since you are in .NET6 you might need to implement the validation by yourself. Here is an example (note it's not in main, and I'm pointing to a specific commit)
Describe the bug
Connect async via TLS is different on Windows and Linux.
Which component is your bug related to?
To Reproduce
Steps to reproduce the behavior:
Actual behavior
Windows:
Linux (Yocto v3.4):
Expected behavior
Flow and errors should be the same on Windows and Linux.
Code example
The text was updated successfully, but these errors were encountered: