March 3, 2009

Generating SSL certificate without passphrase

Posted in SSL at 3:33 pm by alessiodini

The steps for creating a certificate without passphrase are:


openssl genrsa -des3 -out server.key 1024 => creates a key useful for certificate

Generating RSA private key, 1024 bit long modulus
e is 65537 (0x10001)
Enter pass phrase for server.key:
Verifying – Enter pass phrase for server.key:
[root@sia root]#


openssl rsa -in server.key -out server.pem => used for delete the passphrase

Enter pass phrase for server.key:
writing RSA key
[root@sia root]#


openssl req -new -nodes -key server.pem -out server.csr => as key is passed server.pem that it has no passphrase 🙂

You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter ‘.’, the field will be left blank.
Country Name (2 letter code) [GB]:IT
State or Province Name (full name) [Berkshire]:Lazio
Locality Name (eg, city) [Newbury]:Roma
Organization Name (eg, company) [My Company Ltd]:System01 S.P.A
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server’s hostname) []
Email Address []

Please enter the following ‘extra’ attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
[root@sia root]#


openssl x509 -req -days 365 -in server.csr -signkey server.pem -out server.crt

Signature ok
subject=/C=IT/ST=Lazio/L=Roma/O=System01 S.P.A/OU=Regione Lazio/
Getting Private key
[root@sia root]#


  1. Ravi Anand said,

    Thank you Alessio, 🙂

    • alessiodini said,

      Thank you for visit my blog !!

Leave a Reply

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

You are commenting using your 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

%d bloggers like this: