-
Notifications
You must be signed in to change notification settings - Fork 175
OpenSSL version 3.3.0-dev: OpenSSL::ASN1::ASN1Error: utctime/generalizedtime is too short #724
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
Comments
Grep with "generalizedtime is too short" lead me to this OpenSSL PR: openssl/openssl#23483. I think we can remove these assertions. |
Thanks for finding the commit. Did you mean that we remove the For the 2nd error test, I debugged. Below is a minimal Ruby reproducer.
Below is the gdb debugging and backtrace. What do you think about that we adjust the value of the
|
By the way, there are 2 kinds of the errors: |
I debugged the 2nd error test again into the
|
OK. It seems that the assertions getting the errors are testing the cases of returning the String format without the seconds. According to the PDF file: ITU-T X.690 / ISO/IEC 8825-1 mentioned at openssl/openssl#23483 (comment), it seems that the document and/or OpenSSL project thinks that the 000000Z (HHMISSZ) is the minimal valid string, and thinks that the 0000Z (HHMIZ) is invalid.
So, as rhenium mentioned, just dropping the assertions makes sense to me. |
I sent the PR #728. |
Yes, seconds in GeneralizedTime and UTCTime is required in DER, but is optional in BER, according to the document. OpenSSL's parser hasn't been very consistent; it supports DER and partially BER. It still is more liberal than strictly DER by allowing timezone string, but I think the change itself is OK. Either way, I think the current assertions were overly specific for the ruby/openssl test suite. The PR looks good to me. |
I got the following errors only in the CI openssl-head case when running the latest master commit 1e8e246 on openssl-head on my forked repository. The used OpenSSL is the latest master branch openssl/openssl@1f03d33 according to the log.
https://github.com/junaruga/ruby-openssl/actions/runs/8233851472/job/22514261811#step:12:613
The text was updated successfully, but these errors were encountered: