From 8a224bc363f70831f5d73b560a6466a3a5a789a0 Mon Sep 17 00:00:00 2001 From: Bernd Kuhls Date: Sat, 19 Sep 2026 17:58:32 +0200 Subject: [PATCH] package/sscep: fix build with OpenSSL 4.0.0 Signed-off-by: Bernd Kuhls Signed-off-by: Thomas Petazzoni --- .../0003-Fix-build-with-OpenSSL-4.x.patch | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 package/sscep/0003-Fix-build-with-OpenSSL-4.x.patch diff --git a/package/sscep/0003-Fix-build-with-OpenSSL-4.x.patch b/package/sscep/0003-Fix-build-with-OpenSSL-4.x.patch new file mode 100644 index 0000000000..61fdc692d4 --- /dev/null +++ b/package/sscep/0003-Fix-build-with-OpenSSL-4.x.patch @@ -0,0 +1,33 @@ +From 813ebb01ee32c35474ec8eb65464f698ccd6495f Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +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 +--- + 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 +