mirror of
https://github.com/3proxy/3proxy.git
synced 2025-02-23 18:45: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);
|
ssl_conn_free(conn);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
#ifdef SSL_set_tlsext_host_name
|
#if OPENSSL_VERSION_NUMBER < 0x00908070L
|
||||||
if(hostname && *hostname)SSL_set_tlsext_host_name(conn->ssl, hostname);
|
#error OpenSSL vv. below 0.9.8f are not supported
|
||||||
#else
|
#else
|
||||||
if(hostname && *hostname) X509_VERIFY_PARAM_set1_host(SSL_get0_param(conn->ssl), hostname, 0);
|
if(hostname && *hostname)SSL_set_tlsext_host_name(conn->ssl, hostname);
|
||||||
#endif
|
#endif
|
||||||
err = SSL_connect(conn->ssl);
|
err = SSL_connect(conn->ssl);
|
||||||
if ( err == -1 ) {
|
if ( err == -1 ) {
|
||||||
*errSSL = ERR_error_string(ERR_get_error(), errbuf);
|
*errSSL = ERR_error_string(ERR_get_error(), errbuf);
|
||||||
|
Loading…
Reference in New Issue
Block a user