Skip to content

Generated MITM certificates fail strict X509 verification (missing leaf AKI and CA key usage) #263

Closed

Description

@jamesboyzj-design

Reproduction

On upstream 56d57b68c5d5bf2a2fadfe9c19f2ec6f28d14977 (0.8.9), a Python 3.13.3
HTTPS request through --http-inject-ca fails with certificate verification
enabled:

ssl.SSLCertVerificationError: certificate verify failed: Missing Authority Key Identifier

The generated leaf is signed by the MITM CA but does not set rcgen's
use_authority_key_identifier_extension.

Setting only that field exposes a second strict-verification failure:

certificate verify failed: CA cert does not include key usage extension

The generated CA declares IsCa::Ca but does not declare signing key usage.
Both changes are needed: leaf AKI and CA KeyCertSign (plus CrlSign).

Verified fix

With both changes, a real loopback HTTPS server receives an injected synthetic
bearer credential from a sandboxed Python client with VERIFY_X509_STRICT
explicitly enabled. No CERT_NONE, -k, verification-flag relaxation, global
trust-store modification or cloud credential is involved. The same probe
fails against the unmodified binary.

Environment: Ubuntu 25.04 ARM64 under OrbStack, Linux 7.0.14, Landlock ABI 8,
Python 3.13.3. This report does not claim HTTPS-only credential enforcement;
that is a separate transport-policy concern.

A standalone stdlib Python + OpenSSL integration probe and Rust test launcher
are included in the accompanying minimal fix PR.

Activity

  1. added a commit that references this issue on Oct 3, 2026
    42be724
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions