Skip to content

Instantly share code, notes, and snippets.

@bcardarella
Created March 26, 2018 20:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bcardarella/7435a4671e479e12ebafdf8b6ebbe7c3 to your computer and use it in GitHub Desktop.
Save bcardarella/7435a4671e479e12ebafdf8b6ebbe7c3 to your computer and use it in GitHub Desktop.

Regenerating SSL Cert

cd ssl
rm -rf *
openssl req \
    -newkey rsa:2048 \
    -x509 \
    -nodes \
    -keyout server.key \
    -new \
    -out server.crt \
    -subj /CN=dev.dockyard.com \
    -reqexts SAN \
    -extensions SAN \
    -config <(cat /System/Library/OpenSSL/openssl.cnf \
        <(printf '[SAN]\nsubjectAltName=DNS:dev.dockyard.com')) \
    -sha256 \
    -days 3650

This will regenerate valid SSL certs.

Setting Development Environment

Development runs under SSL. We'll need to trust the included certificate and run the development server under the domain the certificate expects.

  1. run: sudo -- sh -c -e "echo '127.0.0.1 dev.dockyard.com' >> /etc/hosts"
  2. run open ssl/
  3. double-click on server.crt
  4. add certificate to your System Keychain
  5. find dev.dockyard.com certificate, double-click to edit
  6. change When using this certificate to Always Trust
  7. close dialog box and save changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment