简体   繁体   English

如何使用加密 api 获取颁发者证书公钥

[英]How to get issuer certificate public key using crypto api

I need to get the issuer certificate public key for a given certificate (which I receive).我需要获取给定证书(我收到)的颁发者证书公钥。

I read certificate byte and able to get PCCERT_CONTEXT using CertCreateCertificateContext() for leaf certificate.我读取证书字节并能够使用PCCERT_CONTEXT CertCreateCertificateContext()获取叶证书的 PCCERT_CONTEXT。

PCCERT_CONTEXT->pCertInfo->SubjectPublicKeyInfo give me the leaf certificate public key, But I am not able to find a way to get issuer certificate details. PCCERT_CONTEXT->pCertInfo->SubjectPublicKeyInfo给我叶证书公钥,但我无法找到获取颁发者证书详细信息的方法。

Issuer public key can only be obtained from issuer cert and this is not present in leaf cert(received cert)(thanks bartonjs) The solution I have is to build full chain get reach to the signer to get the key or have the issuer certificate obtained from another source (if possible).颁发者公钥只能从颁发者证书中获得,这在叶子证书中不存在(已收到证书)(感谢 bartonjs)我的解决方案是建立完整的链来联系签名者以获取密钥或获得颁发者证书从另一个来源(如果可能)。 In my case, I have another source so I am able to get it.就我而言,我有另一个来源,所以我可以得到它。 thanks for the guidance.感谢您的指导。

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

相关问题 API:Openssl / Wincrypt:无法获取本地发行者证书/不可信的证书 - API: Openssl / Wincrypt : unable to get local issuer certificate / certificate not trusted 如何从 Windows 系统证书库中的证书获取公钥 - How to get the public key from a certificate in windows system certstore 使用Microsoft Crypto API时如何隐藏和使用对话框(Windows证书存储) - How to hide and use dialog boxes when using Microsoft Crypto API (Windows Certificate Store) 无法使用自签名证书在 Windows 上使用 git 解决“无法获取本地颁发者证书” - Unable to resolve "unable to get local issuer certificate" using git on Windows with self-signed certificate 无法在 Azure VM 中获取本地颁发者证书 - unable to get local issuer certificate in Azure VM Ssl证书错误:无法在magento 2中获取本地颁发者证书 - Ssl certificate error: unable to get local issuer certificate on wamp in magento 2 如何在Windows 7上使用下一代Crypto API创建AES持久密钥 - How to create a AES persistent key with Crypto API Next Generation on Windows 7 pycurl https错误:无法获得本地颁发者证书 - pycurl https error: unable to get local issuer certificate Windows,cURL 60 无法获得本地颁发者证书 - Windows, cURL 60 unable to get local issuer certificate 等效的RSA_public_decrypt和MS Crypto API - RSA_public_decrypt and MS Crypto API equivalent
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM