mirror of
https://github.com/openbsd/ports.git
synced 2026-06-17 23:13:55 +02:00
net/poco: fix build with opaque ASN1_STRING
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
|
||||
@@ -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<char*>(ASN1_STRING_data(name->d.ia5));
|
||||
+ const char* data = reinterpret_cast<const char*>(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<char*>(certTime->data));
|
||||
+ std::string dateTime(reinterpret_cast<const char*>(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<char*>(certTime->data));
|
||||
+ std::string dateTime(reinterpret_cast<const char*>(ASN1_STRING_get0_data(certTime)));
|
||||
int tzd;
|
||||
return DateTimeParser::parse("%y%m%d%H%M%S", dateTime, tzd);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user