# see http://www.modssl.org/docs/2.8/ssl_reference.html for more info SSLMutex yes #我这里用SSLMutex sem不能工作,不懂 SSLRandomSeed startup builtin SSLSessionCache none
#SSLLog logs/SSL.log #我这里打开就不能工作,不懂 #SSLLogLevel info # You can later change "info" to "warn" if everything is OK
#your ip SSLEngine On SSLCertificateFile "E:/ca/server.crt"#create this file manual SSLCertificateKeyFile "E:/ca/server.key"#create this file manual
Loading 'screen' into random state - done Generating a 1024 bit RSA private key .............................++++++ .............++++++ unable to write 'random state' writing new private key to 'privkey.pem' Enter PEM pass phrase:(此处输入密码,下面要用到) Verifying - Enter PEM pass phrase:(再次输入密码) ----- 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) [AU]:CH State or Province Name (full name) [Some-State]:GuangDong Locality Name (eg, city) []:ZhongShan Organization Name (eg, company) [Internet Widgits Pty Ltd]:ESWN Co Organizational Unit Name (eg, section) []:TestGroup Common Name (eg, YOUR name) []:10.16.131.54 (这里输入你的ip或域名) Email Address []:islqislq@gmail.com
Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []:(这里直接回车) An optional company name []:Digital Technology Company
从专用密钥上删除通行码(这可能会降低服务器安全性,但是方便点)
>openssl rsa -in privkey.pem -out server.key Enter pass phrase for privkey.pem:(输入你上面设置的密码) writing RSA key
建立自签名的证书
Apache_2.0.55-Openssl_0.9.8a-Win32\bin>openssl x509 -in server.csr -out server.crt -req -signkey server.key -days 3650 Loading 'screen' into random state - done Signature ok subject=/C=CH/ST=GuangDong/L=ZhongShan/O=ESWN Co/OU=TestGroup/CN=10.16.131.54/em ailAddress=islqislq@gmail.com Getting Private key