获取给定证书的颁发 CA
我有一个 PCCERT_CONTEXT 类型的变量,其中包含一个证书(这实际上是给定可执行文件的数字签名者的证书。)我需要获取证书或至少获取颁发 CA 的名称。我尝试过使用 CertOpenStore 和 WTHelperCertFindIssuerCertificate,但没有成功。我将不胜感激任何帮助。
问候,
阿里雷扎
I have a variable of type PCCERT_CONTEXT which contains a certificate (this is actually the certificate of the digital signer of a given executable file.) I need to get the certificate or at least the name of the issuing CA. I've tried using CertOpenStore and WTHelperCertFindIssuerCertificate, but have had no success. I would appreciate any help.
Regards,
Alireza
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
也许 CertGetIssuerCertificateFromStore() ?
Maybe CertGetIssuerCertificateFromStore()?
您可能需要 CertGetCertificateChain http://msdn.microsoft.com /en-us/library/aa376078(VS.85).aspx
You probably want CertGetCertificateChain http://msdn.microsoft.com/en-us/library/aa376078(VS.85).aspx
CERT_CONTEXT 包含 CERT_INFO 结构。
CERT_INFO 结构包含一个指向颁发者的指针,作为 CERT_NAME_BLOB。
The CERT_CONTEXT contains the CERT_INFO structure.
The CERT_INFO structure contains a pointer to the Issuer as a CERT_NAME_BLOB.