Created
March 8, 2017 23:22
-
-
Save dsprenkels/4e16fc360c009a8238132f934a9f3814 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
#!/bin/sh | |
KEYNAME="$1" | |
SERIAL="$2" | |
openssl genrsa -des3 -out $KEYNAME.key 4096 | |
openssl req -new -key $KEYNAME.key -out $KEYNAME.csr | |
openssl x509 -req -days 365 -in $KEYNAME.csr -CA ca.crt -CAkey ca.key -set_serial $SERIAL -out $KEYNAME.crt | |
openssl pkcs12 -export -clcerts -in $KEYNAME.crt -inkey $KEYNAME.key -out $KEYNAME.p12 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment