Set default certificate validation policy to require digitalSignature key usage#292
Merged
Conversation
… key usage, and allow overriding of EE and CA validation policies.
Member
|
This is great, thanks! Release coming up. |
Member
|
While the ability to set this requirement is useful, I am going to have to set this to off by default because there are plenty of uses out there that use certificates without this key usage set. |
Contributor
Author
|
Thank you for the very quick turnaround! I agree with your change to not require the "Digital Signature" key usage in order to avoid breaking existing implementations, however, the default should not require the "TLS Web Client Authentication" extended key usage either. I have submitted #293 to use a more permissive default that does not require the certificate to contain either of these extensions. |
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.
signxml.util.X509CertChainVerifiercurrently uses the default extension policy fromx509.verification.PolicyBuilder().build_client_verifier(), which requires the signer's certificate to have the "TLS Web Client Authentication" extended key usage extension. However, this extension is not a requirement to sign documents using XMLDSig. It should be sufficient for the signer's certificate to have only the "Digital Signature" key usage extension.This is causing validation failures on valid XML signatures where the certificate lacks the "TLS Web Client Authentication" extended key usage extension.
This pull request:
ee_policyandca_policykwargs toXMLVerifier.verify()to allow the ExtensionPolicy to be overridden if desired.