不废话,命令行展示
cd C:\\openSSLTest2
set RANDFILE=C:\\openSSLTest2\\.rnd
set OPENSSL_CONF=C:\\openSSLTest2\\openssl.cnf
openssl genrsa -out C:\cert\localhostapp-key.pem 4096 -config openssl.cnf
openssl req -new -out C:\cert\localhostapp-req.csr -key C:\cert\localhostapp-key.pem -config openssl.cnf -subj "/C=CN/ST=Beijing/L=Beijing/O=Beijing Huaxing Chenghui Cultural Development Co., Ltd./OU=com.cccollector.appmanagement/CN=zhangxuewen~3~12" &&
openssl x509 -req -in C:\cert\localhostapp-req.csr -out C:\cert\localhostapp-certificate.pem -signkey C:\cert\localhostapp-key.pem -CA C:\cert\49_rootCertificate.pem -CAkey C:\cert\49_rootKey.pem -CAcreateserial -days 365
openssl pkcs8 -topk8 -nocrypt -in C:\cert\localhostapp-key.pem -out C:\cert\localhostapp_key_pkcs8.pem
type C:\cert\localhostapp_key_pkcs8.pem C:\cert\localhostapp-certificate.pem > C:\cert\localhostapp_certificateWithKey.pem
o