Repository navigation
feat(libSceLibreSsl3): implement X509_cmp_current_time - #15620
adriadam10 merged 4 commits into
Conversation
Progress report (70aab1b → ec504f2)📈 System libraries: 35.88% (+0.0026%, +1 implemented functions) ✅ 1 implemented
Changed libraries (implemented exports)
|
BunnyFl
left a comment
There was a problem hiding this comment.
@alvaroelpob thanks. I compared the parser with LibreSSL 4.0.0 at the commit you cite, asn1_time_parse_cbs and ASN1_time_parse in asn1/a_time_tm.c plus x509_verify_asn1_time_to_time_t in x509/x509_verify.c, and the rules match:
- the length must be 13 or 15;
- a nonzero
typethat differs from the length's format fails; - a UTCTime year below 50 is 20xx, otherwise 19xx;
- a GeneralizedTime before 2050 is rejected (RFC 5280 §4.1.2.5,
x509_verify.clines 63-66); - invalid days, hours over 23, minutes or seconds over 59 (no leap second) and anything but a final
Zfail; - equal times compare as -1, as in
X509_cmp_time_internal.
What I ran: head e18f8216de merged onto main 1c8c0efc8c, Windows 11, WinLibs GCC, Release:
guest_libressl3_x509_cmp_timeandpublic_headerspass (2 of 2);- mutation, the
year < 2050rejection disabled:guest_libressl3_x509_cmp_timefails; tools/check_conventions.py --base upstream/mainon the head: all checks passed;tools/pr_overlap.py --branch: no shared exports. None of the 10 PRs it couldn't compare addsX509_cmp_current_time.
As on #15618, your open LibreSsl3 PRs conflict with one another on the export count line and adjacent lines in CMakeLists.txt and the debt file.
Approving.
✅ AMD GPU test: passedPR head
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (3, not counted against this PR)Validation IDs already present on main (8 IDs in 470 tests)Skipped (7)ReproduceAutomated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
e18f821 to
571aeff
Compare
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
571aeff to
458240c
Compare
458240c to
c715452
Compare
eaa53cd to
dff2cf8
Compare
dff2cf8 to
a2ddea7
Compare
a2ddea7 to
e677c24
Compare
e677c24 to
ec504f2
Compare
|
Rebased onto main: conflicts were in |
main merged another X509_cmp_current_time implementation in src/X509CmpTime.cpp (boykopovar#15620). Keep that file and its test target, replace the implementation with this branch's review-fixed field comparison, merge the test cases, and drop the duplicate X509CmpCurrentTime files.
What
Implements
X509_cmp_current_timein libSceLibreSsl3, following LibreSSL 4.0.0X509_cmp_time: the RFC 5280 time is compared with the current time and the result is -1 when it is not later, 1 when it is later and 0 when the time is invalid.Tested
Linux x86-64 (WSL2), Release: the full build passes and
ctest --test-dir build -j16passes 3829 of 3829 tests, including the newguest_libressl3_x509_cmp_time.python3 tools/check_conventions.py --base upstream/mainpasses. Not run on a console or in a title.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)