Skip to content

Fedora messaging CA cert is failing OpenSSL strict verification #440

@mh21

Description

@mh21

With Python 3.13, the default SSL context enabled strict verification [1][2]:

Changed in version 3.13: The context now uses VERIFY_X509_PARTIAL_CHAIN and VERIFY_X509_STRICT in its default verify flags.

This can also be checked via openssl directly, eg via openssl verify -x509_strict.

The fedora-messaging CA certificate fails this check, which causes a naive connection to the messaging cluster via pika fail on Python >=3.13 with [3]

Attempt to create the streaming transport failed: SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: Basic Constraints of CA cert not marked critical (_ssl.c:1028)'); 'rabbitmq.fedoraproject.org'/(<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('38.145.60.20', 5671)); ssl=True

This can be confirmed with the openssl CLI:

$ openssl verify -x509_strict -CAfile /tmp/fedora-cacert.pem /tmp/fedora-cert.pem 
CN=RabbitMQ PRODUCTION CA
error 89 at 1 depth lookup: Basic Constraints of CA cert not marked critical
error /tmp/fedora-cert.pem: verification failed

Expected outcome: the CA cert is following x509 best practices as embodied in the x509_strict checks.

[1] python/cpython#107361
[2] https://docs.python.org/3/library/ssl.html#ssl.create_default_context
[3] https://gitlab.com/cki-project/cki-tools/-/issues/205

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