gpt4 book ai didi

ssl - 使用 openssl 创建由中间证书签名的新 TLS 证书

转载 作者:太空宇宙 更新时间:2023-11-03 14:35:02 25 4
gpt4 key购买 nike

我有一个我拥有的可信中间 key 和证书(PEM 文件),我想为我的负载均衡器创建一个由它签名的证书。

这是如何使用 openssl 完成的?

最佳答案

假设您已经拥有如下的根 key /证书对文件:

.
root-cert.pem
root-key.pem


以下是生成可用于服务器的面向公众的证书的步骤。首先,创建一个新的私钥:

openssl genrsa -out my.key.pem 2048

接下来,使用新 key 创建证书签名请求 CSR:

openssl req -new -sha256 -key ./my.key.pem -out ./my.csr

第三,创建您签名的公共(public)证书(有效期为 1 年)!

openssl x509 -req -in my.csr -CA root-cert.pem -CAkey root-key.pem -CAcreateserial -out my.crt.pem -days 365 -sha256

关于ssl - 使用 openssl 创建由中间证书签名的新 TLS 证书,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48753624/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com