# HG changeset patch # User Andre Heinecke # Date 1395861356 -3600 # Node ID 8fb12af98960f63c1fb573cfd3dc1e23c48f764a # Parent 83a015f2e07833efcdd3fa4c35360cc0e442e1c4 According to MSDN you Must also provide message encoding flag. I would not be surprised if both those values are defined 0 :) diff -r 83a015f2e078 -r 8fb12af98960 cinst/windowsstore.c --- a/cinst/windowsstore.c Wed Mar 26 20:14:22 2014 +0100 +++ b/cinst/windowsstore.c Wed Mar 26 20:15:56 2014 +0100 @@ -62,7 +62,7 @@ } pc_to_remove = CertCreateContext (CERT_STORE_CERTIFICATE_CONTEXT, - X509_ASN_ENCODING, + X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, (const PBYTE) asn1_data, (DWORD) asn1_size, 0, @@ -80,7 +80,7 @@ } pCert = CertFindCertificateInStore (hStore, - X509_ASN_ENCODING, + X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, 0, CERT_FIND_EXISTING, pc_to_remove, @@ -137,7 +137,7 @@ printf ("Adding cert %s\n", to_install[i]); ret = CertAddEncodedCertificateToStore (hStore, - X509_ASN_ENCODING, + X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, (PBYTE) buf, buf_size, CERT_STORE_ADD_ALWAYS,