Skip to content

Instantly share code, notes, and snippets.

@cedricvidal
Created June 5, 2017 17:30
Show Gist options
  • Save cedricvidal/e9afd02047b237969719c25c93b93261 to your computer and use it in GitHub Desktop.
Save cedricvidal/e9afd02047b237969719c25c93b93261 to your computer and use it in GitHub Desktop.
Generates a self signed certificate
#!/bin/sh
DOMAIN=${1:-localhost}
openssl genrsa -out $DOMAIN.key 2048
openssl req -new -x509 -key $DOMAIN.key -out $DOMAIN.cert -days 3650 -subj /CN=$DOMAIN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment