Created
February 22, 2021 14:18
-
-
Save voraviz/b092eb8be5b2765ab98a697e5a56e153 to your computer and use it in GitHub Desktop.
This file contains 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
CN=bad-partner.apps.pirate.com | |
echo "Create Root CA and Private Key" | |
openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -subj '/O=Pirate Inc./CN=pirate.com' \ | |
-keyout certs/pirate.com.key -out certs/pirate.com.crt | |
echo "Create Certificate and Private Key for $CN" | |
openssl req -out certs/bad-partner.csr -newkey rsa:2048 -nodes -keyout certs/bad-partner.key -subj "/CN=${CN}/O=Bad Department" | |
openssl x509 -req -days 365 -CA certs/pirate.com.crt -CAkey certs/pirate.com.key -set_serial 0 -in certs/bad-partner.csr -out certs/bad-partner.crt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment