@ -458,6 +458,7 @@ static int net__init_ssl_ctx(struct mosquitto *mosq)
}
if(mosq->tls_cafile || mosq->tls_capath || mosq->tls_psk){
if(!mosq->ssl_ctx){
#if OPENSSL_VERSION_NUMBER < 0x10100000L
mosq->ssl_ctx = SSL_CTX_new(SSLv23_client_method());
#else
@ -470,6 +471,7 @@ static int net__init_ssl_ctx(struct mosquitto *mosq)
net__print_ssl_error(mosq);
return MOSQ_ERR_TLS;
if(!mosq->tls_version){
SSL_CTX_set_options(mosq->ssl_ctx, SSL_OP_NO_SSLv3);