Page 1 of 1

openssl Generate a certificate

PostPosted: Mon Mar 16, 2009 11:04 am
by stephen
A RSA key can be used both for encryption and for signing.

Generating a key for the RSA algorithm is quite easy, all you have to
do is the following:

http://www.openssl.org/docs/HOWTO/keys.txt

Code: Select all
openssl genrsa -out privkey.pem 2048


Creating a certificate request
http://www.openssl.org/docs/HOWTO/certificates.txt
Code: Select all
openssl req -new -key privkey.pem -out cert.csr


Creating a self-signed test certificate
Code: Select all
openssl req -new -x509 -key privkey.pem -out cacert.pem -days 1095