* [Buildroot] [PATCH 1/1] package/stunnel: fix build without psk
@ 2024-01-07 17:22 Fabrice Fontaine
2024-02-06 23:09 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2024-01-07 17:22 UTC (permalink / raw)
To: buildroot; +Cc: Pierre-Jean Texier, Fabrice Fontaine
Fix the following build failure without psk raised since bump to version
5.71 in commit 059259eabbd8d15c1e60c0c3b8631d0c02b93898:
ocsp.c: In function 'ocsp_init':
ocsp.c:112:20: error: 'SERVICE_OPTIONS' {aka 'struct service_options_struct'} has no member named 'psk_keys'
112 | if(!section->psk_keys) {
| ^~
Fixes:
- http://autobuild.buildroot.org/results/1707beea413a8da8713ad2dc59db947329da45d2
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
...ocsp.c-fix-build-with-OPENSSL_NO_PSK.patch | 45 +++++++++++++++++++
1 file changed, 45 insertions(+)
create mode 100644 package/stunnel/0001-src-ocsp.c-fix-build-with-OPENSSL_NO_PSK.patch
diff --git a/package/stunnel/0001-src-ocsp.c-fix-build-with-OPENSSL_NO_PSK.patch b/package/stunnel/0001-src-ocsp.c-fix-build-with-OPENSSL_NO_PSK.patch
new file mode 100644
index 0000000000..a8edc1d465
--- /dev/null
+++ b/package/stunnel/0001-src-ocsp.c-fix-build-with-OPENSSL_NO_PSK.patch
@@ -0,0 +1,45 @@
+From 93e5cdd68b13cc3161d9b0094b0f331bdaf07cbc Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Sat, 6 Jan 2024 17:28:20 +0100
+Subject: [PATCH] src/ocsp.c: fix build with OPENSSL_NO_PSK
+
+Fix the following build failure with OPENSSL_NO_PSK:
+
+ocsp.c: In function 'ocsp_init':
+ocsp.c:112:20: error: 'SERVICE_OPTIONS' {aka 'struct service_options_struct'} has no member named 'psk_keys'
+ 112 | if(!section->psk_keys) {
+ | ^~
+
+Fixes:
+ - http://autobuild.buildroot.org/results/1707beea413a8da8713ad2dc59db947329da45d2
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Upstream: https://github.com/mtrojnar/stunnel/pull/18
+---
+ src/ocsp.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/ocsp.c b/src/ocsp.c
+index 5073ded..12792af 100644
+--- a/src/ocsp.c
++++ b/src/ocsp.c
+@@ -109,12 +109,16 @@ int ocsp_init(SERVICE_OPTIONS *section) {
+ s_log(LOG_DEBUG, "OCSP: Client OCSP stapling enabled");
+ } else {
+ #if OPENSSL_VERSION_NUMBER>=0x10002000L
++#ifndef OPENSSL_NO_PSK
+ if(!section->psk_keys) {
++#endif
+ if(SSL_CTX_set_tlsext_status_cb(section->ctx, ocsp_server_cb)==TLSEXT_STATUSTYPE_ocsp)
+ s_log(LOG_DEBUG, "OCSP: Server OCSP stapling enabled");
++#ifndef OPENSSL_NO_PSK
+ } else {
+ s_log(LOG_NOTICE, "OCSP: Server OCSP stapling is incompatible with PSK");
+ }
++#endif
+ #else /* OpenSSL version 1.0.2 or later */
+ s_log(LOG_NOTICE, "OCSP: Server OCSP stapling not supported");
+ #endif /* OpenSSL version 1.0.2 or later */
+--
+2.43.0
+
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/stunnel: fix build without psk
2024-01-07 17:22 [Buildroot] [PATCH 1/1] package/stunnel: fix build without psk Fabrice Fontaine
@ 2024-02-06 23:09 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-02-06 23:09 UTC (permalink / raw)
To: Fabrice Fontaine; +Cc: Pierre-Jean Texier, buildroot
On Sun, 7 Jan 2024 18:22:01 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> Fix the following build failure without psk raised since bump to version
> 5.71 in commit 059259eabbd8d15c1e60c0c3b8631d0c02b93898:
>
> ocsp.c: In function 'ocsp_init':
> ocsp.c:112:20: error: 'SERVICE_OPTIONS' {aka 'struct service_options_struct'} has no member named 'psk_keys'
> 112 | if(!section->psk_keys) {
> | ^~
>
> Fixes:
> - http://autobuild.buildroot.org/results/1707beea413a8da8713ad2dc59db947329da45d2
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> ...ocsp.c-fix-build-with-OPENSSL_NO_PSK.patch | 45 +++++++++++++++++++
> 1 file changed, 45 insertions(+)
> create mode 100644 package/stunnel/0001-src-ocsp.c-fix-build-with-OPENSSL_NO_PSK.patch
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-06 23:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-07 17:22 [Buildroot] [PATCH 1/1] package/stunnel: fix build without psk Fabrice Fontaine
2024-02-06 23:09 ` Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox