How to Generate a Self-Signed Certificate with OpenSSL

1) Generate a private DSA or RSA key:


<strong>2)</strong> Create a <a href="http://en.wikipedia.org/wiki/X509">X.509</a> public key certificate in <a href="http://en.wikipedia.org/wiki/Privacy_Enhanced_Mail">PEM</a> format with a signature computed with <a href="http://en.wikipedia.org/wiki/MD5">MD5</a> or <a href="http://en.wikipedia.org/wiki/SHA">SHA1</a>:

openssl req -new -x509 -nodes <-md5 | -sha1> -days <Number of Days> -key <Private Key File> <Certificate File>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s