aboutsummaryrefslogtreecommitdiff
path: root/net/sstp-client/patches/200-openssl-deprecated.patch
blob: a9d5683eac1e8b2a5c652ddafa05cd3352069277 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- a/src/sstp-client.c
+++ b/src/sstp-client.c
@@ -546,6 +546,7 @@ static status_t sstp_init_ssl(sstp_clien
     int retval = SSTP_FAIL;
     int status = 0;
 
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
     /* Initialize the OpenSSL library */
     status = SSL_library_init();
     if (status != 1)
@@ -575,6 +576,9 @@ static status_t sstp_init_ssl(sstp_clien
 
     /* Create a new crypto context */
     client->ssl_ctx = SSL_CTX_new(SSLv23_client_method());
+#else
+    client->ssl_ctx = SSL_CTX_new(TLS_client_method());
+#endif
     if (client->ssl_ctx == NULL)
     {
         log_err("Could not get SSL crypto context");