Skip to content

Instantly share code, notes, and snippets.

@scottsbaldwin
Created October 3, 2016 14:46
Show Gist options
  • Save scottsbaldwin/9eaa5d7c5c7aaf776ad1040332842650 to your computer and use it in GitHub Desktop.
Save scottsbaldwin/9eaa5d7c5c7aaf776ad1040332842650 to your computer and use it in GitHub Desktop.
Generate a self-signed certificate
#!/bin/bash
# Create a new self-signed cert that is good for a year
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 365
# Strip the passphrase from the cert
openssl rsa -in key.pem -out newkey.pem && mv newkey.pem key.pem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment