Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide example of mutual TLS implementation #56

Open
jjauzion opened this issue Jun 18, 2021 · 3 comments
Open

Provide example of mutual TLS implementation #56

jjauzion opened this issue Jun 18, 2021 · 3 comments
Labels
topic: documentation Related to documentation for the project type: enhancement Proposed improvement

Comments

@jjauzion
Copy link

jjauzion commented Jun 18, 2021

Hi, the broker I use (EMQx) is using mutual TLS, so I have to provide client certificates.

I didn't find a way in doing so so far with this lib.

I saw in the doc how to use SSL/TLS (extract below) but no indication on how I could pass certificate to the connection client.

// To connect with SSL/TLS:
// 1) Change WiFiClient to WiFiSSLClient.
// 2) Change port value from 1883 to 8883.
// 3) Change broker value to a server with a known SSL/TLS root certificate 
//    flashed in the WiFi module.

I tried using the SSLClient lib but with no success so far

Is mutual TLS possible ?

@Perceval62
Copy link

@jjauzion
Hi, I'm using this on a project I work on, and yes it works, if you pass in the WiFiSSLClient obj when it is time to instantiate your MqttClient obj.
Note: I'm using this setup but on a SAMD controller over Ethernet with my own certificates. You may want to see if you pass in your WiFiSSLClient obj at the right time or if it is properly initialised when you pass it in, good luck !

@SamShekhovtsov
Copy link

@Perceval62 hi. could you please provide some details or code samples how you accomplish this? I'm trying to connect to the mosquitto MQTT TLS broker (over SSL) using Arduino MKR WiFi 1010 microcontroller and I can't find a solution so far.

@Perceval62
Copy link

That snippet was quite some time ago and on a corporate repo that I no longer have access to :|
Can you send a snippet of your own code ?

@per1234 per1234 changed the title [QUESTION] mutual TLS implementation Provide example of mutual TLS implementation Aug 28, 2023
@per1234 per1234 added type: enhancement Proposed improvement topic: documentation Related to documentation for the project labels Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: documentation Related to documentation for the project type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

4 participants