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

Align Validity Period definition with RFC 5280 #469

Merged
merged 1 commit into from
Sep 8, 2020
Merged

Align Validity Period definition with RFC 5280 #469

merged 1 commit into from
Sep 8, 2020

Conversation

CBonnell
Copy link
Contributor

@CBonnell CBonnell commented Sep 3, 2020

Fixes #467.

@zakird zakird requested a review from sleevi September 3, 2020 16:44
@zakird
Copy link
Member

zakird commented Sep 7, 2020

This looks correct to me offhand, but would be good to get a second pair of eyes from @sleevi.

@sleevi
Copy link
Contributor

sleevi commented Sep 7, 2020

Yeah, the fractional validity depends on the accuracy of the client clock, given that UTCTime/GeneralizedTime in the abstract can represent fractional seconds, even if 5280 forbids them. That is, a cert with a notAfter (HHMMSS) at 000000Z and checked at 000000.001Z is expired, but if checked at 000000.000Z, valid, and the validity period was effectively (.001 seconds),

Thus, in theory, the validity period is 0 seconds (some infinitesimal slice of a second), but since machines aren’t that accurate, it’s typically 1ns when computed.

This LGTM as a change, and definitely underscores the SHOULD 397 days to avoid such issues entirely.

@zakird zakird merged commit 2b994a7 into zmap:master Sep 8, 2020
@cpu
Copy link
Member

cpu commented Sep 8, 2020

@zakird @sleevi Do one of you want to try the release instructions to cut a v2.2.0-rc2 release with this fix?

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.

e_tls_server_cert_valid_time_longer_than_398_days calculation is off by 1 second
4 participants