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

Binary

https://wiki.openssl.org/index.php/Binaries

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’.

https://kb.firedaemon.com/support/solutions/articles/4000121705

1 Download ZIP File (Preferred)
3 Installation

Set config in cmd for session

set OPENSSL_CONF=C:\testca\openssl.cnf
echo %OPENSSL_CONF%

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/info.info at main · spawnmarvel/quickguides (github.com)

Encrypt with key and decrypt with key (fun)

Best Online Encrypt Decrypt Tool (codebeautify.org)