2016-06-21 107 views

回答

1

明白了。 這是可以做到用:: CertCreateCertificateContext功能:

std::vector<BYTE> certificate; 
// ... acquire DER encoded certificate using i2d_X509() 
// ... 
PCCERT_CONTEXT context = ::CertCreateCertificateContext(
    X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, 
    certificate.data(), 
    certificate.size()); 
// ... 
// ... 
::CertFreeCertificateContext(context); 
相關問題