This page provides a few methods to create X509 certificates for testing purposes.
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.
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 |
Commentaires
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...