tests: test mtls also w/ clientAuth EKU only

The google chrome root program will stop allowing roots that have both
clientAuth and ServerAuth [1].

In one of the mtls tests, use a certificate with only the clientAuth
EKU.

[1] https://googlechrome.github.io/chromerootprogram/#322-pki-hierarchies-included-in-the-chrome-root-store

Closes #17493
This commit is contained in:
Yedaya Katsman 2025-05-30 18:59:14 +03:00 committed by Daniel Stenberg
parent b53848738c
commit 2cf19c245e
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
3 changed files with 37 additions and 2 deletions

View File

@ -31,7 +31,8 @@ CERTCONFIGS = \
test-localhost0h.prm \
test-localhost-san-first.prm \
test-localhost-san-last.prm \
test-client-cert.prm
test-client-cert.prm \
test-client-eku-only.prm
GENERATEDCERTS = \
test-ca.cacert \

View File

@ -0,0 +1,34 @@
extensions = x509v3
[ x509v3 ]
subjectAltName = DNS:localhost
keyUsage = keyEncipherment,digitalSignature,keyAgreement
extendedKeyUsage = clientAuth
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid
basicConstraints = CA:false
authorityInfoAccess = @issuer_info
crlDistributionPoints = @crl_info
[ crl_ext ]
authorityKeyIdentifier = keyid:always
authorityInfoAccess = @issuer_info
[ issuer_info ]
caIssuers;URI.0 = http://test.curl.se/ca/EdelCurlRoot.cer
[ crl_info ]
URI.0 = http://test.curl.se/ca/EdelCurlRoot.crl
[ req ]
distinguished_name = req_DN
default_md = sha256
string_mask = utf8only
[ req_DN ]
countryName = "Country Name is Northern Nowhere"
countryName_value = NN
organizationName = "Organization Name"
organizationName_value = Edel Curl Arctic Illudium Research Cloud
commonName = "Common Name"
commonName_value = localhost

View File

@ -37,7 +37,7 @@ https-mtls
HTTPS GET with client authentication (mtls)
</name>
<command>
--cacert %CERTDIR/certs/test-ca.crt --cert %CERTDIR/certs/test-client-cert.crt --key %CERTDIR/certs/test-client-cert.key https://localhost:%HTTPS-MTLSPORT/%TESTNUMBER
--cacert %CERTDIR/certs/test-ca.crt --cert %CERTDIR/certs/test-client-eku-only.crt --key %CERTDIR/certs/test-client-eku-only.key https://localhost:%HTTPS-MTLSPORT/%TESTNUMBER
</command>
</client>