Skip to contentSkip to conversation

package/sscep: fix build with OpenSSL 4.0.0

Buildroot Thomas Petazzoni via buildroot 1 participant 1 message Sep 20

lore
Share & tools
lore
#0 lore raw

commit: https://gitlab.com/buildroot.org/buildroot/-/commit/8a224bc363f70831f5d73b560a6466a3a5a789a0
branch: https://gitlab.com/buildroot.org/buildroot/-/tree/master

---
 .../sscep/0003-Fix-build-with-OpenSSL-4.x.patch    | 33 ++++++++++++++++++++++
 1 file changed, 33 insertions(+)
package/sscep/0003-Fix-build-with-OpenSSL-4.x.patch new file +33 -0
new file mode 100644
index 0000000000..61fdc692d4
@@ -0,0 +1,33 @@
+From 813ebb01ee32c35474ec8eb65464f698ccd6495f Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <[email protected]>
+Date: Thu, 10 Sep 2026 00:00:21 +0200
+Subject: [PATCH] Fix build with OpenSSL 4.x
+
+Upstream: https://github.com/certnanny/sscep/pull/192
+
+Signed-off-by: Bernd Kuhls <[email protected]>
+---
+ src/fileutils.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/fileutils.c b/src/fileutils.c
+index 7b846b7..27608f0 100644
+--- a/src/fileutils.c
++++ b/src/fileutils.c
+@@ -447,10 +447,10 @@ guess_ca_certs(const char* filename, X509_NAME *issuer_name,
+ 		if (!is_issuer) {
+ 			/* X509_get_key_usage(cert[i]) is not in older openssl */
+ 			ASN1_BIT_STRING *usage = X509_get_ext_d2i(cert[i], NID_key_usage, NULL, NULL);
+-			if (usage && (usage->length > 0)) {
+-				if (usage->data[0] & KU_DIGITAL_SIGNATURE)
++			if (usage && (ASN1_STRING_length(usage) > 0)) {
++				if (ASN1_STRING_get0_data(usage)[0] & KU_DIGITAL_SIGNATURE)
+ 					*sigc = cert[i];
+-				if (usage->data[0] & KU_KEY_ENCIPHERMENT)
++				if (ASN1_STRING_get0_data(usage)[0] & KU_KEY_ENCIPHERMENT)
+ 					*encc = cert[i];
+ 			} else {
+ 				/* no usability constraints */
+-- 
+2.47.3
+

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot