Preparation of using OpenSSL

来源:百度文库 编辑:神马文学网 时间:2024/04/29 16:11:56
EnvSetup
Create a working directory called c:\ssl
Create three sub folders named as keys, requests and certs under c:\ssl.
Drop the openssl.conf into the working folder, c:\ssl.
Create an empty database.txt in working directory.
Create the serial number file serial.txt in working directory. This is a plain ASCII file containing the string "01" on the first line, followed by a newline.
Setup aCA
Generate CA‘s private key (rsa, des, 1024b).
c:\ssl\openssl genrsa -des3-out keys/ca.key 1024
Meanwhile you need to provide a pass phrase for this privatekey.
The generated key file is in PEM format ???
Create a CA certificate based on this private key in c:\ssl\certs folder.
C:\ssl>openssl req -configopenssl.conf -new -x509 -days 1001 -key keys/ca.key -out certs/ca.cer
The ca.cer is also in PEM format.