mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-26 20:10:35 -09:00
package/sscep: fix build with OpenSSL 4.0.0
Signed-off-by: Bernd Kuhls <bernd@kuhls.net> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
committed by
Thomas Petazzoni
parent
d2dc2d0c8e
commit
8a224bc363
33
package/sscep/0003-Fix-build-with-OpenSSL-4.x.patch
Normal file
33
package/sscep/0003-Fix-build-with-OpenSSL-4.x.patch
Normal file
@@ -0,0 +1,33 @@
|
||||
From 813ebb01ee32c35474ec8eb65464f698ccd6495f Mon Sep 17 00:00:00 2001
|
||||
From: Bernd Kuhls <bernd@kuhls.net>
|
||||
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 <bernd@kuhls.net>
|
||||
---
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user