openSSL生成WEB SSL证书
1.使用openSSL生成凭证与私钥:
openssl genrsa -out privatekey.pem 2048
openssl req -new -key privatekey.pem -out cert_req.pem
Country Name (2 letter code) [AU]:cn
State or Province Name (full name) [Some-State]:sh
Locality Name (eg, city) []:sh
Organization Name (eg, company) [Internet Widgits Pty Ltd]:zhang
Organizational Unit Name (eg, section) []:zhang
Common Name (e.g. server FQDN or YOUR name) []:zhang
Email Address []:zhang@xxx.com
2. 使用数字签名算法签名密钥
openssl x509 -sha256 -req -days 365 -in cert_req.pem -signkey privatekey.pem -out sign_cert.pem
并保存签名后的证书公钥文件
3. 自签名ca证书
openssl req -new -x509 -days 365 -key privatekey.pem -out ca_cert.pem
原文地址:https://blog.csdn.net/qq_38202733/article/details/142910465
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!