Fix openssl version issue
This commit is contained in:
@@ -752,7 +752,11 @@ static int _dns_client_server_add(char *server_ip, char *server_host, int port,
|
||||
|
||||
/* if server type is TLS, create ssl context */
|
||||
if (server_type == DNS_SERVER_TLS || server_type == DNS_SERVER_HTTPS) {
|
||||
#if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
|
||||
server_info->ssl_ctx = SSL_CTX_new(TLS_client_method());
|
||||
#else
|
||||
server_info->ssl_ctx = SSL_CTX_new(SSLv23_client_method());
|
||||
#endif
|
||||
if (server_info->ssl_ctx == NULL) {
|
||||
tlog(TLOG_ERROR, "init ssl failed.");
|
||||
goto errout;
|
||||
|
||||
Reference in New Issue
Block a user