diff options
author | zuul <zuul@gerrit.asterisk.org> | 2017-02-14 12:41:06 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2017-02-14 12:41:06 -0600 |
commit | 2f0a036e4b56dfdd67f80b1f1023e2273d73015e (patch) | |
tree | 00a3bee265012d454059d5a60ebad6538ae32d92 /main | |
parent | d4f512e7d9de7593ed5cf6f84038879ade53c222 (diff) | |
parent | bc041ca14afb6b5c786955a03c331dc45924ca92 (diff) |
Merge "tcptls: use TLS_client_method with OpenSSL 1.1"
Diffstat (limited to 'main')
-rw-r--r-- | main/tcptls.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/main/tcptls.c b/main/tcptls.c index b20e04ef8..7f1421db8 100644 --- a/main/tcptls.c +++ b/main/tcptls.c @@ -324,12 +324,16 @@ static int __ssl_setup(struct ast_tls_config *cfg, int client) cfg->ssl_ctx = SSL_CTX_new(SSLv3_client_method()); } else #endif +#if defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x10100000L) + cfg->ssl_ctx = SSL_CTX_new(TLS_client_method()); +#else if (ast_test_flag(&cfg->flags, AST_SSL_TLSV1_CLIENT)) { cfg->ssl_ctx = SSL_CTX_new(TLSv1_client_method()); } else { disable_ssl = 1; cfg->ssl_ctx = SSL_CTX_new(SSLv23_client_method()); } +#endif } else { disable_ssl = 1; cfg->ssl_ctx = SSL_CTX_new(SSLv23_server_method()); |