Created
February 13, 2018 13:55
-
-
Save nicopace/0350ddf8880231bbdb1cd07963af9052 to your computer and use it in GitHub Desktop.
Generate mock root certificate without console interaction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PRIVATE_KEY_PASS=1234 | |
openssl genrsa -des3 -out myCA.key -passout pass:$PRIVATE_KEY_PASS 2048 | |
openssl req -x509 -new -nodes -key myCA.key -sha256 -days 1825 -out myCA.pem -passin pass:$PRIVATE_KEY_PASS -multivalue-rdn -subj /CN=My\ Name/OU=My\ Organization/[email protected] | |
echo 'A pass generated in myCA.key and a root cert in myCA.pem' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment