2 # NOTE: This README is "bash" capable. bash README.txt
4 # create simple but reasonable directory structure
5 mkdir -p private certs newcerts
7 chmod 755 certs newcerts
11 echo "IMPORTANT: If for any reason, you kill this process, type 'stty sane'"
12 echo "Enter the PassPhrase for your Key: "
15 PASSPHRASE=HunkyDoryDickoryDock
18 # Create a regaular rsa encrypted key
19 openssl genrsa -aes256 -out private/ca.ekey -passout stdin 4096 << EOF
23 # Move to a Java readable time, not this one is NOT Encrypted.
24 openssl pkcs8 -in private/ca.ekey -topk8 -nocrypt -out private/ca.key -passin stdin << EOF
27 chmod 400 private/ca.key private/ca.ekey
29 # Generate a CA Certificate
30 openssl req -config openssl.conf \
32 -new -x509 -days 7300 -sha256 -extensions v3_ca \
33 -out certs/ca.crt << EOF
37 # All done, print result
38 openssl x509 -text -noout -in certs/ca.crt