MQTTs - disable hostname verification
Posted: Fri Jan 20, 2023 7:40 am
I'm currently working on MQTTs using ESP-IDF on eclipse with the ESP-IDF plugin. My goal is to adapt an existing c++ library made for POSIX to ESP32. The library currently uses PAHO and I want to replace it with the native esp32 MQTT library. And I'm currently trying the MQTTs example called ssl_mutual_auth.
For the broker, I have a test RabbitMQ and I am using self-signed certificates. Those certificates work well with the existing library using PAHO. But to make this work since it's a test installation without any hostname, just an IP and test self-signed certificate, I need to disable the hostname verification (verify that the certificate matches the given host name). Here is the documentation of that function in PAHOc++ :https://eclipse.github.io/paho.mqtt.c/M ... 2931f573ce
Right now it seems that the MQTT client (the esp32) does not accept to connect to the MQTT broker (rabbitMQ) due to this hostname verification.
Is it possible to disable this hostname verification the same way it is done in PAHO?
For the broker, I have a test RabbitMQ and I am using self-signed certificates. Those certificates work well with the existing library using PAHO. But to make this work since it's a test installation without any hostname, just an IP and test self-signed certificate, I need to disable the hostname verification (verify that the certificate matches the given host name). Here is the documentation of that function in PAHOc++ :https://eclipse.github.io/paho.mqtt.c/M ... 2931f573ce
Right now it seems that the MQTT client (the esp32) does not accept to connect to the MQTT broker (rabbitMQ) due to this hostname verification.
Is it possible to disable this hostname verification the same way it is done in PAHO?