Skip to content

Commit

Permalink
Merge branch '3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
terrafrost committed Sep 16, 2024
2 parents 702ec75 + 1dba426 commit 42f575c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions phpseclib/File/ASN1/Maps/TBSCertList.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ abstract class TBSCertList
'children' => [
'version' => [
'type' => ASN1::TYPE_INTEGER,
'mapping' => ['v1', 'v2', 'v3'],
'mapping' => ['v1', 'v2'],
'optional' => true,
'default' => 'v2',
'default' => 'v1'
],
'signature' => AlgorithmIdentifier::MAP,
'issuer' => Name::MAP,
Expand Down
4 changes: 2 additions & 2 deletions phpseclib/File/X509.php
Original file line number Diff line number Diff line change
Expand Up @@ -2791,11 +2791,11 @@ public function signCRL(X509 $issuer, X509 $crl)
$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.
}
}
}
Expand Down

0 comments on commit 42f575c

Please sign in to comment.