Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+[Updated for 4.28 build 9669 beta - src/Mayaqua/Encrypt.c dropped IsXRevoked()
+Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
---
autotools/softether.am | 1 +
src/Cedar/Admin.c | 2 +-
src/Cedar/Command.c | 6 +++++-
src/Cedar/Logging.c | 2 +-
src/Cedar/Server.c | 4 ++--
- src/Mayaqua/Encrypt.c | 2 +-
src/Mayaqua/FileIO.c | 39 ++++++++++++++++++++++++++++++++++++---
src/Mayaqua/FileIO.h | 2 ++
src/Mayaqua/Mayaqua.c | 4 ++++
src/Mayaqua/Table.c | 6 +++++-
src/Mayaqua/Unix.c | 6 +++---
src/bin/hamcore/Makefile.am | 8 ++++++--
- 12 files changed, 67 insertions(+), 15 deletions(-)
+ 11 files changed, 66 insertions(+), 14 deletions(-)
Index: b/autotools/softether.am
===================================================================
Format(dir_full_path, sizeof(dir_full_path), "%s/%s", exe_dir, dirname);\r
\r
dir = EnumDir(dir_full_path);\r
-Index: b/src/Mayaqua/Encrypt.c
-===================================================================
---- a/src/Mayaqua/Encrypt.c
-+++ b/src/Mayaqua/Encrypt.c
-@@ -579,7 +579,7 @@
- return false;\r
- }\r
- \r
-- GetExeDir(dirname, sizeof(dirname));\r
-+ GetStateDir(dirname, sizeof(dirname));\r
- \r
- // Search the CRL file\r
- t = EnumDir(dirname);\r
Index: b/src/Mayaqua/FileIO.c
===================================================================
--- a/src/Mayaqua/FileIO.c
--- /dev/null
+From 1fad008e1adba5cb596da6f9ec6a244d49a585cf Mon Sep 17 00:00:00 2001
+From: Davide Beatrici <davidebeatrici@gmail.com>
+Date: Mon, 9 Apr 2018 22:02:34 +0200
+Subject: [PATCH] Encrypt: set default RSA key size to 1024 everywhere, using
+ the RSA_KEY_SIZE macro
+
+This commit also fixes the problem described in #31, which was caused by the test key generated in RsaCheck() being too small for newer OpenSSL versions.
+
+Failure looks like
+-- Alert: RsaCheck() --
+OpenSSL Library Init Failed. (too old?)
+Please install the latest version of OpenSSL.
+
+Upstream: https://github.com/SoftEtherVPN/SoftEtherVPN_Stable/commit/1fad008e1adba5cb596da6f9ec6a244d49a585cf
+(Currently still on an active pull request https://github.com/SoftEtherVPN/SoftEtherVPN_Stable/pull/1)
+
+Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
+---
+ src/Mayaqua/Encrypt.c | 8 ++++----
+ src/Mayaqua/Encrypt.h | 2 +-
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/Mayaqua/Encrypt.c b/src/Mayaqua/Encrypt.c
+index 381d1c5..a557052 100644
+--- a/src/Mayaqua/Encrypt.c
++++ b/src/Mayaqua/Encrypt.c
+@@ -2194,7 +2194,7 @@ bool RsaVerifyEx(void *data, UINT data_size, void *sign, K *k, UINT bits)
+ }\r
+ if (bits == 0)\r
+ {\r
+- bits = 1024;\r
++ bits = RSA_KEY_SIZE;\r
+ }\r
+ \r
+ // Hash the data\r
+@@ -2233,7 +2233,7 @@ bool RsaSignEx(void *dst, void *src, UINT size, K *k, UINT bits)
+ }\r
+ if (bits == 0)\r
+ {\r
+- bits = 1024;\r
++ bits = RSA_KEY_SIZE;\r
+ }\r
+ \r
+ Zero(dst, bits / 8);\r
+@@ -2302,7 +2302,7 @@ bool RsaCheck()
+ BIO *bio;\r
+ char errbuf[MAX_SIZE];\r
+ UINT size = 0;\r
+- UINT bit = 32;\r
++ UINT bit = RSA_KEY_SIZE;\r
+ // Validate arguments\r
+ \r
+ // Key generation\r
+@@ -2372,7 +2372,7 @@ bool RsaGen(K **priv, K **pub, UINT bit)
+ }\r
+ if (bit == 0)\r
+ {\r
+- bit = 1024;\r
++ bit = RSA_KEY_SIZE;\r
+ }\r
+ \r
+ // Key generation\r
+diff --git a/src/Mayaqua/Encrypt.h b/src/Mayaqua/Encrypt.h
+index d795d2d..0c48161 100644
+--- a/src/Mayaqua/Encrypt.h
++++ b/src/Mayaqua/Encrypt.h
+@@ -128,7 +128,7 @@ void RAND_Free_For_SoftEther();
+ #define DES_IV_SIZE 8 // DES IV size\r
+ #define DES_BLOCK_SIZE 8 // DES block size\r
+ #define DES3_KEY_SIZE (8 * 3) // 3DES key size\r
+-#define RSA_KEY_SIZE 128 // RSA key size\r
++#define RSA_KEY_SIZE 1024 // RSA key size\r
+ #define DH_KEY_SIZE 128 // DH key size\r
+ #define RSA_MIN_SIGN_HASH_SIZE (15 + SHA1_HASH_SIZE) // Minimum RSA hash size\r
+ #define RSA_SIGN_HASH_SIZE (RSA_MIN_SIGN_HASH_SIZE) // RSA hash size\r
+--
+1.9.1
+
#
################################################################################
-SOFTETHER_VERSION = v4.22-9634-beta
-SOFTETHER_SITE = $(call github,SoftEtherVPN,SoftEtherVPN,$(SOFTETHER_VERSION))
+SOFTETHER_VERSION = v4.28-9669-beta
+SOFTETHER_SITE = $(call github,SoftEtherVPN,SoftEtherVPN_stable,$(SOFTETHER_VERSION))
SOFTETHER_LICENSE = GPL-2.0
SOFTETHER_LICENSE_FILES = LICENSE
SOFTETHER_DEPENDENCIES = host-softether libopenssl readline