Generates Certificates for CA, Server and Client. Includes a convertor for Firefox browser certificates (PK12) and Tomcat (pkcs8)
Originally written to test NodeRed's HTTP request node over HTTPS with Basic Auth.
Use at your own risk
Included in ./build
are pre-built certificates for testing purposes, obviously don't use these the wild as these keys are now compromised being on GitHub.
You're also comprising your browser by leaving these pre-built keys installed.
make
Included is a basic python https server that uses the generated certificates.
python https_auth_server.py
Default settings
python https_auth_server.py localhost 4443 test:test ./build/server-key.pem ./build/server-cert.pem
Navigate to https://localhost:4443, you will be presented with a SEC_ERROR_BAD_SIGNATURE
error.
Now we need to install the PK12 client certificate we generated.
- Navigate to the Certificates settings in Firefox
a. Goto the URL
about:preferences#advanced
then theCertificates
b. or head toPreferences > Advanced > Certificates
- hit the
View Certificates
button - Under
Your Certificates
hitImport...
- Find your
./build/client-cert.p12
file and install - When prompted for a password type
password
- Install the CA certificate, click the
Authorities
Tab
- Hit the
Import...
button - Find your
./build/ca-cert.pem
file and install - Hit
Ok
and your done. - Refresh or navigate to https://localhost:4443/
- Basic Auth password is
test
/test
for username and password respectively.
Setting | Value |
---|---|
Method | Get |
URL | https://localhost:4443 |
Enable SSL/TLS | On |
Use Basic Auth | On |
Username | Test |
Password | Test |
Setting | Value |
---|---|
certificate | [path to client-cert.pem ] |
private key | [path to client-key.pem ] |
CA Cert | [path to ca-cert.pem ] |
Verify Server Cert | Off |