Add tests proving missing certificate chain validation#18
Open
lnagel wants to merge 2 commits intothorgate:mainfrom
Open
Add tests proving missing certificate chain validation#18lnagel wants to merge 2 commits intothorgate:mainfrom
lnagel wants to merge 2 commits intothorgate:mainfrom
Conversation
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 <noreply@anthropic.com>
Tests prove that pyasice accepts signatures from: - Self-signed certificates (should be rejected) - Expired certificates (should be rejected) - Certificates signed by untrusted CAs (should be rejected) Also demonstrates that existing test fixtures use self-signed certs. Tests are marked with xfail and will pass once chain validation is implemented. Relates to thorgate#17 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
xfail- they document vulnerabilities that currently existWhat the tests prove
test_self_signed_cert_should_be_rejectedXmlSignature.verify()test_expired_cert_should_be_rejectedtest_untrusted_ca_cert_should_be_rejectedtest_existing_fixture_is_self_signedTest output
Next steps
When chain validation is implemented, remove the
xfailmarks and invert the assertions - these tests should then PASS by rejecting the invalid certificates.Relates to #17
🤖 Generated with Claude Code