Created
August 15, 2018 18:14
-
-
Save finwe/5563bbc5ef517e8b3a95ddc9fed6419c to your computer and use it in GitHub Desktop.
easy-rsa CA shorthand script
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 | |
# first initialize easyrsa root keys and certificates: | |
# easyrsa3/easyrsa init-pki | |
# easyrsa3/easyrsa build-ca | |
# USAGE: ./certgen.sh <domainname> | |
easyrsa gen-req $1 | |
easyrsa3/easyrsa gen-req $1 | |
easyrsa3/easyrsa sign-req server $1 | |
openssl rsa -in /home/finwe/ca/pki/private/$1.key -out /home/finwe/ca/pki/private/$1.nopass.key | |
echo "ssl_certificate /home/finwe/ca/pki/issued/$1.crt;" | |
echo "ssl_certificate_key /home/finwe/ca/pki/private/$1.nopass.key;" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment