https – How to create self signed SSL certificate for test purposes? – Stack Overflow

You can do this via openssl:

  1. Install openssl package (if you are using Windows, download binaries here).
  2. Generate private key: openssl genrsa 2048 > private.pem
  3. Generate the self signed certificate: openssl req -x509 -days 1000 -new -key private.pem -out public.pem
  4. If needed, create PFX: openssl pkcs12 -export -in public.pem -inkey private.pem -out mycert.pfx



OpenSSL for Windows

Pre-compiled 64-bit (x64) and 32-bit (x86) 1.1.1 and 3.0 executables and libraries for Microsoft Windows Operating Systems with a dependency on the Microsoft Visual Studio 2015-2019 runtime and Microsoft Visual Studio 2015-2022 runtime respectively.
The distribution may be used standalone or integrated into any Windows application. The distribution’s EXE and DLL files are digitally signed ‘FireDaemon Technologies Limited’.

1 Download ZIP File (Preferred)
3 Installation

Set config in cmd for session

set OPENSSL_CONF=C:\testca\openssl.cnf

Working example

TLS Support — RabbitMQ

Manually Generating a CA, Certificates and Private Keys

Generate the key and certificates that our test Certificate Authority will use.

The process for creating server and client certificates is very similar.

Working example

quickguides/ at main · spawnmarvel/quickguides (

Encrypt with key and decrypt with key (fun)

Best Online Encrypt Decrypt Tool (