简体   繁体   English

如何使用C ++在Windows用户存储中添加客户端证书和私钥?

[英]How do I add a Client Certificate and Private Key to the Users Store in Windows with C++?

Basically, the title: How do I add a Client Certificate and Private Key to the Users Store in Windows with C++? 基本上,标题是:如何在使用C ++的Windows中向用户存储添加客户端证书和私钥?

I've found the function PFXImportCertStore which will let me load the cert and private key from a PKCS12 into a temporary cert store but I dont know how to save this store to the users store. 我已经找到了函数PFXImportCertStore ,它将使我可以将PKCS12中的证书和私钥加载到临时证书存储中,但是我不知道如何将该存储保存到用户存储中。 The goal is to add a private key which other applications can access (for example, Outlook). 目标是添加其他应用程序可以访问的私钥(例如,Outlook)。

我需要调用CertAddCertificateContextToStore以将其放入所需的商店中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM