Generate-TlsCertificate.ps1
generates a TLS
server certificate for localtest.me
and *.localtest.me
(localhost testing done right).
🚨 this is only intended to be used on your machine for development purposes. For everything else please use Let's Encrypt 🙇.
- No configuration
- Generates a
Certificate Authority
so that it can be trusted in Firefox and other systems as required
- Docker
PowerShell Core
.\Generate-TlsCertificate.ps1
You can optionally decide to trust the Certificate Authority
:
.\Generate-TlsCertificate.ps1 -TrustCa
📓 you can get Firefox
to import Certificate Authorities
from the Windows certificate store
automatically. You can enable this feature in about:config
by creating this boolean value:
security.enterprise_roots.enabled
and set it to true
. The Certificate Authority
needs to be added to the Trusted Root Certification Authorities
store of the Local Computer.
The easiest way to troubleshoot is to get yourself a terminal using the same image that was used to create the TLS
server certificate:
docker run -it --rm -v "${PWD}/out:/tls" -w '/tls' node bash
openssl x509 -noout -text -in ./ca.crt
openssl req -noout -text -in ./tls-cert.csr
openssl x509 -noout -text -in ./tls-cert.crt