Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update x509.php to parse ASN1_GENERALIZEDTIME #76

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Jacq
Copy link

@Jacq Jacq commented Jul 22, 2024

For very long nextUpdate CRL could contain ASN1_GENERALIZEDTIME instead of ASN1_UTCTIME.
Should we take that into account when parsing the x509 crl file?
Cheers,
Jacq

Parse also ASN1_GENERALIZEDTIME por nextUpdate and thisUpdate not only ASN1_UTCTIME.
@@ -491,12 +491,12 @@ private static function parsecrl($crl, $oidprint = false) {
unset($curr[$key]);
continue;
}
if($value['type'] == '17' && !array_key_exists('thisUpdate', $curr)) {
if(($value['type'] == '17' || $value['type'] == '18') && !array_key_exists('thisUpdate', $curr)) {
Copy link
Contributor

@parallels999 parallels999 Jul 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe better readability with in_array

if(in_array($value['type'], ['17', '18']) && !array_key_exists('thisUpdate', $curr)) {

@angeljqv angeljqv mentioned this pull request Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants