Here is the way to - HOWTO - create a Digital Certificate using OpenSSL software. First of all install OpenSSL on you PC.
Create your Own CA
Then create some directory to be your CA directory (let's call it demoCA)
Now create the following 3 directories in demoCA (requests, certs, and keys) and create the following to files (database.txt, and serial.txt) and open serial.txt and write 01 in it. Also don't forget to copy the file openssl.conf there too.
Now you need to create your CA key:
openssl genrsa -des3 -out keys/ca.key 1024
Create a master certificate based on this key, to use when signing other certificates:
openssl req -config openssl.conf -new -x509 -days 1001 -key keys/ca.key -out certs/ca.cer
Create the Digital Certificate
Generate private key for the certificate:
openssl genrsa -des3 -out keys/foo-key.pem 2048
Create a certificate request:
openssl req -new -key keys/foo-key.pem -out requests/foo-req.csr
Sign the certificate by the CA:
openssl ca -policy policy_anything -config openssl.conf -cert certs/ca.cer -in requests/foo-req.csr -keyfile keys/ca.key -days 3650 -out certs/foo-cert.cer
Convert the certificate format to x509 to be used by Windows Internet Explorer
openssl x509 -in certs/foo-cert.cer -out certs/foo-cert-509.cer
Comments
Post a Comment