Skip to content

Commit 8a55726

Browse files
committed
tests: fix a temporary file removal
1 parent 54eb0e2 commit 8a55726

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/rsa_genpkey_x509_csr.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@ openssl req -new -newkey rsa:2048 -subj '/CN=My Server/C=TH/ST=Phuket/L=Phuket/O
1616
# check the CSR
1717
openssl req -verify -in server.csr -text -noout
1818

19+
echo 01 > rootca.srl
1920
# issue the certificate by the TPM-based CA
2021
openssl x509 -provider tpm2 -provider default -propquery '?provider=tpm2' \
21-
-req -in server.csr -CAkey rootca.key -CA rootca.crt -CAcreateserial -out server.crt
22+
-req -in server.csr -CAkey rootca.key -CA rootca.crt -CAserial rootca.srl -out server.crt
2223
# check the certificate
2324
openssl x509 -in server.crt -text -noout
2425

25-
rm rootca.key rootca.crt server.key server.csr server.crt
26+
rm rootca.key rootca.crt rootca.srl server.key server.csr server.crt

0 commit comments

Comments
 (0)