Skip to content

Instantly share code, notes, and snippets.

@lyoshenka
Created June 23, 2014 13:31
Show Gist options
  • Save lyoshenka/1772ab97306bf861731e to your computer and use it in GitHub Desktop.
Save lyoshenka/1772ab97306bf861731e to your computer and use it in GitHub Desktop.
One-liner to create a self-signed SSL cert
#!/bin/bash
# http://stackoverflow.com/questions/10175812/how-to-build-a-self-signed-certificate-with-openssl
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 10000
# if you don't want a password for your cert
openssl genrsa -out key.pem 4096 && openssl req -x509 -new -nodes -key key.pem -out cert.pem -days 10000 -subj "/CN=DOMAIN"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment