Skip to content

Conversation

@lnagel
Copy link

@lnagel lnagel commented Jan 30, 2026

Summary

  • Add cert_status check to verify_response() method to properly validate certificate validity
  • Add OCSPCertificateRevokedError exception for revoked certificates
  • Add OCSPCertificateUnknownError exception for unknown certificate status
  • Add tests for revoked, unknown, and good certificate statuses

Previously, verify_response() only checked response_status (whether the OCSP server processed the request) but not cert_status (whether the certificate is actually valid). This meant revoked and unknown certificates silently passed validation.

Fixes #13

Test plan

  • Run pytest pyasice/tests/test_ocsp.py -v - all 7 tests pass
  • Run full test suite pytest -v - all 45 tests pass

🤖 Generated with Claude Code

Previously, verify_response() only checked response_status (whether the
OCSP server processed the request) but not cert_status (whether the
certificate is actually valid). This meant revoked and unknown
certificates silently passed validation.

Now raises OCSPCertificateRevokedError for revoked certificates and
OCSPCertificateUnknownError for unknown status.

Fixes thorgate#13

Co-Authored-By: Claude Opus 4.5 <[email protected]>
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.

OCSP.verify_response() does not validate certificate status

1 participant