[英]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.