Skip to content

Commit

Permalink
tests: fix a temporary file removal
Browse files Browse the repository at this point in the history
  • Loading branch information
gotthardp committed Jan 25, 2025
1 parent 54eb0e2 commit 8a55726
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/rsa_genpkey_x509_csr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ openssl req -new -newkey rsa:2048 -subj '/CN=My Server/C=TH/ST=Phuket/L=Phuket/O
# check the CSR
openssl req -verify -in server.csr -text -noout

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

rm rootca.key rootca.crt server.key server.csr server.crt
rm rootca.key rootca.crt rootca.srl server.key server.csr server.crt

0 comments on commit 8a55726

Please sign in to comment.