Skip to content

Instantly share code, notes, and snippets.

@os1ma
Created July 5, 2018 11:45
Show Gist options
  • Save os1ma/7a21f24a12ad4fd8a47048a2e6c705bd to your computer and use it in GitHub Desktop.
Save os1ma/7a21f24a12ad4fd8a47048a2e6c705bd to your computer and use it in GitHub Desktop.
#!/bin/bash
PREFIX=private-key
cd `dirname $0`
openssl genrsa 2048 > $PREFIX.pem
openssl req -new -key $PREFIX.pem > $PREFIX.csr
openssl x509 -req -signkey $PREFIX.pem < $PREFIX.csr > $PREFIX.crt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment