News for hackers. Stuff that matters.
Re:Show HN: I made a script to generate self-signed SSL cert... by NotANaN on Friday October 26, 2018 @11:14AM (#18309976)
"Generating the certs is a complicated hassle."

Not really... I will grant that the openssl commands are a bit non-obvious.

Step 1: Generate private key

openssl ecparam -genkey -name secp384r1 -out key.pem

Step 2: Create and sign cert

openssl req -x509 -sha512 -nodes -days 365 -key key.pem -subj "/CN=example.com" -reqexts SAN -extensions SAN -config <(cat /etc/ssl/openssl.cnf <(printf '[SAN]\nsubjectAltName=DNS:example.com,DNS:*.example.com')) -out cert.pem

There are no comments on this comment yet.