openssl: Use functions for ASN.1 struct members hidden in OpenSSL 4

According to the docs, most ASN.1 types are just typedefs of ASN1_STRING.
This commit is contained in:
Tobias Brunner
2026-05-06 10:46:43 +02:00
parent 82c01b7060
commit 528e5f07c3
2 changed files with 9 additions and 6 deletions
@@ -330,11 +330,11 @@ time_t openssl_asn1_to_time(const ASN1_TIME *time)
if (time)
{
chunk = openssl_asn1_str2chunk(time);
switch (time->type)
switch (ASN1_STRING_type(time))
{
case V_ASN1_UTCTIME:
case V_ASN1_GENERALIZEDTIME:
return asn1_to_time(&chunk, time->type);
return asn1_to_time(&chunk, ASN1_STRING_type(time));
default:
break;
}