mirror of
https://github.com/proxytunnel/proxytunnel.git
synced 2026-01-23 02:34:59 +00:00
Merge pull request #75 from 68420948/master
Remediate faulty patch for #57
This commit is contained in:
commit
ac7c1085d6
2 changed files with 4 additions and 6 deletions
|
|
@ -341,11 +341,10 @@ int stream_enable_ssl(PTSTREAM *pts, const char *proxy_arg) {
|
|||
message( "Set SNI hostname to %s\n", peer_host);
|
||||
}
|
||||
res = SSL_set_tlsext_host_name(ssl, peer_host);
|
||||
if (res != SSL_TLSEXT_ERR_OK) {
|
||||
unsigned long ssl_err = (res == SSL_TLSEXT_ERR_ALERT_WARNING ? SSL_TLSEXT_ERR_ALERT_WARNING : ERR_get_error());
|
||||
message( "SSL_set_tlsext_host_name returned: %lu (0x%lx). "
|
||||
"TLS SNI error, giving up\n", ssl_err, ssl_err );
|
||||
exit( 1 );
|
||||
if ( res != 1 ) {
|
||||
message( "SSL_set_tlsext_host_name() failed for host name '%s'. "
|
||||
"TLS SNI error, giving up\n", peer_host);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if ( SSL_connect (ssl) <= 0) {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
#ifdef USE_SSL
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/ssl.h>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue