Created
July 9, 2015 08:50
-
-
Save veslo1/71e9e0f8e9f4fe23ce53 to your computer and use it in GitHub Desktop.
Generate SSL
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
#!/usr/bin/env bash | |
# Specify where we will install | |
# the tenantcloud.l certificate | |
SSL_DIR="/etc/ssl/tenantcloud.l" | |
# Set the wildcarded domain | |
# we want to use | |
DOMAIN="*.tenantcloud.l" | |
# A blank passphrase | |
PASSPHRASE="" | |
# Set our CSR variables | |
SUBJ=" | |
C=US | |
ST=Connecticut | |
O= | |
localityName=New Haven | |
commonName=$DOMAIN | |
organizationalUnitName= | |
emailAddress= | |
" | |
# Create our SSL directory | |
# in case it doesn't exist | |
sudo mkdir -p "$SSL_DIR" | |
# Generate our Private Key, CSR and Certificate | |
sudo openssl genrsa -out "$SSL_DIR/tenantcloud.l.key" 2048 | |
sudo openssl req -new -key "$SSL_DIR/tenantcloud.l.key" -out "$SSL_DIR/tenantcloud.l.csr" | |
sudo openssl x509 -req -days 365 -in "$SSL_DIR/tenantcloud.l.csr" -signkey "$SSL_DIR/tenantcloud.l.key" -out "$SSL_DIR/tenantcloud.l.crt" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment