]> git.ipfire.org Git - thirdparty/systemd.git/commit
test: make sure the dummy CA certificate is marked as such 30603/head
authorFrantisek Sumsal <frantisek@sumsal.cz>
Sat, 23 Dec 2023 12:33:11 +0000 (13:33 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Sat, 23 Dec 2023 12:42:09 +0000 (13:42 +0100)
commit4e5984f0271dd14d24aa25ff1d5401378acaa7c4
tree02f40fb1d48e1a1d7a917de091e960542ba6d363
parent338ed5bea4fcd0b5b1cdcfb96a789edf6251bbdd
test: make sure the dummy CA certificate is marked as such

With OpenSSL 3.2.0+ this is necessary, otherwise the verification
of such CA certificate fails badly:

$ openssl s_client -CAfile /run/systemd/remote-pki/ca.crt -connect localhost:19532
...
Connecting to ::1
CONNECTED(00000003)
Can't use SSL_get_servername
depth=1 C=CZ, L=Brno, O=Foo, OU=Bar, CN=Test CA
verify error:num=79:invalid CA certificate
verify return:1
depth=1 C=CZ, L=Brno, O=Foo, OU=Bar, CN=Test CA
verify error:num=26:unsuitable certificate purpose
verify return:1
...
---
SSL handshake has read 1566 bytes and written 409 bytes
Verification error: unsuitable certificate purpose
---
New, TLSv1.3, Cipher is TLS_AES_256_GCM_SHA384
Server public key is 2048 bit
This TLS version forbids renegotiation.
Compression: NONE
Expansion: NONE
No ALPN negotiated
Early data was not sent
Verify return code: 26 (unsuitable certificate purpose)
test/units/testsuite-04.journal-remote.sh