使用-is标志时,makecert.exe错误地报告重复的证书

我创build了一个自签名证书,然后加载到“受信任的根证书颁发机构”文件夹中。 此证书充当我工作站上网站的可信根。 我正在使用makecert.exe为每个网站和我在本地托pipe的API创build根证书颁发的证书。 一切工作正常,直到我导入我的登台环境的自签署受信任的根证书到我的工作站。 我现在有两个证书的通用名称确实是不同的。MMC中每个证书的Issuer属性:

 CN = MyComp Inc. Root Certificate Authority CN = MyComp Inc. Root Certificate Authority - Staging 

只要我导入我的临时证书, makecert.exe开始失败,出现此错误:

 There are more than one matching certificate in the issuer's Root cert store 

这里是确切的makecert.exe命令行:

 makecert.exe -pe -ss My -sr LocalMachine -n "CN=mysite.local, OU=Development" -is Root -ir LocalMachine -in "MyComp Inc. Root Certificate Authority" -sp "Microsoft RSA SChannel Cryptographic Provider" -sy 12 -a sha512 -e "01/01/2020" -sky exchange -eku 1.3.6.1.5.5.7.3.1 

在我看来, makecert.exe在search与-is参数中的指定公用名相匹配的证书时,似乎正在执行“contains”,而不是完全匹配。

有没有解决这个问题的方法? 难道我做错了什么?