Mercurial > trustbridge
comparison cinst/windowsstore.c @ 218:8fb12af98960
According to MSDN you Must also provide message encoding flag.
I would not be surprised if both those values are defined 0 :)
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Wed, 26 Mar 2014 20:15:56 +0100 |
parents | 83a015f2e078 |
children | 57bef180d560 |
comparison
equal
deleted
inserted
replaced
217:83a015f2e078 | 218:8fb12af98960 |
---|---|
60 printf ("Error base64 certificate.\n"); | 60 printf ("Error base64 certificate.\n"); |
61 continue; | 61 continue; |
62 } | 62 } |
63 | 63 |
64 pc_to_remove = CertCreateContext (CERT_STORE_CERTIFICATE_CONTEXT, | 64 pc_to_remove = CertCreateContext (CERT_STORE_CERTIFICATE_CONTEXT, |
65 X509_ASN_ENCODING, | 65 X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, |
66 (const PBYTE) asn1_data, | 66 (const PBYTE) asn1_data, |
67 (DWORD) asn1_size, | 67 (DWORD) asn1_size, |
68 0, | 68 0, |
69 NULL); | 69 NULL); |
70 free (asn1_data); /* Windows has a copy */ | 70 free (asn1_data); /* Windows has a copy */ |
78 } | 78 } |
79 continue; | 79 continue; |
80 } | 80 } |
81 | 81 |
82 pCert = CertFindCertificateInStore (hStore, | 82 pCert = CertFindCertificateInStore (hStore, |
83 X509_ASN_ENCODING, | 83 X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, |
84 0, | 84 0, |
85 CERT_FIND_EXISTING, | 85 CERT_FIND_EXISTING, |
86 pc_to_remove, | 86 pc_to_remove, |
87 NULL); | 87 NULL); |
88 | 88 |
135 } | 135 } |
136 | 136 |
137 printf ("Adding cert %s\n", to_install[i]); | 137 printf ("Adding cert %s\n", to_install[i]); |
138 | 138 |
139 ret = CertAddEncodedCertificateToStore (hStore, | 139 ret = CertAddEncodedCertificateToStore (hStore, |
140 X509_ASN_ENCODING, | 140 X509_ASN_ENCODING | PKCS_7_ASN_ENCODING, |
141 (PBYTE) buf, | 141 (PBYTE) buf, |
142 buf_size, | 142 buf_size, |
143 CERT_STORE_ADD_ALWAYS, | 143 CERT_STORE_ADD_ALWAYS, |
144 NULL); | 144 NULL); |
145 | 145 |