将证书导入到受信任的根,但不导入到个人[命令行] [英] Import Certificate to Trusted Root but not to Personal [Command Line]

查看:541
本文介绍了将证书导入到受信任的根,但不导入到个人[命令行]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用命令行将两个证书导入本地计算机.

I am trying to import two certificates to my local machine using the command line.

我有一个证书要添加到本地计算机的个人存储中,另外一个要添加到受信任的根证书颁发机构中.

I have one certificate to add to the Personal Store of the local machine, and another one to add to the Trusted Root Certification Authorities.

这是必须存储到个人存储"而不是在根目录添加的命令:

Here is the command to had to Personal Store and not to add at root:

certutil -f -importpfx CA.pfx NoRoot

certutil -f -importpfx CA.pfx NoRoot

要添加到受信任的根"而不是个人的吗?有标签吗?我在命令帮助中找不到"/?"

And to add at Trusted Root and not personal ? Is there any tag ? I didn't found at command help "/?"

推荐答案

请参阅 certutil的文档. exe -addstore选项.

我尝试了

certutil -addstore "Root" "c:\cacert.cer"

,它运行良好(意味着证书已落在LocalMachine商店的受信任的根"中).

and it worked well (meaning The certificate landed in Trusted Root of LocalMachine store).

如果pfx文件中有多个证书(密钥+相应的证书和CA证书),那么此命令对我来说效果很好:

If there are multiple certificates in a pfx file (key + corresponding certificate and a CA certificate) then this command worked well for me:

certutil -importpfx c:\somepfx.pfx

要将CA证书导入到中级证书颁发机构存储中,请运行以下命令

To import CA certificate to Intermediate Certification Authorities store run following command

certutil -addstore "CA" "c:\intermediate_cacert.cer"

这篇关于将证书导入到受信任的根,但不导入到个人[命令行]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆