arduino / WiFi101-FirmwareUpdater-Plugin

WiFi101 Firmware Updater Tool for Arduino IDE
13 stars 23 forks source link

Self-signed certificates fail #22

Closed gjt211 closed 5 years ago

gjt211 commented 5 years ago

I have been trying to get a self-signed certificate to work but it will never connect. My scenario: Remote (bare metal) CentOS server running SSL secured Mosquitto with a self signed certificate. Additional non-SSL Mosquitto port created for testing. I can connect with the non-SSL port fine using WiFiClient. I can't connect to the SSL port using WiFiSSLClient.

I have tried three options for uploading certificates.

  1. This updater from within the Arduino IDE and entering my server/port in the certificates section. It says everything is fine and gets the cert and uploads it without errors.
  2. Using the command line version uploading the PEM certificate.
  3. Same as number two but using a CER converted from the PEM. None allow me to connect.

My PEM certificate works OK from within other MQTT clients such as MqttFX.

I vaguely recall through my several days of searching that self signed certs don't work and something in some file need to be changed. (Sorry, something and some file is not helpful but I can't remember the file or location as I could not find it) I am using MacOS.

Any help appreciated.

gjt211 commented 5 years ago

Ok, after lots of playing and trying as many variations as possible, it is now working. In the end, I had to upload both the original self signed PEM root certificate and the CER converted one using the command line tool.