mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-09-26 03:43:47 +08:00
Fix use of MOSQ_OPT_SSL_CTX when used with MOSQ_OPT_SSL_CTX_DEFAULTS
Closes #2463. Thanks to Tim Nordell.
This commit is contained in:
+1
-1
@@ -661,8 +661,8 @@ static int net__init_ssl_ctx(struct mosquitto *mosq)
|
||||
* has not been set, or if both of MOSQ_OPT_SSL_CTX and
|
||||
* MOSQ_OPT_SSL_CTX_WITH_DEFAULTS are set. */
|
||||
if(mosq->tls_cafile || mosq->tls_capath || mosq->tls_psk || mosq->tls_use_os_certs){
|
||||
net__init_tls();
|
||||
if(!mosq->ssl_ctx){
|
||||
net__init_tls();
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
mosq->ssl_ctx = SSL_CTX_new(SSLv23_client_method());
|
||||
|
||||
Reference in New Issue
Block a user