Skip to content

Instantly share code, notes, and snippets.

@mgirouard
Created March 20, 2014 06:36
Show Gist options
  • Save mgirouard/9658426 to your computer and use it in GitHub Desktop.
Save mgirouard/9658426 to your computer and use it in GitHub Desktop.
Self-signed certificate generator: expects $1 to be a hostname
#!/bin/bash
openssl req -new -newkey rsa:2048 -nodes -keyout $1.key -out $1.csr
openssl x509 -req -days 366 -in $1.csr -signkey $1.key -out $1.crt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment