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

相关推荐
yixvxi1 天前
RFC 8659:DNS CAA资源记录
服务器·https·ssl
三水不滴1 天前
计算机网络核心网络模型
经验分享·笔记·tcp/ip·计算机网络·http·https
404Clukay1 天前
Windows Server 配置 Let‘s Encrypt 免费 HTTPS 证书(WACS + Nginx 自动化方案)
windows·nginx·https
2501_915918411 天前
在 iOS 环境下查看 App 详细信息与文件目录
android·ios·小程序·https·uni-app·iphone·webview
苦逼IT运维1 天前
Helm 实战指南(四):生产环境 Helm 部署 CVAT 全记录:Ceph 存储、GPU 节点污点调度与 HTTPS 指南
ceph·网络协议·https
2501_915106322 天前
当 Perfdog 开始收费之后,我重新整理了一替代方案
android·ios·小程序·https·uni-app·iphone·webview
2501_915918412 天前
中小团队发布,跨平台 iOS 上架,证书、描述文件创建管理,测试分发一体化方案
android·ios·小程序·https·uni-app·iphone·webview
JoySSLLian2 天前
IP SSL证书是什么?为何它是保障IP通信安全的关键?
网络协议·tcp/ip·https·ssl
2501_915106322 天前
iOS 如何绕过 ATS 发送请求,iOS调试
android·ios·小程序·https·uni-app·iphone·webview
2501_915918413 天前
常见 iOS 抓包工具的使用,从代理抓包、设备抓包到数据流抓包
android·ios·小程序·https·uni-app·iphone·webview