如何获取PFX密钥的容器名称? [英] How to get Container name for PFX key?

查看:390
本文介绍了如何获取PFX密钥的容器名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

前一段时间,我使用如下命令将我的PFX密钥安装到Container中:

Some time ago I installed my PFX key into Container using command like this:

sn -i mykey.pfx VS_XXX

如何得到比名字回来?

but two months later I forgot the Container name (VS_XXX), so my question is: How to get than name back? I know key name, I have this key, I know the key pass phrase.

推荐答案

下载 Keypal 实用程序,然后双击它,您将找到密钥容器的所有名称。您可以在用户个人资料和机器配置文件之间进行选择。

Download the Keypal utility and double click it, you will find all the names of the key containers. You can choose between user profile and machine profile.

或者,枚举证书库以通过其主题查找感兴趣的证书,然后您可以使用 CertGetCertificateContextProperty 获取 PCERT_KEY_PROV_INFO_PROP_ID 的值。这种方法需要使用Microsoft的cryptoAPI

Alternatively, enumerate the certificate store to find the certificate of interest via its subject and then you can use CertGetCertificateContextProperty to get the value for PCERT_KEY_PROV_INFO_PROP_ID. This approach requires the use of Microsoft's cryptoAPI

这篇关于如何获取PFX密钥的容器名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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