Requirements
- Works locally
- Works online
openssl req -x509 \
-sha256 -days 356 \
-nodes \
-newkey rsa:2048 \
-subj "/CN=juliensellier.com/C=FR/L=Paris" \
-keyout example.root.key -out example.root.crt
openssl genrsa -out server.key 2048 && \
openssl req -new -key server.key -out server.csr -config server.csr.conf
openssl x509 -req \
-in server.csr \
-CA example.root.crt -CAkey example.root.key \
-CAcreateserial -out server.crt \
-days 365 \
-sha256 -extfile server.cert.conf
For Chrome:
- Go to chrome://settings/certificates
- Go to the "Authorities" tab
- Click "Import" and select the root CA certificate
For Linux:
sudo cp example.root.crt /usr/local/share/ca-certificates/example.crt
sudo update-ca-certificates