blob: a9dc06f779a6f2c84707b5abe1222b5289a30f8f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
mkdir httpsca
( cd httpsca ; \
mkdir -p demoCA/newcerts ; \
touch demoCA/index.txt ; \
echo 00 > demoCA/serial ; \
echo '[ req ]' > caconfig.txt ; \
echo 'distinguished_name = req_distinguished_name' >> caconfig.txt ; \
echo 'x509_extensions = v3_ca' >> caconfig.txt ; \
echo 'string_mask = utf8only' >> caconfig.txt ; \
echo '[ req_distinguished_name ]' >> caconfig.txt ; \
echo '[ v3_ca ]' >> caconfig.txt ; \
echo 'basicConstraints=CA:true' >> caconfig.txt ; \
openssl req -newkey rsa:2048 -keyout key.pem -out req.csr -nodes -subj '/countryName=SE/stateOrProvinceName=Stockholm/organizationName=Test/commonName=ca/O=ca' -config caconfig.txt ; \
openssl ca -in req.csr -selfsign -keyfile key.pem -out demoCA/cacert.pem -batch \
)
|