rtty: add compatibility for wolfssl >= 5.0
authorSergey V. Lobanov <sergey@lobanov.in>
Mon, 3 Jan 2022 18:10:50 +0000 (21:10 +0300)
committerHannu Nyman <hannu.nyman@iki.fi>
Sat, 21 Jan 2023 19:20:05 +0000 (21:20 +0200)
NTRU support has been removed in wolfssl 5.0 so it is required to
mask NTRU specific code if wolfssl >= 5.0

Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
(cherry picked from commit 9913c0899a8fb6bfbda33e7a1fd84f2fa6c3ddda)

utils/rtty/Makefile
utils/rtty/patches/100-wolfssl_5_support.patch [new file with mode: 0644]

index aa7add5eaa257038cb3c5c0b533cc11b99a471dd..9e1ee7bec959e1ec49444a28b5046a4a05a5cdfd 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=rtty
 PKG_VERSION:=8.0.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL=https://github.com/zhaojh329/rtty/releases/download/v$(PKG_VERSION)
diff --git a/utils/rtty/patches/100-wolfssl_5_support.patch b/utils/rtty/patches/100-wolfssl_5_support.patch
new file mode 100644 (file)
index 0000000..096a32e
--- /dev/null
@@ -0,0 +1,21 @@
+commit 91b66a6b402b790f3c8cebb0420ef549744ee197
+Author: Sergey V. Lobanov <sergey@lobanov.in>
+Date:   Mon Jan 3 19:25:45 2022 +0300
+
+    add compatibility for wolfssl >= 5.0
+    
+    NTRU support has been removed in wolfssl 5.0 so it is required to
+    mask NTRU specific code if wolfssl >= 5.0
+
+--- a/src/ssl/openssl.c
++++ b/src/ssl/openssl.c
+@@ -336,7 +336,9 @@ static bool handle_wolfssl_asn_error(voi
+     case ASN_SIG_HASH_E:
+     case ASN_SIG_KEY_E:
+     case ASN_DH_KEY_E:
++#if LIBWOLFSSL_VERSION_HEX < 0x05000000
+     case ASN_NTRU_KEY_E:
++#endif
+     case ASN_CRIT_EXT_E:
+     case ASN_ALT_NAME_E:
+     case ASN_NO_PEM_HEADER: