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

相关推荐
win x21 小时前
深入理解HTTPS协议加密流程
网络协议·http·https
仙俊红21 小时前
从 Filter / Interceptor 到 HTTPS
网络协议·http·https
游戏开发爱好者821 小时前
日常开发与测试的 App 测试方法、查看设备状态、实时日志、应用数据
android·ios·小程序·https·uni-app·iphone·webview
2501_915106321 天前
app 上架过程,安装包准备、证书与描述文件管理、安装测试、上传
android·ios·小程序·https·uni-app·iphone·webview
yixvxi2 天前
RFC 8659:DNS CAA资源记录
服务器·https·ssl
三水不滴2 天前
计算机网络核心网络模型
经验分享·笔记·tcp/ip·计算机网络·http·https
404Clukay2 天前
Windows Server 配置 Let‘s Encrypt 免费 HTTPS 证书(WACS + Nginx 自动化方案)
windows·nginx·https
2501_915918412 天前
在 iOS 环境下查看 App 详细信息与文件目录
android·ios·小程序·https·uni-app·iphone·webview
苦逼IT运维2 天前
Helm 实战指南(四):生产环境 Helm 部署 CVAT 全记录:Ceph 存储、GPU 节点污点调度与 HTTPS 指南
ceph·网络协议·https
2501_915106323 天前
当 Perfdog 开始收费之后,我重新整理了一替代方案
android·ios·小程序·https·uni-app·iphone·webview