Skip to content

Commit 3e247b7

Browse files
committed
Add certificate signing to tmldsa test
Extend the tmldsa test to sign the generated ML-DSA certificate signing request (CSR) with the test CA. This adds a test case for creating a signed certificate with an ML-DSA key, ensuring the `ca` command functions correctly for this algorithm. Signed-off-by: Simo Sorce <simo@redhat.com>
1 parent f385bf2 commit 3e247b7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/tmldsa

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@ req -new -batch -key "${MLDSAPRIURI}" -out ${TMPPDIR}/mldsa_csr.pem'
3131
ossl '
3232
req -in ${TMPPDIR}/mldsa_csr.pem -verify -noout'
3333

34+
title PARA "Create a signed cert"
35+
ossl '
36+
x509 -req -in ${TMPPDIR}/mldsa_csr.pem
37+
-extfile ${OPENSSL_CONF}
38+
-extensions usr_cert
39+
-CA ${CACRT} -CAkey ${CAPRIURI}
40+
-out ${TMPPDIR}/mldsa_signed.crt'
41+
3442
title PARA "Test EVP_PKEY_eq on public ML-DSA key both on token"
3543
$CHECKER "${TESTBLDDIR}/tcmpkeys" "$MLDSAPUBURI" "$MLDSAPUBURI"
3644

@@ -112,5 +120,4 @@ if [ $FAIL -ne 0 ]; then
112120
exit 1
113121
fi
114122
OPENSSL_CONF=${ORIG_OPENSSL_CONF}
115-
116123
exit 0

0 commit comments

Comments
 (0)