MQTTnet
MQTTnet copied to clipboard
Is there a sample code that utilizes TLS and can connect to AWS?
Describe your question
I have been trying to set up MQTTNet to work with .pfx files as well as .crt files.
I have set up mosquitto to use TLS 1.3 and it seamlessly works with the test sub and test pub commands (please note that the test clients do not support .pfx files) with some mock certificates I made (ca, client, server)
I am able to both publish and subscribe to the broker.
I saw that in order to connect to the AWS, I need to have the .crt of the root (have it and works) as well as the .pfx certificate (got it, generated via openssl).
Is there a clean, concrete and consise way (eg snippet) in order to establish connection to the local broker?
I am trying locally since I want to mock the environment as close to production as possible.
Which project is your question related to?
- ManagedClient
- Generic
any news on this ?
not sure about AWS, but you can look at this sample https://github.com/Azure-Samples/MqttApplicationSamples/tree/main/scenarios/getting_started#fly-configure-mosquitto showing to connect to Mosquitto using a CAFile (the .crt) and a client certificate (pfx, or pem+key)