Skip to content

fix: missing Authority Key Identifier in MITM leaf certificates#100

Merged
guyb1 merged 2 commits intoonecli:mainfrom
christian-oudard:fix/aki-cert
Mar 25, 2026
Merged

fix: missing Authority Key Identifier in MITM leaf certificates#100
guyb1 merged 2 commits intoonecli:mainfrom
christian-oudard:fix/aki-cert

Conversation

@christian-oudard
Copy link
Copy Markdown
Contributor

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() defaults use_authority_key_identifier_extension to false. MITM-generated leaf certs omit the AKI extension, which Python's ssl module 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.

  • Set use_authority_key_identifier_extension = true in leaf cert generation
  • Add test verifying the AKI extension (OID 2.5.29.35) is present

Additional context

One-line fix plus a test.

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.
@guyb1
Copy link
Copy Markdown
Contributor

guyb1 commented Mar 25, 2026

Hey @christian-oudard, thanks for catching this!
Merging now. Would love to hear how you're using OneCLI, if you run into anything else, feel free to open an issue!

@guyb1 guyb1 changed the title Fix missing Authority Key Identifier in MITM leaf certificates fix: missing Authority Key Identifier in MITM leaf certificates Mar 25, 2026
@guyb1 guyb1 merged commit 3d26e8d into onecli:main Mar 25, 2026
1 check passed
@guyb1 guyb1 mentioned this pull request Mar 25, 2026
@christian-oudard christian-oudard deleted the fix/aki-cert branch March 25, 2026 14:26
@christian-oudard
Copy link
Copy Markdown
Contributor Author

Hey @christian-oudard, thanks for catching this! Merging now. Would love to hear how you're using OneCLI, if you run into anything else, feel free to open an issue!

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]>
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.

2 participants