Skip to content

Fix OCSP freshness validation for GeneralizedTime dates - #451

Open
abhinavgautam01 wants to merge 1 commit into
apple:mainfrom
abhinavgautam01:fix/447-ocsp-date-validation
Open

Fix OCSP freshness validation for GeneralizedTime dates#451
abhinavgautam01 wants to merge 1 commit into
apple:mainfrom
abhinavgautam01:fix/447-ocsp-date-validation

Conversation

@abhinavgautam01

Copy link
Copy Markdown

Fixes #447

OCSP timestamps ending in Z currently parse as Invalid Date, causing the freshness comparisons to silently accept expired or future-dated status information.

Parse GeneralizedTime strictly in UTC and reject malformed timestamps and invalid calendar dates. Preserve the existing clock-skew allowance and rejection of responses without nextUpdate.

Add regression tests using locally signed OCSP responses, with only the network request mocked. Coverage includes freshness boundaries, malformed dates, leap years and revoked/unknown status.

Validation

  • TypeScript build passed on Node 22.
  • Full Jest suite passed: 24 suites, 412 tests, including source and compiled tests.
  • Regression tests passed under America/Los_Angeles and Asia/Kolkata timezones.
  • git diff --check passed.

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.

SignedDataVerifier accepts stale OCSP status information because GeneralizedTime dates parse as NaN

1 participant