mirror of
https://github.com/3proxy/3proxy.git
synced 2025-02-23 10:35:40 +08:00
SSLPlugin compilation error if OpenSSL version doesn't support SNI
This commit is contained in:
parent
642b34e8d1
commit
ab702614d3
@ -216,11 +216,11 @@ SSL_CONN ssl_handshake_to_server(SOCKET s, char * hostname, SSL_CERT *server_cer
|
||||
ssl_conn_free(conn);
|
||||
return NULL;
|
||||
}
|
||||
#ifdef SSL_set_tlsext_host_name
|
||||
if(hostname && *hostname)SSL_set_tlsext_host_name(conn->ssl, hostname);
|
||||
#else
|
||||
if(hostname && *hostname) X509_VERIFY_PARAM_set1_host(SSL_get0_param(conn->ssl), hostname, 0);
|
||||
#endif
|
||||
#if OPENSSL_VERSION_NUMBER < 0x00908070L
|
||||
#error OpenSSL vv. below 0.9.8f are not supported
|
||||
#else
|
||||
if(hostname && *hostname)SSL_set_tlsext_host_name(conn->ssl, hostname);
|
||||
#endif
|
||||
err = SSL_connect(conn->ssl);
|
||||
if ( err == -1 ) {
|
||||
*errSSL = ERR_error_string(ERR_get_error(), errbuf);
|
||||
|
Loading…
Reference in New Issue
Block a user