• 
      

    Add conversion between OpenSSL verification codes and our failure codes.

    Review Request #14942 — Created March 18, 2026 and updated — Latest diff uploaded

    Information

    Review Board
    release-7.1.x

    Reviewers

    This introduces a table mapping OpenSSL's numeric verification codes to
    our CertificateVerificationFailureCode enum. This helps to create the
    right exceptions for an SSLError.

    Python doesn't expose constants for any of these codes, so the numeric
    values are used along with comments listing the OpenSSL error code's
    typical constant.

    CertificateVerificationFailureCode.for_ssl_verify_code() is used to
    produce the right code based on the mapping. This will be used in
    upcoming handling of SSLErrors.

    Unit tests pass.

    Commits

    Files