Created
November 22, 2018 07:12
-
-
Save dmarov/b0a968423a8ebbb98c4a71cf9ca22a15 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
#!/usr/local/bin/zsh | |
# ./cert-gen.zsh key.pem req.pem certificate.pem | |
keyFile=$1; | |
reqFile=$2; | |
crtFile=$3; | |
# generate private key | |
# openssl genrsa -out $keyFile 2048 | |
# generate certificate request | |
# openssl req -new -sha256 -key $keyFile -out $reqFile -config openssl.conf | |
# sign certificate request | |
openssl x509 -req -signkey $keyFile -keyform PEM -inform PEM -outform PEM -in $reqFile -out $crtFile -days 1000000 | |
# openssl x509 -in certificate.pem -noout -text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment