mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-14 08:31:02 +00:00
Merge "tcptls: use TLS_client_method with OpenSSL 1.1"
This commit is contained in:
@@ -324,12 +324,16 @@ static int __ssl_setup(struct ast_tls_config *cfg, int client)
|
|||||||
cfg->ssl_ctx = SSL_CTX_new(SSLv3_client_method());
|
cfg->ssl_ctx = SSL_CTX_new(SSLv3_client_method());
|
||||||
} else
|
} else
|
||||||
#endif
|
#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)) {
|
if (ast_test_flag(&cfg->flags, AST_SSL_TLSV1_CLIENT)) {
|
||||||
cfg->ssl_ctx = SSL_CTX_new(TLSv1_client_method());
|
cfg->ssl_ctx = SSL_CTX_new(TLSv1_client_method());
|
||||||
} else {
|
} else {
|
||||||
disable_ssl = 1;
|
disable_ssl = 1;
|
||||||
cfg->ssl_ctx = SSL_CTX_new(SSLv23_client_method());
|
cfg->ssl_ctx = SSL_CTX_new(SSLv23_client_method());
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
disable_ssl = 1;
|
disable_ssl = 1;
|
||||||
cfg->ssl_ctx = SSL_CTX_new(SSLv23_server_method());
|
cfg->ssl_ctx = SSL_CTX_new(SSLv23_server_method());
|
||||||
|
Reference in New Issue
Block a user