Openssl
From Notes_Wiki
openssl
Creating self-signed pem certificates for HTTPS
We can create self-signed pem ceritifcates using openssl for HTTPS, SMTPS, etc. using:
openssl req -x509 -nodes -days 9999 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem
The life of certificate is set to 9999 so that it never expires.
Creating certificate request with OpenSSL
To create certificate request with OpenSSL we can use:
openssl genrsa -des3 -out client1.key 2048 openssl req -new -key client1.key -days 365 -out client1.csr
Remember the password supplied while generating key, as that password would be asked whenever we try to generate a new request with the key. Challenge password asked at the end when we create a new certificate request can be left blank.