Merge "tcptls: Use new certificate upon sip reload"
[asterisk/asterisk.git] / main / tcptls.c
index fce1558..b20e04e 100644 (file)
@@ -312,7 +312,7 @@ static int __ssl_setup(struct ast_tls_config *cfg, int client)
        }
 
        if (client) {
-#ifndef OPENSSL_NO_SSL2
+#if !defined(OPENSSL_NO_SSL2) && (OPENSSL_VERSION_NUMBER < 0x10100000L)
                if (ast_test_flag(&cfg->flags, AST_SSL_SSLV2_CLIENT)) {
                        ast_log(LOG_WARNING, "Usage of SSLv2 is discouraged due to known vulnerabilities. Please use 'tlsv1' or leave the TLS method unspecified!\n");
                        cfg->ssl_ctx = SSL_CTX_new(SSLv2_client_method());