Skip to content

An SSL Test Certificate Generator for CA, Client and Server. Includes a python https test server.

Notifications You must be signed in to change notification settings

fxadecimal/ssl_cert_generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Test Certificate Generator

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.

Disclaimer

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.

Build certificates

make

Run test server

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

Install Client and CA Certificate in Firefox

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.

  1. Navigate to the Certificates settings in Firefox a. Goto the URL about:preferences#advanced then the Certificates b. or head to Preferences > Advanced > Certificates
  2. hit the View Certificates button
  3. Under Your Certificates hit Import...

  1. Find your ./build/client-cert.p12 file and install
  2. When prompted for a password type password

  1. Install the CA certificate, click the Authorities Tab

  1. Hit the Import... button
  2. Find your ./build/ca-cert.pem file and install
  3. Hit Ok and your done.
  4. Refresh or navigate to https://localhost:4443/
  5. Basic Auth password is test / test for username and password respectively.

Install Client and CA Certificate in NodeRed

  1. Goto your http request node
Setting Value
Method Get
URL https://localhost:4443
Enable SSL/TLS On
Use Basic Auth On
Username Test
Password Test
  1. Hit the edit TLS Configuration 🖋 button
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

References

About

An SSL Test Certificate Generator for CA, Client and Server. Includes a python https test server.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published