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:
- http://sial.org/howto/openssl/self-signed/
- http://www.openssl.org/docs/HOWTO/
- http://technocage.com/~caskey/openssl/
- http://www.openssl.org/docs/apps/req.html#EXAMPLES
- http://www.google.com/search?q=openssl+self-signed+certificate
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
- http://svn.osafoundation.org/m2crypto/trunk/doc/howto.ca.html
- http://sial.org/howto/openssl/ca/
- http://technocage.com/~caskey/openssl/
- http://www.dylanbeattie.net/docs/openssl_iis_ssl_howto.html
Other options
- NewPKI, an open-source PKI with a GUI, based on OpenSSL: http://www.newpki.org/
- SimpleCA: http://www.vpnc.org/SimpleCA/
- Microsoft makecert tool: http://msdn.microsoft.com/en-us/library/aa386968%28VS.85%29.aspx and http://msdn.microsoft.com/en-us/library/bfsktky3.aspx
- Microsoft Certificate Services example: http://www.codeproject.com/KB/WCF/wcf_certificates.aspx
- Java keytool (usually bundled with the JRE): http://www.exampledepot.com/egs/java.security.cert/pkg.html#Certificates and http://java.sun.com/javase/6/docs/technotes/tools/windows/keytool.html