Skip to content

Commit 6a2ded5

Browse files
authored
Have Fake CA check that all parameters are present (#60)
1 parent ecde840 commit 6a2ded5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test_ca/issue-cert.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ X509_L=$3
1616
UZI=$4
1717
URA=$5
1818
AGB=$6
19+
20+
if [[ -z $HOST || -z $X509_O || -z $X509_L || -z $UZI || -z $URA || -z $AGB ]]; then
21+
echo Usage: $0 HOST X509_O X509_L UZI URA AGB
22+
exit 1
23+
fi
24+
1925
echo Generating key and certificate for $HOST
2026
openssl genrsa -out out/$HOST.key 2048
2127
openssl req -new -key out/$HOST.key -out $HOST.csr -subj "${DN_PREFIX}CN=${HOST}/O=${X509_O}/L=${X509_L}/serialNumber=${UZI}"

0 commit comments

Comments
 (0)