Lines 1-32
Link Here
|
1 |
--- libfreerdp/crypto/tls.c.orig 2016-11-24 14:45:22 UTC |
1 |
--- libfreerdp/crypto/tls.c.orig 2017-07-24 08:46:54 UTC |
2 |
+++ libfreerdp/crypto/tls.c |
2 |
+++ libfreerdp/crypto/tls.c |
3 |
@@ -218,9 +218,9 @@ static long bio_rdp_tls_ctrl(BIO* bio, i |
3 |
@@ -853,13 +853,13 @@ int tls_connect(rdpTls* tls, BIO* underlying) |
4 |
case BIO_CTRL_RESET: |
4 |
if (!tls_prepare(tls, underlying, SSLv23_client_method(), options, TRUE)) |
5 |
SSL_shutdown(tls->ssl); |
5 |
return FALSE; |
6 |
|
6 |
|
7 |
- if (tls->ssl->handshake_func == tls->ssl->method->ssl_connect) |
7 |
-#ifndef OPENSSL_NO_TLSEXT |
8 |
+ if (SSL_in_connect_init(tls->ssl)) |
8 |
+#if !defined(OPENSSL_NO_TLSEXT) && !defined(LIBRESSL_VERSION_NUMBER) |
9 |
SSL_set_connect_state(tls->ssl); |
9 |
SSL_set_tlsext_host_name(tls->ssl, tls->hostname); |
10 |
- else if (tls->ssl->handshake_func == tls->ssl->method->ssl_accept) |
10 |
#endif |
11 |
+ else if (SSL_in_accept_init(tls->ssl)) |
|
|
12 |
SSL_set_accept_state(tls->ssl); |
13 |
|
14 |
SSL_clear(tls->ssl); |
15 |
@@ -805,7 +805,7 @@ int tls_connect(rdpTls* tls, BIO* underl |
16 |
return tls_do_handshake(tls, TRUE); |
11 |
return tls_do_handshake(tls, TRUE); |
17 |
} |
12 |
} |
18 |
|
13 |
|
19 |
-#ifndef OPENSSL_NO_TLSEXT |
14 |
-#if defined(MICROSOFT_IOS_SNI_BUG) && !defined(OPENSSL_NO_TLSEXT) |
20 |
+#if !defined(OPENSSL_NO_TLSEXT) && !defined(LIBRESSL_VERSION_NUMBER) |
15 |
+#if defined(MICROSOFT_IOS_SNI_BUG) && !defined(OPENSSL_NO_TLSEXT) && !defined(LIBRESSL_VERSION_NUMBER) |
21 |
static void tls_openssl_tlsext_debug_callback(SSL* s, int client_server, |
16 |
static void tls_openssl_tlsext_debug_callback(SSL* s, int client_server, |
22 |
int type, unsigned char* data, int len, void* arg) |
17 |
int type, unsigned char* data, int len, void* arg) |
23 |
{ |
18 |
{ |
24 |
@@ -949,7 +949,7 @@ BOOL tls_accept(rdpTls* tls, BIO* underl |
19 |
@@ -1002,7 +1002,7 @@ BOOL tls_accept(rdpTls* tls, BIO* underlying, rdpSetti |
25 |
return FALSE; |
20 |
return FALSE; |
26 |
} |
21 |
} |
27 |
|
22 |
|
28 |
-#ifndef OPENSSL_NO_TLSEXT |
23 |
-#if defined(MICROSOFT_IOS_SNI_BUG) && !defined(OPENSSL_NO_TLSEXT) |
29 |
+#if !defined(OPENSSL_NO_TLSEXT) && !defined(LIBRESSL_VERSION_NUMBER) |
24 |
+#if defined(MICROSOFT_IOS_SNI_BUG) && !defined(OPENSSL_NO_TLSEXT) && !defined(LIBRESSL_VERSION_NUMBER) |
30 |
/** |
25 |
SSL_set_tlsext_debug_callback(tls->ssl, tls_openssl_tlsext_debug_callback); |
31 |
* The Microsoft iOS clients eventually send a null or even double null |
26 |
#endif |
32 |
* terminated hostname in the SNI TLS extension! |
27 |
return tls_do_handshake(tls, FALSE) > 0; |