rem 设置openssl的路径
set OPENSSL_HOME=I:\workspace\openssl\openssl-0.9.7
path=%path%;%OPENSSL_HOME%\out32dll
rem 产生私钥
openssl genrsa -out %1.pem -rand ca\.rand 512
rem 生成自签名公钥
openssl req -new -x509 -days 3650 -key %1.pem -out %1_self.cer -config openssl.cnf
rem 用CA私钥进行签名
openssl ca -ss_cert %1_self.cer -config openssl.cnf -policy policy_anything -out %1.cer
del %1_self.cer
rem 生成pfx文件
openssl pkcs12 -export -in %1.cer -inkey %1.pem -out %1.pfx
pause
posted on 2005-10-24 09:21
夜来风雨声 阅读(262)
评论(0) 编辑 收藏 所属分类:
Server