Skip to contentSkip to conversation

package/stunnel: fix build without psk

PATCH Applied Fabrice Fontaine 2 participants 2 messages Jan 7, 2024 – Feb 6, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/stunnel: fix build without psk

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

---
 ...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
package/stunnel/0001-src-ocsp.c-fix-build-with-OPENSSL_NO_PSK.patch new file +45 -0
new file mode 100644
index 0000000000..a8edc1d465
@@ -0,0 +1,45 @@
+From 93e5cdd68b13cc3161d9b0094b0f331bdaf07cbc Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+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 <[email protected]>
+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
+
Signature · 6 lines
2.43.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 8 lines · On Sun, 7 Jan 2024 18:22:01 +0100 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) {
| ^~

Quoted 8 lines

Fixes:
- http://autobuild.buildroot.org/results/1707beea413a8da8713ad2dc59db947329da45d2

---
 ...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

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot