Created
January 17, 2018 11:08
-
-
Save nerflad/414e068135e58653b8699aabc724f8fe to your computer and use it in GitHub Desktop.
create a self-signed SSL cert
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/bash | |
which openssl || echo Missing dependency openssl || exit 1 | |
if ! [[ -d ssl ]]; then | |
mkdir ssl; | |
fi | |
openssl genrsa -out ./ssl/client-key.pem 2048 | |
openssl req -new -key ./ssl/client-key.pem -out ./ssl/client.csr | |
openssl x509 -req -in ./ssl/client.csr -signkey ./ssl/client-key.pem -out ./ssl/client-cert.pem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment