Hi! I’m ZanderStylised (pixellated) picture of Zander, I make web things

Code Notes

šŸ“œCreate local self-signed certificate

Use mkcert

https://github.com/FiloSottile/mkcert

Install

brew install mkcert
brew install nss
mkcert -install
$ mkcert -install
Created a new local CA at "/Users/zander/Library/Application Support/mkcert" šŸ’„
The local CA is now installed in the system trust store! āš”ļø
The local CA is now installed in the Firefox trust store (requires browser restart)! 🦊

Run

mkcert localhost 127.0.0.1 ::1
$ mkcert localhost 127.0.0.1 ::1
Using the local CA at "/Users/zander/Library/Application Support/mkcert" ✨

Created a new certificate valid for the following names šŸ“œ
 - "localhost"
 - "127.0.0.1"
 - "::1"

The certificate is at "./localhost+2.pem" and the key at "./localhost+2-key.pem" āœ…

This will add the certificate and key into whichever directory you ran the script in

Use openssl

Run this then follow the instructions.

sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ./server.key -out ./server.crt

This is not nearly as good as mkcert though.