NodeJS Self Signed Certs

Posted on: 5/30/2023 Last Updated: 5/31/2023
Just some notes on generating SSL certs
All Articles

SSL Cert Stuff

Just some stuff around generating SSL certs to play with.

## NodeJS Self Signed Certs


# Update the defaults to what you want, then use this as your template to generate a SSL cert

distinguished_name = req_distinguished_name
req_extensions = v3_req

countryName = Country Name (2 letter code)
countryName_default = CA
stateOrProvinceName = State or Province Name (full name)
stateOrProvinceName_default = Alberta
localityName = Locality Name (eg, city)
localityName_default = Your City
organizationName = Organization Name (eg, company) [Internet Widgits Pty Ltd]
organizationName_default = Your Company Name Here
organizationalUnitName  = Organizational Unit Name (eg, section)
organizationalUnitName_default  = Engineering
commonName =
commonName_default =
commonName_max  = 64

[ v3_req ]
# Extensions to add to a certificate request
basicConstraints = CA:FALSE
keyUsage = nonRepudiation, digitalSignature, keyEncipherment
subjectAltName = @alt_names

DNS.1 =
DNS.2 =

# This is a 1 year cert (356 days)
openssl req -newkey rsa:2048 -new -config cert.conf -nodes -x509 -days 365 -keyout key.pem -out cert.pem

NodeJS HTTPS Server

coming soon...

server code tutorial mop