From 6be2dc0e891e3fac139bd829ab3d7290bfab048e Mon Sep 17 00:00:00 2001 From: tb Date: Thu, 12 Mar 2026 19:48:28 +0000 Subject: [PATCH] net/poco: fix build with opaque ASN1_STRING --- net/poco/Makefile | 2 +- .../patch-Crypto_src_X509Certificate_cpp | 27 +++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/net/poco/Makefile b/net/poco/Makefile index 98786d846c1..1c5c30b33b5 100644 --- a/net/poco/Makefile +++ b/net/poco/Makefile @@ -3,7 +3,7 @@ COMMENT = POCO C++ libraries for network based applications VERSION = 1.4.6p1 DISTNAME = poco-${VERSION}-all PKGNAME = poco-${VERSION:S/p/pl/} -REVISION = 8 +REVISION = 9 CATEGORIES = net devel SHLIB_VERSION = 1.0 diff --git a/net/poco/patches/patch-Crypto_src_X509Certificate_cpp b/net/poco/patches/patch-Crypto_src_X509Certificate_cpp index 8ca8f20f33c..7fe887a76be 100644 --- a/net/poco/patches/patch-Crypto_src_X509Certificate_cpp +++ b/net/poco/patches/patch-Crypto_src_X509Certificate_cpp @@ -10,3 +10,30 @@ Index: Crypto/src/X509Certificate.cpp } init(); +@@ -254,7 +254,7 @@ void X509Certificate::extractNames(std::string& cmnNam + const GENERAL_NAME* name = sk_GENERAL_NAME_value(names, i); + if (name->type == GEN_DNS) + { +- const char* data = reinterpret_cast(ASN1_STRING_data(name->d.ia5)); ++ const char* data = reinterpret_cast(ASN1_STRING_get0_data(name->d.ia5)); + std::size_t len = ASN1_STRING_length(name->d.ia5); + domainNames.insert(std::string(data, len)); + } +@@ -273,7 +273,7 @@ void X509Certificate::extractNames(std::string& cmnNam + Poco::DateTime X509Certificate::validFrom() const + { + ASN1_TIME* certTime = X509_get_notBefore(_pCert); +- std::string dateTime(reinterpret_cast(certTime->data)); ++ std::string dateTime(reinterpret_cast(ASN1_STRING_get0_data(certTime))); + int tzd; + return DateTimeParser::parse("%y%m%d%H%M%S", dateTime, tzd); + } +@@ -282,7 +282,7 @@ Poco::DateTime X509Certificate::validFrom() const + Poco::DateTime X509Certificate::expiresOn() const + { + ASN1_TIME* certTime = X509_get_notAfter(_pCert); +- std::string dateTime(reinterpret_cast(certTime->data)); ++ std::string dateTime(reinterpret_cast(ASN1_STRING_get0_data(certTime))); + int tzd; + return DateTimeParser::parse("%y%m%d%H%M%S", dateTime, tzd); + }