sstp-client: Fix compilation without deprecated OpenSSL APIs
authorRosen Penev <redacted>
Mon, 7 Jan 2019 05:00:47 +0000 (21:00 -0800)
committerRosen Penev <redacted>
Mon, 7 Jan 2019 05:00:47 +0000 (21:00 -0800)
Signed-off-by: Rosen Penev <redacted>
net/sstp-client/Makefile
net/sstp-client/patches/200-openssl-deprecated.patch [new file with mode: 0644]

index 6959fd26c817dfe6b9aa6dfab88dc29f56fc97b4..feb7df1fe38ef3a7ad0e48e1cac2bb5b7bf01469 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sstp-client
 PKG_VERSION:=1.0.12
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@SF/sstp-client/$(PKG_VERSION)
diff --git a/net/sstp-client/patches/200-openssl-deprecated.patch b/net/sstp-client/patches/200-openssl-deprecated.patch
new file mode 100644 (file)
index 0000000..3c14c6c
--- /dev/null
@@ -0,0 +1,18 @@
+--- a/src/sstp-client.c
++++ b/src/sstp-client.c
+@@ -477,6 +477,7 @@ static status_t sstp_init_ssl(sstp_client_st *client, sstp_option_st *opt)
+     int retval = SSTP_FAIL;
+     int status = 0;
++#if OPENSSL_VERSION_NUMBER < 0x10100000L
+     /* Initialize the OpenSSL library */
+     status = SSL_library_init();
+     if (status != 1)
+@@ -487,6 +488,7 @@ static status_t sstp_init_ssl(sstp_client_st *client, sstp_option_st *opt)
+     /* Load all error strings */
+     SSL_load_error_strings();
++#endif
+     /* Create a new crypto context */
+     client->ssl_ctx = SSL_CTX_new(SSLv23_client_method());
git clone https://git.99rst.org/PROJECT