SSL Certificate for Localhost — Is It Possible? - Comodo SSL Resources

PHOTO EMBED

Mon Jun 13 2022 14:42:13 GMT+0000 (Coordinated Universal Time)

Saved by @sean_w

openssl req -x509 -out localhost.crt -keyout localhost.key \
  -newkey rsa:2048 -nodes -sha256 \
  -subj '/CN=localhost' -extensions EXT -config <( \
   printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")
content_copyCOPY

https://comodosslstore.com/resources/ssl-certificate-for-localhost/