How to create self signed SSL certificate for test purposes?

SslHttpsSsl Certificate

Ssl Problem Overview


How to easily create self signed SSL certificate for testing purposes?

Ssl Solutions


Solution 1 - Ssl

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionDima StopelView Question on Stackoverflow
Solution 1 - SslDima StopelView Answer on Stackoverflow