gpt4 book ai didi

linux - 无法创建 SSL 证书

转载 作者:太空狗 更新时间:2023-10-29 12:38:26 25 4
gpt4 key购买 nike

我正在尝试使用 certutil 为运行 Sun Webserver 6.1 的测试 Web 服务器创建自签名证书。如果有人有更好的与 Sun Webserver 一起使用的说明,我愿意使用 keytool 或 openssl。

以下是我使用的命令:

certutil -S -P "https-myWebapp-" -d . -n myCA -s "CN=myWebserver.com CA,OU=myCompany,C=US" -x -t "CT,CT,CT" -m 102 -v 301 -5

然后我选择选项 5 - SSL CA 并对关键扩展问题选择"is"。 CA 创建成功。现在我已经创建了证书颁发机构,我尝试使用以下命令签署实际证书:

certutil -S -P "https-myWebapp-" -d . -n myServer -s "CN=myWebserver.com,C=US" -c myCA -t "u,u,u"  -m 102 -v 300 -5

在 certutil 提示符下,我选择选项 1 来创建启用关键扩展的 SSL 服务器。这会产生以下错误:

certutil: could not obtain certificate from file: You are attempting to import a cert with the same issuer/serial as an existing cert, but that is not the same cert.

我做错了什么?我认为我的 SSL 证书可能失败,但在运行 certutil -L -d 时我得到以下信息。 -P "https-myWebapp-"

Certificate Nickname                                      Trust Attributes                                                          SSL,S/MIME,JAR/XPImyCA                                                      CTu,Cu,Cu

最佳答案

在第二个命令中,我需要将 -m 属性更改为新的序列号。

修复了错误消息并创建了证书。

关于linux - 无法创建 SSL 证书,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3195939/

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