testssl generate self signed certificates for local development purposes.
- generates wildcard x509 certificates which covers *.domain.tld and domain.tld.
- outputs root authority and domain/server CA
- 10 years validity
- fallback to use
.testas TLD if you don't input any specific TLD (https://tools.ietf.org/html/rfc6761)
testssl --domain=example- generates CA for example.test in ssl subfoldertestssl --domain=mylocal.loc --dir=site- generates CA for mylocal.loc in folder sitetestssl --domain=mydoman.test --dir=- does not output any filesssl.GenerateCert("mydomain_name", "")- if you use from other package but don't want to generate files
- import root CA in your browser
- Firefox -> open in browser tab about:preferences#privacy, click View Certificates and click Import -> select rootCA.pem
- Chrome -> open in browser tab chrome://settings/certificates?search=authorities and click Import -> select rootCA.pem
or
- MacOS - import PEM trough keychain on MacOS and mark as trusted
- Ubuntu - as root CA on Ubuntu (you need to convert PEM to CRT).
openssl x509 -in rootCA.pem -inform PEM -out rootCA.crt