Merge pull request #30603 from mrc0mmand/openssl-shenanigans

test/ukify: make the tests happy with OpenSSL 3.2.0+
This commit is contained in:
Yu Watanabe 2023-12-24 00:27:20 +09:00 committed by GitHub
commit 354171a5db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View file

@ -859,7 +859,7 @@ def test_key_cert_generation(tmp_path):
'-noout',
], text = True)
assert 'Certificate' in out
assert 'Issuer: CN = SecureBoot signing key on host' in out
assert re.search('Issuer: CN\s?=\s?SecureBoot signing key on host', out)
if __name__ == '__main__':
sys.exit(pytest.main(sys.argv))

View file

@ -109,6 +109,11 @@ L = Brno
O = Foo
OU = Bar
CN = Test CA
[ v3_ca ]
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always,issuer:always
basicConstraints = CA:true
EOF
cat >/run/systemd/remote-pki/client.conf <<EOF
[ req ]
@ -136,9 +141,11 @@ CN = localhost
EOF
# Generate a dummy CA
openssl req -x509 -nodes -newkey rsa:2048 -sha256 -days 7 \
-extensions v3_ca \
-config /run/systemd/remote-pki/ca.conf \
-keyout /run/systemd/remote-pki/ca.key \
-out /run/systemd/remote-pki/ca.crt
openssl x509 -in /run/systemd/remote-pki/ca.crt -noout -text
echo 01 >/run/systemd/remote-pki/ca.srl
# Generate a client key and signing request
openssl req -nodes -newkey rsa:2048 -sha256 \