Skip to content

Instantly share code, notes, and snippets.

@gabouh
Forked from alexgorbatchev/generate_cert.sh
Created December 28, 2018 21:56
Show Gist options
  • Save gabouh/02d682a7947be24dd07ea30656de81ca to your computer and use it in GitHub Desktop.
Save gabouh/02d682a7947be24dd07ea30656de81ca to your computer and use it in GitHub Desktop.
Generate self signed https certificates for node.js express/hapi/etc
#!/bin/bash
openssl genrsa -out key.pem
openssl req -new -key key.pem -out csr.pem
openssl x509 -req -days 9999 -in csr.pem -signkey key.pem -out cert.pem
rm csr.pem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment