packages/net/sstp-client/patches/200-openssl-deprecated.patch
Ilya Lipnitskiy 5d8d4fbbcb
treewide: Run refresh on all packages
The crude loop I wrote to come up with this changeset:

  find -L package/feeds/packages/ -name patches | \
  sed 's/patches$/refresh/' | sort | xargs make

Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
2021-02-20 16:02:15 -08:00

20 lines
630 B
Diff

--- a/src/sstp-client.c
+++ b/src/sstp-client.c
@@ -477,6 +477,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)
@@ -490,6 +491,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");