Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/libuhttpd: fix build with wolfssl >= 5.0
@ 2022-11-05 13:56 Fabrice Fontaine
  2022-11-05 22:37 ` Thomas Petazzoni via buildroot
  2022-11-14 16:13 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2022-11-05 13:56 UTC (permalink / raw)
  To: buildroot; +Cc: Jianhui Zhao, Fabrice Fontaine

Fix the following build failure with wolfssl raised since bump to
version 5.2.0 in commit 14e0c4de719a0d63192cc5de66a608f75297f37d and
https://github.com/wolfSSL/wolfssl/commit/33cb8231481d5beb46b57511c2630aba36028256:

/home/buildroot/autobuild/instance-0/output-1/build/libuhttpd-3.14.1/src/ssl/openssl.c: In function 'handle_wolfssl_asn_error':
/home/buildroot/autobuild/instance-0/output-1/build/libuhttpd-3.14.1/src/ssl/openssl.c:339:10: error: 'ASN_NTRU_KEY_E' undeclared (first use in this function); did you mean 'ASN_ECC_KEY_E'?
  339 |     case ASN_NTRU_KEY_E:
      |          ^~~~~~~~~~~~~~
      |          ASN_ECC_KEY_E

Fixes:
 - http://autobuild.buildroot.org/results/3261b0035c8aadd1b62538b53e03af1cd8a7b312

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...01-add-compatibility-for-wolfssl-5-0.patch | 30 +++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 package/libuhttpd/0001-add-compatibility-for-wolfssl-5-0.patch

diff --git a/package/libuhttpd/0001-add-compatibility-for-wolfssl-5-0.patch b/package/libuhttpd/0001-add-compatibility-for-wolfssl-5-0.patch
new file mode 100644
index 0000000000..7da7199e7e
--- /dev/null
+++ b/package/libuhttpd/0001-add-compatibility-for-wolfssl-5-0.patch
@@ -0,0 +1,30 @@
+From 73aa4ef762b2de67bc8c7c260bd36b34fdb91e63 Mon Sep 17 00:00:00 2001
+From: "Sergey V. Lobanov" <sergey@lobanov.in>
+Date: Mon, 3 Jan 2022 19:36:52 +0300
+Subject: [PATCH] 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
+
+Signed-off-by: Sergey V. Lobanov <sergey at lobanov.in>
+[Retrieved from:
+https://github.com/zhaojh329/ssl/commit/73aa4ef762b2de67bc8c7c260bd36b34fdb91e63]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ openssl.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/ssl/openssl.c b/src/ssl/openssl.c
+index 5a49267..278bab5 100644
+--- a/src/ssl/openssl.c
++++ b/src/ssl/openssl.c
+@@ -336,7 +336,9 @@ static bool handle_wolfssl_asn_error(void *ssl, int r,
+     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:
-- 
2.35.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-14 16:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-05 13:56 [Buildroot] [PATCH 1/1] package/libuhttpd: fix build with wolfssl >= 5.0 Fabrice Fontaine
2022-11-05 22:37 ` Thomas Petazzoni via buildroot
2022-11-14 16:13 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox