Skip to content

Enablement of certificate_authorities TLS extension via openssl.cnf not working #24516

@martinschmatz

Description

@martinschmatz

Intro
OpenSSL has support to add certificate_authorities as TLS extension in TLS ClientHello. See here (and here). This is relevant for a client to have a means to indicate to the server which CAs it would support.

Issue
However, when adding requestCAFile = <path/to/ca-cert-file-selection/pem-format> to openssl.cnf in the relevant ssl_conf sesction (see below), no such extension is sent in the ClientHello. This can easily be verified by monitoring a the content of the ClientHello with e.g. WireShark.

The reason is believed to be caused by this line which seemingly is not parsed as intended during an OpenSSL context configuration.

Remediation
When inserting a single line with SSL_CONF_CMD_STRING(RequestCAFile, "requestcafile", 0), right below this line, the certificate_authorities extension is created in the ClientHello as expected, obviously only when also adding a requestCAFile = <path/to/ca-cert-file> line to openssl.cnf (IOW, it is not created when no such line is in openssl.cnf).

It is further suggested to check for client or server mode flags here. Not 100% sure whether this is required or has a benefit.

Additional info
Remediation checked with OpenSSL v3.3.0 (commit 4cb3112), via s_client and cURL as client applications.
For completeness, example excerpt of `openssl.cnf':

ssl_conf = ssl_module

[ ssl_module ]
system_default = tls_system_default

[ tls_system_default ]
TLS.MinProtocol = TLSv1.2
TLS.MaxProtocol = TLSv1.3
DTLS.MinProtocol = DTLSv1.2
DTLS.MaxProtocol = DTLSv1.2
Groups = secp521r1:secp384r1:X25519:prime256v1:X448
Ciphersuites = TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:TLS_AES_128_CCM_SHA256
CipherString = ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384
requestCAFile = /etc/pki/tls/certs/ca-bundle.crt

Metadata

Metadata

Assignees

No one assigned

    Labels

    branch: 3.0Applies to openssl-3.0 branchbranch: 3.1Applies to openssl-3.1 (EOL)branch: 3.2Applies to openssl-3.2 (EOL)branch: 3.3Applies to openssl-3.3 (EOL)triaged: documentationThe issue/pr deals with documentation (errors)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions