fix: missing Authority Key Identifier in MITM leaf certificates#100
Merged
guyb1 merged 2 commits intoonecli:mainfrom Mar 25, 2026
Merged
fix: missing Authority Key Identifier in MITM leaf certificates#100guyb1 merged 2 commits intoonecli:mainfrom
guyb1 merged 2 commits intoonecli:mainfrom
Conversation
rcgen 0.13's CertificateParams::new() defaults use_authority_key_identifier_extension to false. This caused MITM-generated leaf certs to omit the AKI extension, which Python's ssl module rejects per RFC 5280 section 4.2.1.1.
Contributor
|
Hey @christian-oudard, thanks for catching this! |
Contributor
Author
The reason I'm finding bugs is that I forked OneCLI to create a local-only version: https://github.com/christian-oudard/crinj |
hisgarden
pushed a commit
to hisgarden/onecli
that referenced
this pull request
Mar 27, 2026
…li#100) * Fix missing Authority Key Identifier in MITM leaf certificates rcgen 0.13's CertificateParams::new() defaults use_authority_key_identifier_extension to false. This caused MITM-generated leaf certs to omit the AKI extension, which Python's ssl module rejects per RFC 5280 section 4.2.1.1. * refactor: extract leaf_params and fix fmt --------- Co-authored-by: Guy Ben Aharon <[email protected]>
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.
I have read the CONTRIBUTING.md file.
YES
What kind of change does this PR introduce?
Bug fix
What is the current behavior?
rcgen 0.13's
CertificateParams::new()defaultsuse_authority_key_identifier_extensiontofalse. MITM-generated leaf certs omit the AKI extension, which Python'ssslmodule rejects per RFC 5280 section 4.2.1.1.What is the new behavior?
Leaf certificates now include the Authority Key Identifier extension. Python and other strict TLS clients accept the gateway's MITM certs.
use_authority_key_identifier_extension = truein leaf cert generationAdditional context
One-line fix plus a test.