|mosquitto_connect returns success with failing TLS connection [message #1820949]
||Mon, 03 February 2020 07:56
| Götz Friedrich
Registered: January 2020
we are using mosquitto-1.6.3 and in our project we need to establish a TLS connection from our client to the broker.
We use mosquitto_tls_set() to configure a cafile and finally call mosquitto_connect().
In case the cafile is valid all works fine.
But now the cafile got invalid and finally the TLS connection could not be established, failing with:
"[level 8] 'OpenSSL Error: error:14090086:SSL routines:ssl3_get_server_certificate:ce..."
Still the mosquitto_connect() call returns still MOSQ_ERR_SUCCESS, indicating NO failure.
How can we, from application point of view, know the connection was not established?
Is waiting for some time and verify the configured connectCallback function (set via mosquitto_connect_callback_set()) is not called the only way?
SSL directly reports an error, but with that solution we need to wait for a difficult to define timeout.
-Best regards, Götz-
Powered by FUDForum
. Page generated in 0.01410 seconds