blob: e2d4e3224e92fd78cfd8ab4617653b7e71a17e97 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001--- a/src/sstp-client.c
2+++ b/src/sstp-client.c
3@@ -477,6 +477,7 @@ static status_t sstp_init_ssl(sstp_clien
4 int retval = SSTP_FAIL;
5 int status = 0;
6
7+#if OPENSSL_VERSION_NUMBER < 0x10100000L
8 /* Initialize the OpenSSL library */
9 status = SSL_library_init();
10 if (status != 1)
11@@ -490,6 +491,9 @@ static status_t sstp_init_ssl(sstp_clien
12
13 /* Create a new crypto context */
14 client->ssl_ctx = SSL_CTX_new(SSLv23_client_method());
15+#else
16+ client->ssl_ctx = SSL_CTX_new(TLS_client_method());
17+#endif
18 if (client->ssl_ctx == NULL)
19 {
20 log_err("Could not get SSL crypto context");