Comments (3)
Hi @Basko-Dev
Thanks for describing your issue.
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.
from mqttnet.
Hi @rido-min,
ad1. my MQTT broker uses self-signed CA certificate.
ad2. .NETCore 6.0.27
ad3. See the attached logs:
openssl s_client -connect broker_ip:8883 --CAfile cacert-v3.crt
: s_client_with_cafile.txt
openssl s_client -connect broker_ip:8883
: s_client_without_cafile.txt
from mqttnet.
.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)
from mqttnet.
Related Issues (20)
- Unable to connect with Unix Socket HOT 4
- Last Will not working? HOT 2
- [FR] Protobuf HOT 4
- PublishAsync doesn't return a result nor exception HOT 4
- Linux - when Upgrading from version 4.3.3.952 to 4.3.4.1084 the client always raises the exception «None of the discovered or specified addresses match the socket address family» HOT 7
- Restore messages per client/subscription HOT 2
- No connection could be made because the target machine actively refused it. HOT 1
- Breaking Change in MqttClientTcpOptions with 4.3.5.1141 HOT 5
- Managed MQTT client hangs when trying to disconnect using `StopAsync()` in Unity Engine HOT 5
- UWP PublishAsync forever hangs
- Event when pending ApplicationMessage was published HOT 1
- MqttClientOptionsBuilder.WithTcpServer:The “_remoteEndPoint” is missing instantiation
- Json serialized messages wont get published to the broker. HOT 3
- Connecting To localhost...Could not open connection to the host, on port 1883: Connect failed HOT 2
- The type or namespace name 'Options' does not exist in the namespace 'MQTTnet.Client' (are you missing an assembly reference?) HOT 6
- Issue in MQTTnet version 4.3.6.1152 HOT 1
- WebSocket connection to 'ws://127.0.0.1:10086/' failed: HOT 1
- Does this support client TLS-PSK? HOT 1
- Server How to start multiple ports? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mqttnet.