softethervpn5: fix compilation without engines
authorRosen Penev <rosenp@gmail.com>
Sun, 8 Aug 2021 02:55:54 +0000 (19:55 -0700)
committerRosen Penev <rosenp@gmail.com>
Tue, 17 Aug 2021 04:26:06 +0000 (21:26 -0700)
Signed-off-by: Rosen Penev <rosenp@gmail.com>
net/softethervpn5/patches/010-engines.patch [new file with mode: 0644]

diff --git a/net/softethervpn5/patches/010-engines.patch b/net/softethervpn5/patches/010-engines.patch
new file mode 100644 (file)
index 0000000..89898b5
--- /dev/null
@@ -0,0 +1,30 @@
+From ee3bf7f5079bcad51cc89197b6a9e34da746fc7e Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Sat, 7 Aug 2021 20:05:04 -0700
+Subject: [PATCH] fix compilation without OpenSSL engines
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+---
+ src/Mayaqua/Encrypt.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/src/Mayaqua/Encrypt.c
++++ b/src/Mayaqua/Encrypt.c
+@@ -3128,6 +3128,7 @@ bool IsEncryptedK(BUF *b, bool private_k
\r
+ K *OpensslEngineToK(char *key_file_name, char *engine_name)\r
+ {\r
++#ifndef OPENSSL_NO_ENGINE\r
+     K *k;\r
+ #if OPENSSL_API_COMPAT < 0x10100000L\r
+     ENGINE_load_dynamic();\r
+@@ -3140,6 +3141,9 @@ K *OpensslEngineToK(char *key_file_name,
+     k->pkey = pkey;\r
+     k->private_key = true;\r
+     return k;\r
++#else\r
++    return NULL;\r
++#endif\r
+ }\r
\r
+ // Convert the BUF to a K\r