Fix GH-13343: openssl_x509_parse should not allow omitted seconds in UTCTimes#14439
Closed
bukka wants to merge 1 commit intophp:PHP-8.2from
Closed
Fix GH-13343: openssl_x509_parse should not allow omitted seconds in UTCTimes#14439bukka wants to merge 1 commit intophp:PHP-8.2from
bukka wants to merge 1 commit intophp:PHP-8.2from
Conversation
Girgias
reviewed
Jun 2, 2024
Member
Girgias
left a comment
There was a problem hiding this comment.
This looks sensible to me, not sure what issue the initial PR fixed.
…in UTCTimes Signed-off-by: Jakub Zelenka <[email protected]>
4511e3f to
6407c17
Compare
Member
Author
|
Think the initial PR followed this tutorial https://obj-sys.com/asn1tutorial/node15.html but that doesn't exactly follow the actual spec. Think it might be actually ok for BER but OpenSSL is mostly DER. Currently certs with missing seconds are not decoded from OpenSSL 3.3. It wasn't fixed there as a bug for stable versions though so not 100% if we should treat it so as well. I'm targeting 8.2 but if anyone thinks that it should go only to master, I would be happy to target master only and just fix the test in stable versions. |
This was referenced Jun 2, 2024
Member
Author
|
I decided to apply this only to master. |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This mostly reverts #2444 and adds special tests for OpenSSL 3.3 where even parsing fails for certs with ASN.1 UTCTime without seconds