X509: CRL fixes

This commit is contained in:
terrafrost 2024-09-15 21:43:11 -05:00
parent 3e8ce2ba4b
commit f23b6d583b

View File

@ -4073,11 +4073,11 @@ class File_X509
$version = isset($tbsCertList['version']) ? $tbsCertList['version'] : 0;
if (!$version) {
if (!empty($tbsCertList['crlExtensions'])) {
$version = 1; // v2.
$version = 'v2'; // v2.
} elseif (!empty($tbsCertList['revokedCertificates'])) {
foreach ($tbsCertList['revokedCertificates'] as $cert) {
if (!empty($cert['crlEntryExtensions'])) {
$version = 1; // v2.
$version = 'v2'; // v2.
}
}
}