Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Generate dev self-signed certificate
#!/usr/bin/env bash
# Generate private key and CSR.
openssl req -nodes -newkey rsa:2048 -keyout ssl/server.key -out ssl/server.csr -subj "//CN=devserver"
# Auto-signing.
#openssl req -x509 -sha256 -days 365 -key ssl/server.key -in ssl/server.csr -out ssl/server.pem
openssl x509 -req -days 365 -in ssl/server.csr -signkey ssl/server.key -out ssl/server.crt
# Removing CSR.
rm -f ssl/server.csr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment