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
Intro
OpenSSL has support to add
certificate_authoritiesas TLS extension in TLSClientHello. 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>toopenssl.cnfin the relevantssl_confsesction (see below), no such extension is sent in theClientHello. This can easily be verified by monitoring a the content of theClientHellowith 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, thecertificate_authoritiesextension is created in theClientHelloas expected, obviously only when also adding arequestCAFile = <path/to/ca-cert-file>line toopenssl.cnf(IOW, it is not created when no such line is inopenssl.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':