mirror of
https://github.com/proxytunnel/proxytunnel.git
synced 2026-01-23 02:34:59 +00:00
Temporary ugly fix for building with openssl1.0 or 1.1
Use either make -f Makefile.ssl1o or make -f Makefile.ssl11 When using OpenSSL1.0 or 1.1 based systems
This commit is contained in:
parent
f7831a292f
commit
5f2a02b34b
3 changed files with 219 additions and 0 deletions
|
|
@ -208,7 +208,12 @@ int check_cert_names(X509 *cert, char *peer_host) {
|
|||
for (i = 0; i < san_count; i++) {
|
||||
gn = sk_GENERAL_NAME_value(gen_names, i);
|
||||
if (gn->type == GEN_DNS && !(peer_host_is_ipv4 || peer_host_is_ipv6)) {
|
||||
#ifdef OPENSSL11
|
||||
if (check_cert_valid_host((char*)ASN1_STRING_get0_data(gn->d.ia5), peer_host)) {
|
||||
#else
|
||||
if (check_cert_valid_host((char*)ASN1_STRING_data(gn->d.ia5), peer_host)) {
|
||||
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
} else if (gn->type == GEN_IPADD) {
|
||||
|
|
@ -254,7 +259,11 @@ int stream_enable_ssl(PTSTREAM *pts, const char *proxy_arg) {
|
|||
/* Initialise the connection */
|
||||
SSLeay_add_ssl_algorithms();
|
||||
if (args_info.enforcetls1_flag) {
|
||||
#ifdef OPENSSL11
|
||||
meth = TLS_client_method();
|
||||
#else
|
||||
meth = TLSv1_client_method();
|
||||
#endif
|
||||
} else {
|
||||
meth = SSLv23_client_method();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue