Updated test certificate generation so newly created CA certs include proper X.509 CA key usage extensions, fixing Python/OpenSSL verification failures while preserving existing server cert generation behavior. - #93
Open
MauriceHendrix wants to merge 3 commits into
Conversation
… proper X.509 CA key usage extensions, fixing Python/OpenSSL verification failures while preserving existing server cert generation behavior.
Author
|
@wcoenraads I also added some info to the readme that I needed to get the server running on my local wslk2 (on windows) |
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.
This is necessary for standards-compliant certificate path validation per RFC 5280.
For CA certificates, RFC 5280 expects CA capability to be expressed via:
Basic Constraints: CA:TRUE
Key Usage: includes keyCertSign (and commonly cRLSign)
Your old root cert had CA:TRUE but no CA key-usage extension, which OpenSSL/Python rejects during chain validation. Rust accepted it because its validator is more permissive, but strict RFC-style validators are not. Adding CA key usage makes the cert portable and valid across implementations.
Without it in python I get
Pairing connection failed: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: authority and subject key identifier mismatch (_ssl.c:1032)even with the certificatethe old version:
The new version:
the difference is in this bit: