2

我正在尝试使用 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 并对关键扩展问题选择“是”。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-"

证书昵称信任属性
                                                          SSL,S/MIME,JAR/XPI
myCA CTu,Cu,Cu
4

1 回答 1

1

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

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

于 2010-07-07T18:25:09.117 回答