Created
February 16, 2016 17:43
-
-
Save blha303/59ffbe99696e19511762 to your computer and use it in GitHub Desktop.
Generate a CSR for a domain
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 | |
openssl rsa -in account.key -pubout 2>&1 | grep -v "writing" | |
echo "press enter..." >&2 | |
read enter | |
openssl req -new -sha256 -key domain.key -subj "/" \ | |
-reqexts SAN -config <(cat /etc/ssl/openssl.cnf \ | |
<(printf "[SAN]\nsubjectAltName=DNS:$1")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment