How to create X509 certificates for testing

This page provides a few methods to create X509 certificates for testing purposes.

Using OpenSSL

For this you need to have OpenSSL installed. On Windows, convenient installers are available at http://www.slproweb.com/products/Win32OpenSSL.html or http://gnuwin32.sourceforge.net/packages/openssl.htm.

Self-signed certificates

Many tutorials exist on the web, such as these:

The easiest solution I've found so far is that one-line example:

openssl req -new -newkey rsa:1024 -days 365 -nodes -x509 -keyout test.pem -out test.pem

Or if you prefer to have separate files for the private key and the certificate:

openssl req -new -newkey rsa:1024 -days 365 -nodes -x509 -keyout test.key -out test.cert

 

Certificates with a CA

Other options

 

Commentaires

Options d'affichage des commentaires

Sélectionnez la méthode d'affichage des commentaires que vous préférez, puis cliquez sur "Sauvegarder les paramètres" pour activer vos changements.

win openssl-warning-cant-open-config-file-usrlocalsslopensslcnf

On windows, to prevent error message concerning openssl.cnf :
You should fix env var :
OPENSSL_CONF=C:\OpenSSL-Win64\bin\openssl.cfg

for exemple...

Ref :
http://www.erreurs404.net/blog2/openssl-warning-cant-open-config-file-us...