xref: /OK3568_Linux_fs/buildroot/package/libuhttpd/0001-openssl.c-fix-build-with-wolfssl.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From e5c5ed1c64cfc715729c9bfbfdcc4be225f344ff Mon Sep 17 00:00:00 2001
2From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
3Date: Wed, 4 Aug 2021 11:32:39 +0200
4Subject: [PATCH] openssl.c: fix build with wolfssl
5
6Fix the following build failure with wolfssl:
7
8/tmp/instance-4/output-1/build/libuhttpd-3.12.1/src/ssl/openssl.c: In function 'ssl_context_new':
9/tmp/instance-4/output-1/build/libuhttpd-3.12.1/src/ssl/openssl.c:174:33: error: 'tls13_ciphersuites' undeclared (first use in this function)
10  174 |     SSL_CTX_set_ciphersuites(c, tls13_ciphersuites);
11      |                                 ^~~~~~~~~~~~~~~~~~
12
13Fixes:
14 - http://autobuild.buildroot.org/results/d0fb629b40b05ad828775894fabed878692bb222
15
16Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
17[Upstream status: https://github.com/zhaojh329/ssl/pull/1]
18---
19 openssl.c | 8 ++++----
20 1 file changed, 4 insertions(+), 4 deletions(-)
21
22diff --git a/openssl.c b/openssl.c
23index 8f3d8b7..c42638c 100644
24--- a/src/ssl/openssl.c
25+++ b/src/ssl/openssl.c
26@@ -71,14 +71,14 @@
27                 "TLS13-AES256-GCM-SHA384:"		\
28                 ecdhe_aead_ciphers
29 #else
30-# define tls13_ciphersuites	"TLS_CHACHA20_POLY1305_SHA256:"		\
31-                "TLS_AES_128_GCM_SHA256:"		\
32-                "TLS_AES_256_GCM_SHA384"
33-
34 # define top_ciphers							\
35                 ecdhe_aead_ciphers
36 #endif
37
38+# define tls13_ciphersuites	"TLS_CHACHA20_POLY1305_SHA256:"		\
39+                "TLS_AES_128_GCM_SHA256:"		\
40+                "TLS_AES_256_GCM_SHA384"
41+
42 #define ecdhe_aead_ciphers						\
43                 "ECDHE-ECDSA-CHACHA20-POLY1305:"	\
44                 "ECDHE-ECDSA-AES128-GCM-SHA256:"	\
45--
462.30.2
47
48