Fill these in once
- Make the certificate and key
openssl req -x509 -newkey rsa:4096 -sha256 -days 365 -nodes -keyout server.key -out server.crt -subj "/CN=localhost" -addext "subjectAltName=DNS:localhost"Browsers will warn about it. For trusted local HTTPS, use mkcert instead.
Check it worked
- Check what's in it
openssl x509 -in server.crt -noout -subject -dates
- Make the certificate and key
openssl req -x509 -newkey rsa:4096 -sha256 -days 365 -nodes -keyout server.key -out server.crt -subj "/CN=localhost" -addext "subjectAltName=DNS:localhost"Browsers will warn about it. For trusted local HTTPS, use mkcert instead.
Check it worked
- Check what's in it
openssl x509 -in server.crt -noout -subject -dates
- Make the certificate and key (OpenSSL comes with Git for Windows)
& "C:\Program Files\Git\usr\bin\openssl.exe" req -x509 -newkey rsa:4096 -sha256 -days 365 -nodes -keyout server.key -out server.crt -subj "/CN=localhost" -addext "subjectAltName=DNS:localhost"Browsers will warn about it. For trusted local HTTPS, use mkcert instead.
Check it worked
- Check what's in it
& "C:\Program Files\Git\usr\bin\openssl.exe" x509 -in server.crt -noout -subject -dates