openssl生成自签名证书

windows下安装openssl并生成自签名证书的命令如下:

需要注意的是:

  1. 每一级的证书中,证书的公司名称等尽量不要一样

  2. 根证书生成后,2级三级证书生成前,最好重新设置demoCA目录下的serial和index.txt文件中的内容。否则,极容易发生错误。

    openssl genrsa -des3 -out keys/RootCA.key 2048
    openssl req -new -x509 -days 3650 -key keys/RootCA.key -out keys/RootCA.crt

    openssl genrsa -des3 -out keys/secondCA.key 2048
    openssl rsa -in keys/secondCA.key -out keys/secondCA.key
    openssl req -new -days 3650 -key keys/secondCA.key -out keys/secondCA.csr
    openssl ca -extensions v3_ca -in keys/secondCA.csr -config ./cnf/openssl.cnf -days 3650 -out keys/secondCA.crt -cert keys/RootCA.crt -keyfile keys/RootCA.key

    openssl genrsa -des3 -out keys/thirdCA.key 2048
    openssl rsa -in keys/thirdCA.key -out keys/thirdCA.key
    openssl req -new -days 3650 -key keys/thirdCA.key -out keys/thirdCA.csr
    openssl ca -extensions v3_ca -in keys/thirdCA.csr -config ./cnf/openssl.cnf -days 3650 -out keys/thirdCA.crt -cert keys/secondCA.crt -keyfile keys/secondCA.key

    openssl genrsa -des3 -out keys/server.key 2048
    openssl rsa -in keys/server.key -out keys/server.key
    openssl req -new -days 3650 -key keys/server.key -out keys/server.csr
    openssl ca -in keys/server.csr -config ./cnf/openssl.cnf -days 3650 -out keys/server.crt -cert keys/thirdCA.crt -keyfile keys/thirdCA.key

相关推荐
2501_915909061 天前
iOS 项目中常被忽略的 Bundle ID 管理问题
android·ios·小程序·https·uni-app·iphone·webview
2501_915921431 天前
iOS App 测试的工程化实践,多工具协同的一些尝试
android·ios·小程序·https·uni-app·iphone·webview
爆肝疯学大模型1 天前
http转https,免费快速申请证书并实现nginx配置
nginx·http·https
李少兄2 天前
从零开始全面掌握 HTTPS
网络协议·http·https
游戏开发爱好者82 天前
HTTPS DDoS 排查 异常流量到抓包分析
网络协议·ios·小程序·https·uni-app·iphone·ddos
2501_916008892 天前
IOScer 证书到底是什么和怎么使用的完整说明
android·ios·小程序·https·uni-app·iphone·webview
00后程序员张2 天前
iOS 抓包工具实战指南,从代理到数据流,全流程工具分工解析
android·ios·小程序·https·uni-app·iphone·webview
嘻哈baby3 天前
Let‘s Encrypt免费证书与HTTPS配置完全指南
chrome·网络协议·https
深蓝电商API3 天前
爬虫全链路加密传输:HTTPS + 数据AES加密实战
数据库·爬虫·https
清蒸鳜鱼4 天前
腾讯云域名配置HTTPS完整指南:从0到1部署Flask应用
https·flask·腾讯云