MQTTnet icon indicating copy to clipboard operation
MQTTnet copied to clipboard

Is there a sample code that utilizes TLS and can connect to AWS?

Open xyderos opened this issue 1 year ago • 2 comments

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

xyderos avatar Nov 24 '23 09:11 xyderos

any news on this ?

CedreLo avatar Dec 07 '23 14:12 CedreLo

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)

rido-min avatar Dec 07 '23 15:12 rido-min