-
Notifications
You must be signed in to change notification settings - Fork 5
Fix compatibility with upcoming OpenSSL 4.0 #70
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
e83eb39
files.c: prevent compiler warnings on unused parameters if OPENSSL_NO…
DDvO 5a35e40
CERT_CERT_check{,_all}(): rename 'uri' parameter to 'src'
DDvO d1e3e8c
add UTIL_cmp_timeframe() and CRL_check() to avoid using X509_cmp_time…
DDvO e8dab7d
check_cert_crls(): add 'src' parameter for use in diagnostics by CRL_…
DDvO 98be68c
fixup! add UTIL_cmp_timeframe() and CRL_check() to avoid using X509_c…
DDvO File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if i got this correctly, we just want to check if time A is between start time B and end time C.
so:
if B - A < 0 we are after the start time (100 - 101 = -1) -> certificate valid
else we are before B and the certificate is not yet valid
and if C - A < 0 we are after the end time -> certificate expired
else we are before the end time and certificate is valid
this should be realizable farely easy with time.h difftime.
why not use such an approach instead?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for having a look at this and your comment.
I agree there should be a fairly easy way to do this,
but unfortunately things are tricky because the
ASN1_TIMEvalues may be invalid and need to be converted totime_t, or likely betterint64_t, before being able to do the comparisons.I've just extended this way my yesterday's complaint about that recent OpenSSL move:
openssl/openssl#29638 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we wait with merging until this is clarified?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question.
So far it is very unclear to me when and how the OpenSSL colleagues will react to that issue.
I suggest that we tentatively merge this PR,
and if/when there is good reason to adapt
UTIL_cmp_timeframe(), we can do in a follow-up PR.The new workaround code anyway will not take effect until someone uses OpenSSL 4.0.
I'm glad that I came across the issue some time before the release, so there is some chance to get it fixed by then.