生成CA私钥和 自签名证书
#openssl req -newkey rsa:2048 -nodes -keyout ca_rsa_private.key -x509 -days 3650 -out certificate-authorities.pem -subj "/C=CN/ST=GD/L=SZ/O=vihoo/OU=dev/CN=vivo.com/emailAddress=yy@vivo.com"
生成服务器私钥
openssl genrsa -out server-private-key.pem 2048
生成服务器签名请求
openssl req -new -key server-private-key.pem -out server-private-key.csr -subj "/C=CN/ST=GD/L=SZ/O=vihoo/OU=dev/CN=localhost/emailAddress=yy@vivo.com"
用ca的私钥给服务器签名
openssl x509 -req -days 3650 -in server-private-key.csr -CA certificate-authorities.pem -CAkey ca_rsa_private.key -CAcreateserial -out server-certificate-chain.pem
参考:https://blog.csdn.net/gengxiaoming7/article/details/78505107
https://www.cnblogs.com/littleatp/p/5878763.html
阅读(1208) | 评论(0) | 转发(0) |