Self-signed SSL certificates in Chrome 58

Since Let's Encrypt , encrypted websites have become standard practice. SSL certificates are also virtually indispensable in local development (for example, navigator.geolocation requires SSL encryption locally). Since Chrome version 58, support for CN (Common Name) has been dropped, and SAN (Subject Alternative Name) is now mandatory. As a result, Chrome no longer accepts any SSL certificates created using traditional methods .


Self-signed SSL certificates in Chrome 58

While you can use online tools like ZeroSSL to create certificates, or configure Chrome to work without valid certificates by using startup parameters like `--ignore-certificate-errors` or the flag `chrome://flags/#allow-insecure-localhost`, we want to create locally self-signed certificates using OpenSSL that include SAN and are fully accepted by Chrome. This one-liner does everything necessary (only `www.tld.local` needs to be replaced with the desired domain).:

61b7be9883ad31712c52a59252a4c9c4

Since OpenSSL unfortunately has no direct arguments to specify SAN, a config file is first created, OpenSSL is called with it and the file is then deleted. Windows users can also simply execute this command either with the help of Cygwin (and bash -c "...") or with the new WSL. The two resulting files www.tld.local.key and www.tld.local.cert can then be selected e.g. in MAMP:

Self-signed SSL certificates in Chrome 58

Windows users then load the following under "Manage User Certificates" (certmgr) into the "Trusted Root Certification Authorities:

Self-signed SSL certificates in Chrome 58

Finally, restart Chrome (chrome: // restart) and enjoy the green lock:

Self-signed SSL certificates in Chrome 58

Back