OpenSSL基础知识:http://www.blogjava.net/yxhxj2006/archive/2012/10/15/389547.html
OpenSSL命令详解:
http://blog.csdn.net/boss666666/article/details/10284649
步骤:
1、安装Win32OpenSSL-1_0_1g,安装过程中如果提示需要安装Visual C++ 2008 Redistributables。那么可以在微软的官网下载。这里我在安装Win32OpenSSL的时候路径为C:\OpenSSL。添加环境变量” OPENSSL_CONF”值为“C:\OpenSSL\bin\openssl.cfg“,或者在后面的生成证书的cmd窗口使用set命令来设置。
2、确保安装了JDK,并将JDK下的keytool.exe所在的文件路径加到path环境变量中去。如果没有,你可以用dmdbms自带的jdk,例如,将c:\dmdbms\jdk\bin加入到path环境变量中去。
3、配置openssl.cfg[U1] 文件
用记事本打开C:\OpenSSL\bin\路径下的openssl.cfg文件,然后在[ CA_default ]一节 修改如下的配置项(红色加粗字体表示手动配置的项,其他的均为默认值)。
[ CA_default ]
dir = ./ca # Where everything is kept ################
certs = $dir/certs # Where the issued certs are kept
crl_dir = $dir/crl # Where the issued crl are kept
database = $dir/index.txt[U2] # database index file. ################
#unique_subject = no # Set to ‘no’ to allow creation of
several ctificates with same subject.
new_certs_dir = $dir/newcerts # default place for new certs. ################
certificate = $dir/private/ca-cert.pem[U3] #The CA certificate ################