summaryrefslogtreecommitdiff
path: root/catlfish-benchmark/createca.sh
diff options
context:
space:
mode:
Diffstat (limited to 'catlfish-benchmark/createca.sh')
-rwxr-xr-xcatlfish-benchmark/createca.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/catlfish-benchmark/createca.sh b/catlfish-benchmark/createca.sh
new file mode 100755
index 0000000..a9dc06f
--- /dev/null
+++ b/catlfish-benchmark/createca.sh
@@ -0,0 +1,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 \
+ )