Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@nerflad
Created January 17, 2018 11:08
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 nerflad/414e068135e58653b8699aabc724f8fe to your computer and use it in GitHub Desktop.
Save nerflad/414e068135e58653b8699aabc724f8fe to your computer and use it in GitHub Desktop.
create a self-signed SSL cert
#!/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