Mercurial > repos > other > usr-local-bin
comparison make-certificate @ 18:b8c7a89c4ebd
Include Subject Alt Name in certs and use CA function
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Mon, 01 Oct 2018 20:48:28 +0100 |
parents | 14c88dd76d53 |
children | 86ca8ee7b597 |
comparison
equal
deleted
inserted
replaced
17:ccb1f0a7bfe9 | 18:b8c7a89c4ebd |
---|---|
12 exit 1 | 12 exit 1 |
13 fi | 13 fi |
14 | 14 |
15 pushd ~/Websites/certs/ | 15 pushd ~/Websites/certs/ |
16 | 16 |
17 openssl req -nodes -new -keyout $1.key -out $1.csr -subj "/C=GB/ST=Worcestershire/O=$1/CN=$1" | 17 openssl req -nodes -sha256 -new -keyout $1.key -out $1.csr -subj "/C=GB/ST=Worcestershire/O=$1/CN=$1" \ |
18 openssl x509 -req -days 365 -in $1.csr -CA ~/.ssh/CA/ca.crt -CAkey ~/.ssh/CA/ca.key -CAserial ~/.ssh/CA/ca.srl -out $1.crt | 18 -config <(cat ~/.ssh/CA/openssl.cnf <(echo "DNS.1=$1")) |
19 openssl ca -in $1.csr -out $1.crt -cert ~/.ssh/CA/ca.crt -keyfile ~/.ssh/CA/ca.key -days 365 \ | |
20 -config <(cat ~/.ssh/CA/openssl.cnf <(echo "DNS.1=$1")) -batch | |
19 popd | 21 popd |