Skip to content

Instantly share code, notes, and snippets.

@kevingo
Last active May 1, 2016 01:56
Show Gist options
  • Select an option

  • Save kevingo/b631855a240c512cb0ec839bd8852fed to your computer and use it in GitHub Desktop.

Select an option

Save kevingo/b631855a240c512cb0ec839bd8852fed to your computer and use it in GitHub Desktop.
Self-Signed SSL Certificate and Key
#!/bin/bash
# Generate Private Key
openssl genrsa -out privatekey.pem 1024
# Generate CSR certificate with private key
openssl req -new -key privatekey.pem -out certrequest.csr
# Generate certificate with CSR certificate and private key
openssl x509 -req -in certrequest.csr -signkey privatekey.pem -out certificate.pem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment