Create a self signed certificate with OpenSSL

To create a self signed cert with OpenSSL, execute the following:

openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days 100

In some cases its useful to remove the passphrase from the key. This way you will not be prompt for the passphrase every time it starts.
Removing the passphrase is easy, simply run this following command:

openssl rsa -in key.pem -out newkey.pem && mv newkey.pem key.pem

You may also like...

Leave a Reply