36 #define CERT_CERT_PROP_ID 32 37 #define CERT_CRL_PROP_ID 33 38 #define CERT_CTL_PROP_ID 34 48 static const BYTE bigCert[] = { 0x30, 0x7a, 0x02, 0x01, 0x01, 0x30, 0x02, 0x06,
49 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13,
50 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x22,
51 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30,
52 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30,
53 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, 0x15, 0x31, 0x13, 0x30,
54 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20,
55 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x07, 0x30, 0x02, 0x06, 0x00, 0x03, 0x01,
56 0x00, 0xa3, 0x16, 0x30, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01,
57 0x01, 0xff, 0x04, 0x08, 0x30, 0x06, 0x01, 0x01, 0xff, 0x02, 0x01, 0x01 };
59 0x30, 0x81, 0x93, 0x30, 0x7a, 0x02, 0x01, 0x01, 0x30, 0x02, 0x06, 0x00, 0x30,
60 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x4a,
61 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x22, 0x18, 0x0f,
62 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30,
63 0x30, 0x5a, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30,
64 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06,
65 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61,
66 0x6e, 0x67, 0x00, 0x30, 0x07, 0x30, 0x02, 0x06, 0x00, 0x03, 0x01, 0x00, 0xa3,
67 0x16, 0x30, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff,
68 0x04, 0x08, 0x30, 0x06, 0x01, 0x01, 0xff, 0x02, 0x01, 0x01, 0x30, 0x02, 0x06,
69 0x00, 0x03, 0x11, 0x00, 0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x07,
70 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00 };
72 0x01, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x30, 0x7a, 0x02, 0x01, 0x01,
73 0x30, 0x02, 0x06, 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55,
74 0x04, 0x03, 0x13, 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67,
75 0x00, 0x30, 0x22, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31,
76 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31,
77 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, 0x15,
78 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x4a, 0x75,
79 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x07, 0x30, 0x02, 0x06,
80 0x00, 0x03, 0x01, 0x00, 0xa3, 0x16, 0x30, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55,
81 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x08, 0x30, 0x06, 0x01, 0x01, 0xff, 0x02,
83 static const BYTE signedCRL[] = { 0x30, 0x45, 0x30, 0x2c, 0x30, 0x02, 0x06,
84 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13,
85 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x18, 0x0f,
86 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30,
87 0x30, 0x5a, 0x30, 0x02, 0x06, 0x00, 0x03, 0x11, 0x00, 0x0f, 0x0e, 0x0d, 0x0c,
88 0x0b, 0x0a, 0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00 };
89 static const BYTE bigCert2[] = { 0x30, 0x7a, 0x02, 0x01, 0x01, 0x30, 0x02, 0x06,
90 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13,
91 0x0a, 0x41, 0x6c, 0x65, 0x78, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x22,
92 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30,
93 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30,
94 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, 0x15, 0x31, 0x13, 0x30,
95 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x41, 0x6c, 0x65, 0x78, 0x20,
96 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x07, 0x30, 0x02, 0x06, 0x00, 0x03, 0x01,
97 0x00, 0xa3, 0x16, 0x30, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01,
98 0x01, 0xff, 0x04, 0x08, 0x30, 0x06, 0x01, 0x01, 0xff, 0x02, 0x01, 0x01 };
100 0x30,0x82,0x01,0x0f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,
101 0xa0,0x82,0x01,0x00,0x30,0x81,0xfd,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,
102 0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x30,0x06,0x09,
103 0x2b,0x06,0x01,0x04,0x01,0x82,0x37,0x0a,0x01,0xa0,0x23,0x30,0x21,0x30,0x00,
104 0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,
105 0x30,0x5a,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,
106 0x00,0x31,0x81,0xb5,0x30,0x81,0xb2,0x02,0x01,0x01,0x30,0x1a,0x30,0x15,0x31,
107 0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,
108 0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,
109 0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0xa0,0x3b,0x30,0x18,0x06,0x09,0x2a,0x86,
110 0x48,0x86,0xf7,0x0d,0x01,0x09,0x03,0x31,0x0b,0x06,0x09,0x2b,0x06,0x01,0x04,
111 0x01,0x82,0x37,0x0a,0x01,0x30,0x1f,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,
112 0x01,0x09,0x04,0x31,0x12,0x04,0x10,0x54,0x71,0xbc,0xe1,0x56,0x31,0xa2,0xf9,
113 0x65,0x70,0x34,0xf8,0xe2,0xe9,0xb4,0xf4,0x30,0x04,0x06,0x00,0x05,0x00,0x04,
114 0x40,0x2f,0x1b,0x9f,0x5a,0x4a,0x15,0x73,0xfa,0xb1,0x93,0x3d,0x09,0x52,0xdf,
115 0x6b,0x98,0x4b,0x13,0x5e,0xe7,0xbf,0x65,0xf4,0x9c,0xc2,0xb1,0x77,0x09,0xb1,
116 0x66,0x4d,0x72,0x0d,0xb1,0x1a,0x50,0x20,0xe0,0x57,0xa2,0x39,0xc7,0xcd,0x7f,
117 0x8e,0xe7,0x5f,0x76,0x2b,0xd1,0x6a,0x82,0xb3,0x30,0x25,0x61,0xf6,0x25,0x23,
118 0x57,0x6c,0x0b,0x47,0xb8 };
120 #define test_store_is_empty(store) _test_store_is_empty(__LINE__,store) 139 "Expected ERROR_FILE_NOT_FOUND, got %d\n",
GetLastError());
144 "Expected ERROR_CALL_NOT_IMPLEMENTED, got %d\n",
GetLastError());
154 ok(store1 != store2,
"Expected different stores\n");
167 "Expected CRYPT_E_ASN1_EOD or CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08x\n",
179 "Wrong cert size %d\n",
context->cbCertEncoded);
181 sizeof(
signedBigCert)),
"Unexpected encoded cert in context\n");
184 ok(
ret,
"CertDeleteCertificateFromStore failed: %08x\n",
193 "Expected CRYPT_E_ASN1_BADTAG or CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08x\n",
206 "Wrong cert size %d\n",
context->cbCertEncoded);
208 "Unexpected encoded cert in context\n");
209 ok(
context->hCertStore == store1,
"Unexpected store\n");
219 ok(
ret,
"CertSerializeCertificateStoreElement failed: %08x\n",
228 "Unexpected serialized cert\n");
240 "Expected CRYPT_E_NOT_FOUND, got %08x\n",
GetLastError());
243 ok(!
context,
"Expected an empty store\n");
257 ok(
copy !=
NULL,
"CertDuplicateCertificateContext failed: %08x\n",
260 ok(
ret,
"CertDeleteCertificateFromStore failed: %08x\n",
264 ok(
ret,
"CertDeleteCertificateFromStore failed: %08x\n",
268 ok(!
context,
"Expected an empty store\n");
293 "Wrong cert size %d\n",
context->cbCertEncoded);
295 "Unexpected encoded cert in context\n");
296 ok(
context->hCertStore == store1,
"Unexpected store\n");
298 ok(
ret,
"CertDeleteCertificateFromStore failed: %08x\n",
329 0x00,0x00,0x00,0x00,0x43,0x45,0x52,0x54,0x20,0x00,0x00,0x00,0x01,0x00,0x00,
330 0x00,0x7c,0x00,0x00,0x00,0x30,0x7a,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,
331 0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,
332 0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,
333 0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,
334 0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,
335 0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,
336 0x20,0x4c,0x61,0x6e,0x67,0x00,0x30,0x07,0x30,0x02,0x06,0x00,0x03,0x01,0x00,
337 0xa3,0x16,0x30,0x14,0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,
338 0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
339 0x00,0x00,0x00,0x00,0x00,0x00 };
370 {
'%',
's',
'\\',
'%',
's',
'\\',
'%',
's',
'\\',
'%',
's',0},
372 {
'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
'\\',
'S',
'y',
's',
't',
'e',
'm',
'C',
'e',
'r',
't',
'i',
'f',
'i',
'c',
'a',
't',
'e',
's',0},
374 {
'C',
'e',
'r',
't',
'i',
'f',
'i',
'c',
'a',
't',
'e',
's',0},
376 '6',
'E',
'3',
'0',
'9',
'0',
'7',
'1',
'5',
'F',
'D',
'9',
'2',
'3',
377 '5',
'6',
'E',
'B',
'A',
'E',
'2',
'5',
'4',
'0',
'E',
'6',
'2',
'2',
378 'D',
'A',
'1',
'9',
'2',
'6',
'0',
'2',
'A',
'6',
'0',
'8',0};
399 skip(
"Insufficient privileges for the test %d\n",
i);
411 skip(
"Insufficient privileges for the test %d\n",
i);
414 ok (
ret,
"Adding to the store failed at %d, %x\n",
i,
err);
430 "Failed to get app data path at %d (%x)\n", pathres,
GetLastError());
441 "Cert was not saved in AppData at %d (%x)\n",
i,
GetLastError());
466 ok (
res,
"The cert's registry entry should be absent at %i, %x\n",
i,
GetLastError());
474 "Cert should have been absent in AppData %d\n",
i);
489 static const WCHAR WineTestRO_W[] = {
'W',
'i',
'n',
'e',
'T',
'e',
's',
't',
'_',
'R',
'O',0 },
490 WineTestRW_W[] = {
'W',
'i',
'n',
'e',
'T',
'e',
's',
't',
'_',
'R',
'W',0 },
491 WineTestRW2_W[]= {
'W',
'i',
'n',
'e',
'T',
'e',
's',
't',
'_',
'R',
'W',
'2',0 };
508 ok (!
ret,
"Added cert to collection with single read-only store %x\n",
GetLastError());
522 ok (!tcert1,
"Read-only ro_store contains cert\n");
526 "Unexpected cert in the rw store\n");
531 "Unexpected cert in the collection\n");
548 ok (tcert1 ==
NULL,
"Read-only store not empty\n");
552 "Unexpected cert in the rw_store\n");
557 "Unexpected cert in the rw_store_2\n");
563 "cert2 expected in the collection got %p, %x\n",tcert1,
GetLastError());
566 "cert1 expected in the collection got %p, %x\n",tcert1,
GetLastError());
573 ok (tstore!=
NULL,
"Failed to open existing rw store\n");
582 ok (tstore!=
NULL,
"Failed to open existing rw2 store\n");
599 "Unexpected cert in store %p\n", tcert1);
607 "Unexpected cert in store %p\n", tcert1);
627 static const WCHAR szPrefix[] = {
'c',
'e',
'r',0 };
699 ok(
context->hCertStore == store2,
"Unexpected store\n");
711 "Wrong size %d\n",
context->cbCertEncoded);
713 "Unexpected cert\n");
720 "Wrong size %d\n",
context->cbCertEncoded);
722 context->cbCertEncoded),
"Unexpected cert\n");
735 "Wrong size %d\n",
context->cbCertEncoded);
737 "Unexpected cert\n");
744 "Wrong size %d\n",
context->cbCertEncoded);
746 context->cbCertEncoded),
"Unexpected cert\n");
763 ok(
context->hCertStore == collection2,
"Unexpected store\n");
765 "Wrong size %d\n",
context->cbCertEncoded);
767 "Unexpected cert\n");
772 ok(
context->hCertStore == collection2,
"Unexpected store\n");
774 "Wrong size %d\n",
context->cbCertEncoded);
776 context->cbCertEncoded),
"Unexpected cert\n");
827 "Wrong size %d\n",
context->cbCertEncoded);
829 "Unexpected cert\n");
836 "Wrong size %d\n",
context->cbCertEncoded);
838 "Unexpected cert\n");
876 "Wrong size %d\n",
context->cbCertEncoded);
878 "Unexpected cert\n");
894 "Didn't expect an error to be set: %08x\n",
GetLastError());
900 "Didn't expect an error to be set: %08x\n",
GetLastError());
945 "expected ERROR_CALL_NOT_IMPLEMENTED, got %d\n",
GetLastError());
970 ok(
ret,
"CertAddEncodedCertificateToStore failed: %08x\n",
973 ok(
ret,
"CertControlStore failed: %d\n",
ret);
990 while (
size && !
ret && !failed)
1017 static const char tempKey[] =
"Software\\Wine\\CryptTemp";
1026 "Expected ERROR_INVALID_HANDLE or ERROR_BADKEY, got %d\n",
GLE);
1030 "Expected ERROR_INVALID_HANDLE or ERROR_BADKEY, got %d\n",
GLE);
1042 ok(!rc,
"RegCreateKeyExA failed: %d\n", rc);
1048 static const char certificates[] =
"Certificates\\";
1049 char subKeyName[
sizeof(certificates) + 20 * 2 + 1], *
ptr;
1060 ok(
ret,
"CertAddEncodedCertificateToStore failed: %08x\n",
1070 strcpy(subKeyName, certificates);
1071 for (
i = 0,
ptr = subKeyName +
sizeof(certificates) - 1;
i <
size;
1076 ok(!rc,
"RegCreateKeyExA failed: %d\n", rc);
1087 ok(!rc,
"RegQueryValueExA failed: %d\n", rc);
1094 ok(
hdr !=
NULL,
"Expected to find a cert property\n");
1098 "Wrong size %d of cert property\n",
hdr->cb);
1100 hdr->cb),
"Unexpected cert in cert property\n");
1103 ok(
hdr !=
NULL,
"Expected to find a hash property\n");
1107 "Wrong size %d of hash property\n",
hdr->cb);
1109 hdr->cb),
"Unexpected hash in cert property\n");
1127 strcpy(subKeyName, certificates);
1128 for (
i = 0,
ptr = subKeyName +
sizeof(certificates) - 1;
1133 ok(!rc,
"RegCreateKeyExA failed: %d\n", rc);
1138 DWORD certCount = 0;
1145 ptr =
buf +
sizeof(*hdr);
1152 ptr +=
sizeof(*hdr);
1157 ok(!rc,
"RegSetValueExA failed: %d\n", rc);
1170 ok(certCount == 1,
"Expected 1 certificates, got %d\n", certCount);
1182 strcpy(subKeyName, certificates);
1183 for (
i = 0,
ptr = subKeyName +
sizeof(certificates) - 1;
1188 ok(!rc,
"RegCreateKeyExA failed: %d\n", rc);
1193 DWORD certCount = 0;
1202 ptr =
buf +
sizeof(*hdr);
1209 ptr +=
sizeof(*hdr);
1214 ok(!rc,
"RegSetValueExA failed: %d\n", rc);
1227 ok(certCount == 1,
"Expected 1 certificate, got %d\n", certCount);
1230 ptr =
buf +
sizeof(*hdr);
1235 ok(!rc,
"RegSetValueExA failed: %d\n", rc);
1248 ok(certCount == 2,
"Expected 2 certificates, got %d\n", certCount);
1256 ok(store ==
NULL,
"Expected NULL return from CERT_STORE_DELETE_FLAG\n");
1267 ok(!rc,
"RegCreateKeyExA failed: %d\n", rc);
1269 "Expected REG_OPENED_EXISTING_KEY, got %d\n", disp);
1284 static const char MyA[] = {
'M',
'y',0,0 };
1288 'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
'\\',
'S',
'y',
's',
't',
'e',
'm',
'C',
'e',
'r',
1289 't',
'i',
'f',
'i',
'c',
'a',
't',
'e',
's',
'\\',
'B',
'o',
'g',
'u',
's',0 };
1319 "Expected ERROR_FILE_NOT_FOUND, got %08x\n",
GetLastError());
1346 "Expected ERROR_FILE_NOT_FOUND, got %08x\n",
GetLastError());
1351 static const WCHAR baskslashW[] = {
'\\',0 };
1359 "Expected ERROR_FILE_NOT_FOUND, got %08x\n",
GetLastError());
1363 "Expected ERROR_FILE_NOT_FOUND, got %08x\n",
GetLastError());
1367 "Expected ERROR_FILE_NOT_FOUND, got %08x\n",
GetLastError());
1372 "Expected ERROR_FILE_NOT_FOUND, got %08x\n",
GetLastError());
1379 ok(!rc,
"RegCreateKeyEx failed: %d\n", rc);
1386 "Expected ERROR_FILE_EXISTS, got %08x\n",
GetLastError());
1409 ok(!store,
"Expected ERROR_FILE_NOT_FOUND, got %08x\n",
GetLastError());
1418 ok(!store,
"Didn't expect a store to be returned when deleting\n");
1423 0x00,0x00,0x00,0x00,0x43,0x45,0x52,0x54,0x20,0x00,0x00,0x00,0x01,0x00,0x00,
1424 0x00,0x7c,0x00,0x00,0x00,0x30,0x7a,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,
1425 0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,
1426 0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,
1427 0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,
1428 0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,
1429 0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,
1430 0x20,0x4c,0x61,0x6e,0x67,0x00,0x30,0x07,0x30,0x02,0x06,0x00,0x03,0x01,0x00,
1431 0xa3,0x16,0x30,0x14,0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,
1432 0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x01,0x21,0x00,0x00,0x00,0x01,0x00,
1433 0x00,0x00,0x47,0x00,0x00,0x00,0x30,0x45,0x30,0x2c,0x30,0x02,0x06,0x00,0x30,
1434 0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,
1435 0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,
1436 0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x02,0x06,0x00,0x03,0x11,
1437 0x00,0x0f,0x0e,0x0d,0x0c,0x0b,0x0a,0x09,0x08,0x07,0x06,0x05,0x04,0x03,0x02,
1438 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
1442 static const WCHAR szPrefix[] = {
'c',
'e',
'r',0 };
1452 "Expected ERROR_INVALID_HANDLE, got %08x\n",
GetLastError());
1483 ok(
ret,
"CertAddEncodedCertificateToStore failed: %d\n",
ret);
1487 "Expected ERROR_CALL_NOT_IMPLEMENTED, got %08x\n",
GetLastError());
1490 ok(
cert !=
NULL,
"CertEnumCertificatesInStore failed: %08x\n",
1495 ok(
size == 0,
"Expected size 0, got %d\n",
size);
1508 ok(
ret,
"CertAddEncodedCertificateToStore failed: %d\n",
ret);
1511 "Expected ERROR_CALL_NOT_IMPLEMENTED, got %08x\n",
GetLastError());
1523 ok(
ret,
"CertAddEncodedCertificateToStore failed: %d\n",
ret);
1526 "Expected ERROR_CALL_NOT_IMPLEMENTED, got %08x\n",
GetLastError());
1537 ok(
ret,
"CertAddEncodedCertificateToStore failed: %08x\n",
1541 ok(
ret,
"CertControlStore failed: %d\n",
ret);
1559 compareStore(store,
"serialized store with cert and CRL",
1587 "MIICJQYJKoZIhvcNAQcCoIICFjCCAhICAQExADALBgkqhkiG9w0BBwGgggH6MIIB" 1588 "9jCCAV+gAwIBAgIQnP8+EF4opr9OxH7h4uBPWTANBgkqhkiG9w0BAQQFADAUMRIw" 1589 "EAYDVQQDEwlKdWFuIExhbmcwHhcNMDgxMjEyMTcxMDE0WhcNMzkxMjMxMjM1OTU5" 1590 "WjAUMRIwEAYDVQQDEwlKdWFuIExhbmcwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJ" 1591 "AoGBALCgNjyNvOic0FOfjxvi43HbM+D5joDkhiGSXe+gbZlf8f16k07kkObFEunz" 1592 "mdB5coscmA7gyqiWNN4ZUyr2cA3lCbnpGPA/0IblyyOcuGIFmmCzeZaVa5ZG6xZP" 1593 "K7L7o+73Qo6jXVbGhBGnMZ7Q9sAn6s2933olnStnejnqwV0NAgMBAAGjSTBHMEUG" 1594 "A1UdAQQ+MDyAEFKbKEdXYyx+CWKcV6vxM6ShFjAUMRIwEAYDVQQDEwlKdWFuIExh" 1595 "bmeCEJz/PhBeKKa/TsR+4eLgT1kwDQYJKoZIhvcNAQEEBQADgYEALpkgLgW3mEaK" 1596 "idPQ3iPJYLG0Ub1wraqEl9bd42hrhzIdcDzlQgxnm8/5cHYVxIF/C20x/HJplb1R" 1597 "G6U1ipFe/q8byWD/9JpiBKMGPi9YlUTgXHfS9d4S/QWO1h9Z7KeipBYhoslQpHXu" 1598 "y9bUr8Adqi6SzgHpCnMu53dxgxUD1r4xAA==";
1601 'M',
'I',
'I',
'C',
'J',
'Q',
'Y',
'J',
'K',
'o',
'Z',
'I',
'h',
'v',
'c',
'N',
'A',
1602 'Q',
'c',
'C',
'o',
'I',
'I',
'C',
'F',
'j',
'C',
'C',
'A',
'h',
'I',
'C',
'A',
'Q',
1603 'E',
'x',
'A',
'D',
'A',
'L',
'B',
'g',
'k',
'q',
'h',
'k',
'i',
'G',
'9',
'w',
'0',
1604 'B',
'B',
'w',
'G',
'g',
'g',
'g',
'H',
'6',
'M',
'I',
'I',
'B',
'9',
'j',
'C',
'C',
1605 'A',
'V',
'+',
'g',
'A',
'w',
'I',
'B',
'A',
'g',
'I',
'Q',
'n',
'P',
'8',
'+',
'E',
1606 'F',
'4',
'o',
'p',
'r',
'9',
'O',
'x',
'H',
'7',
'h',
'4',
'u',
'B',
'P',
'W',
'T',
1607 'A',
'N',
'B',
'g',
'k',
'q',
'h',
'k',
'i',
'G',
'9',
'w',
'0',
'B',
'A',
'Q',
'Q',
1608 'F',
'A',
'D',
'A',
'U',
'M',
'R',
'I',
'w',
'E',
'A',
'Y',
'D',
'V',
'Q',
'Q',
'D',
1609 'E',
'w',
'l',
'K',
'd',
'W',
'F',
'u',
'I',
'E',
'x',
'h',
'b',
'm',
'c',
'w',
'H',
1610 'h',
'c',
'N',
'M',
'D',
'g',
'x',
'M',
'j',
'E',
'y',
'M',
'T',
'c',
'x',
'M',
'D',
1611 'E',
'0',
'W',
'h',
'c',
'N',
'M',
'z',
'k',
'x',
'M',
'j',
'M',
'x',
'M',
'j',
'M',
1612 '1',
'O',
'T',
'U',
'5',
'W',
'j',
'A',
'U',
'M',
'R',
'I',
'w',
'E',
'A',
'Y',
'D',
1613 'V',
'Q',
'Q',
'D',
'E',
'w',
'l',
'K',
'd',
'W',
'F',
'u',
'I',
'E',
'x',
'h',
'b',
1614 'm',
'c',
'w',
'g',
'Z',
'8',
'w',
'D',
'Q',
'Y',
'J',
'K',
'o',
'Z',
'I',
'h',
'v',
1615 'c',
'N',
'A',
'Q',
'E',
'B',
'B',
'Q',
'A',
'D',
'g',
'Y',
'0',
'A',
'M',
'I',
'G',
1616 'J',
'A',
'o',
'G',
'B',
'A',
'L',
'C',
'g',
'N',
'j',
'y',
'N',
'v',
'O',
'i',
'c',
1617 '0',
'F',
'O',
'f',
'j',
'x',
'v',
'i',
'4',
'3',
'H',
'b',
'M',
'+',
'D',
'5',
'j',
1618 'o',
'D',
'k',
'h',
'i',
'G',
'S',
'X',
'e',
'+',
'g',
'b',
'Z',
'l',
'f',
'8',
'f',
1619 '1',
'6',
'k',
'0',
'7',
'k',
'k',
'O',
'b',
'F',
'E',
'u',
'n',
'z',
'm',
'd',
'B',
1620 '5',
'c',
'o',
's',
'c',
'm',
'A',
'7',
'g',
'y',
'q',
'i',
'W',
'N',
'N',
'4',
'Z',
1621 'U',
'y',
'r',
'2',
'c',
'A',
'3',
'l',
'C',
'b',
'n',
'p',
'G',
'P',
'A',
'/',
'0',
1622 'I',
'b',
'l',
'y',
'y',
'O',
'c',
'u',
'G',
'I',
'F',
'm',
'm',
'C',
'z',
'e',
'Z',
1623 'a',
'V',
'a',
'5',
'Z',
'G',
'6',
'x',
'Z',
'P',
'K',
'7',
'L',
'7',
'o',
'+',
'7',
1624 '3',
'Q',
'o',
'6',
'j',
'X',
'V',
'b',
'G',
'h',
'B',
'G',
'n',
'M',
'Z',
'7',
'Q',
1625 '9',
's',
'A',
'n',
'6',
's',
'2',
'9',
'3',
'3',
'o',
'l',
'n',
'S',
't',
'n',
'e',
1626 'j',
'n',
'q',
'w',
'V',
'0',
'N',
'A',
'g',
'M',
'B',
'A',
'A',
'G',
'j',
'S',
'T',
1627 'B',
'H',
'M',
'E',
'U',
'G',
'A',
'1',
'U',
'd',
'A',
'Q',
'Q',
'+',
'M',
'D',
'y',
1628 'A',
'E',
'F',
'K',
'b',
'K',
'E',
'd',
'X',
'Y',
'y',
'x',
'+',
'C',
'W',
'K',
'c',
1629 'V',
'6',
'v',
'x',
'M',
'6',
'S',
'h',
'F',
'j',
'A',
'U',
'M',
'R',
'I',
'w',
'E',
1630 'A',
'Y',
'D',
'V',
'Q',
'Q',
'D',
'E',
'w',
'l',
'K',
'd',
'W',
'F',
'u',
'I',
'E',
1631 'x',
'h',
'b',
'm',
'e',
'C',
'E',
'J',
'z',
'/',
'P',
'h',
'B',
'e',
'K',
'K',
'a',
1632 '/',
'T',
's',
'R',
'+',
'4',
'e',
'L',
'g',
'T',
'1',
'k',
'w',
'D',
'Q',
'Y',
'J',
1633 'K',
'o',
'Z',
'I',
'h',
'v',
'c',
'N',
'A',
'Q',
'E',
'E',
'B',
'Q',
'A',
'D',
'g',
1634 'Y',
'E',
'A',
'L',
'p',
'k',
'g',
'L',
'g',
'W',
'3',
'm',
'E',
'a',
'K',
'i',
'd',
1635 'P',
'Q',
'3',
'i',
'P',
'J',
'Y',
'L',
'G',
'0',
'U',
'b',
'1',
'w',
'r',
'a',
'q',
1636 'E',
'l',
'9',
'b',
'd',
'4',
'2',
'h',
'r',
'h',
'z',
'I',
'd',
'c',
'D',
'z',
'l',
1637 'Q',
'g',
'x',
'n',
'm',
'8',
'/',
'5',
'c',
'H',
'Y',
'V',
'x',
'I',
'F',
'/',
'C',
1638 '2',
'0',
'x',
'/',
'H',
'J',
'p',
'l',
'b',
'1',
'R',
'G',
'6',
'U',
'1',
'i',
'p',
1639 'F',
'e',
'/',
'q',
'8',
'b',
'y',
'W',
'D',
'/',
'9',
'J',
'p',
'i',
'B',
'K',
'M',
1640 'G',
'P',
'i',
'9',
'Y',
'l',
'U',
'T',
'g',
'X',
'H',
'f',
'S',
'9',
'd',
'4',
'S',
1641 '/',
'Q',
'W',
'O',
'1',
'h',
'9',
'Z',
'7',
'K',
'e',
'i',
'p',
'B',
'Y',
'h',
'o',
1642 's',
'l',
'Q',
'p',
'H',
'X',
'u',
'y',
'9',
'b',
'U',
'r',
'8',
'A',
'd',
'q',
'i',
1643 '6',
'S',
'z',
'g',
'H',
'p',
'C',
'n',
'M',
'u',
'5',
'3',
'd',
'x',
'g',
'x',
'U',
1644 'D',
'1',
'r',
'4',
'x',
'A',
'A',
'=',
'=',0 };
1648 static const WCHAR szPrefix[] = {
'c',
'e',
'r',0 };
1649 static const WCHAR spcPrefix[] = {
's',
'p',
'c',0 };
1659 "Expected ERROR_PATH_NOT_FOUND or ERROR_INVALID_PARAMETER, got %08x\n",
1683 ok(
cert !=
NULL,
"CertEnumCertificatesInStore failed: %08x\n",
1686 ok(!
cert,
"Expected only one cert\n");
1688 ok(!
crl,
"Expected no CRLs\n");
1704 ok(
cert !=
NULL,
"CertEnumCertificatesInStore failed: %08x\n",
1707 ok(!
cert,
"Expected only one cert\n");
1709 ok(!
crl,
"Expected no CRLs\n");
1725 ok(
cert !=
NULL,
"CertEnumCertificatesInStore failed: %08x\n",
1728 ok(!
cert,
"Expected only one cert\n");
1732 ok(!
crl,
"Expected only one CRL\n");
1751 ok(
ret,
"CertAddEncodedCertificateToStore failed: %08x\n",
1765 compareStore(store,
"serialized store with cert and CRL",
1786 ok(
cert !=
NULL,
"CertEnumCertificatesInStore failed: %08x\n",
1789 ok(!
cert,
"Expected only one cert\n");
1791 ok(!
crl,
"Expected no CRLs\n");
1807 ok(
cert !=
NULL,
"CertEnumCertificatesInStore failed: %08x\n",
1810 ok(!
cert,
"Expected only one cert\n");
1812 ok(!
crl,
"Expected no CRLs\n");
1820 0x30,0x81,0xb2,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x02,0xa0,
1821 0x81,0xa4,0x30,0x81,0xa1,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a,
1822 0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x13,0x06,0x09,0x2a,0x86,
1823 0x48,0x86,0xf7,0x0d,0x01,0x07,0x01,0xa0,0x06,0x04,0x04,0x01,0x02,0x03,0x04,
1824 0x31,0x77,0x30,0x75,0x02,0x01,0x01,0x30,0x1a,0x30,0x15,0x31,0x13,0x30,0x11,
1825 0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,
1826 0x67,0x00,0x02,0x01,0x01,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,
1827 0x02,0x05,0x05,0x00,0x30,0x04,0x06,0x00,0x05,0x00,0x04,0x40,0x81,0xa6,0x70,
1828 0xb3,0xef,0x59,0xd1,0x66,0xd1,0x9b,0xc0,0x9a,0xb6,0x9a,0x5e,0x6d,0x6f,0x6d,
1829 0x0d,0x59,0xa9,0xaa,0x6e,0xe9,0x2c,0xa0,0x1e,0xee,0xc2,0x60,0xbc,0x59,0xbe,
1830 0x3f,0x63,0x06,0x8d,0xc9,0x11,0x1d,0x23,0x64,0x92,0xef,0x2e,0xfc,0x57,0x29,
1831 0xa4,0xaf,0xe0,0xee,0x93,0x19,0x39,0x51,0xe4,0x44,0xb8,0x0b,0x28,0xf4,0xa8,
1834 0x30,0x82,0x01,0x4f,0x02,0x01,0x01,0x31,0x0e,0x30,0x0c,0x06,0x08,0x2a,0x86,
1835 0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x13,0x06,0x09,0x2a,0x86,0x48,
1836 0x86,0xf7,0x0d,0x01,0x07,0x01,0xa0,0x06,0x04,0x04,0x01,0x02,0x03,0x04,0xa0,
1837 0x7c,0x30,0x7a,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30,
1838 0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,
1839 0x6e,0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,
1840 0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,
1841 0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30,0x11,
1842 0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,
1843 0x67,0x00,0x30,0x07,0x30,0x02,0x06,0x00,0x03,0x01,0x00,0xa3,0x16,0x30,0x14,
1844 0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01,
1845 0x01,0xff,0x02,0x01,0x01,0xa1,0x2e,0x30,0x2c,0x30,0x02,0x06,0x00,0x30,0x15,
1846 0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,
1847 0x20,0x4c,0x61,0x6e,0x67,0x00,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,
1848 0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x31,0x77,0x30,0x75,0x02,0x01,0x01,
1849 0x30,0x1a,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,
1850 0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x02,0x01,0x01,0x30,0x0c,
1851 0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x05,0x05,0x00,0x30,0x04,0x06,
1852 0x00,0x05,0x00,0x04,0x40,0x81,0xa6,0x70,0xb3,0xef,0x59,0xd1,0x66,0xd1,0x9b,
1853 0xc0,0x9a,0xb6,0x9a,0x5e,0x6d,0x6f,0x6d,0x0d,0x59,0xa9,0xaa,0x6e,0xe9,0x2c,
1854 0xa0,0x1e,0xee,0xc2,0x60,0xbc,0x59,0xbe,0x3f,0x63,0x06,0x8d,0xc9,0x11,0x1d,
1855 0x23,0x64,0x92,0xef,0x2e,0xfc,0x57,0x29,0xa4,0xaf,0xe0,0xee,0x93,0x19,0x39,
1856 0x51,0xe4,0x44,0xb8,0x0b,0x28,0xf4,0xa8,0x0d };
1858 0x30,0x47,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x07,0x05,0xa0,0x3a,
1859 0x30,0x38,0x02,0x01,0x00,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,
1860 0x02,0x05,0x05,0x00,0x30,0x13,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,
1861 0x07,0x01,0xa0,0x06,0x04,0x04,0x01,0x02,0x03,0x04,0x04,0x10,0x08,0xd6,0xc0,
1862 0x5a,0x21,0x51,0x2a,0x79,0xa1,0xdf,0xeb,0x9d,0x2a,0x8f,0x26,0x2f };
1864 0x30,0x38,0x02,0x01,0x00,0x30,0x0c,0x06,0x08,0x2a,0x86,0x48,0x86,0xf7,0x0d,
1865 0x02,0x05,0x05,0x00,0x30,0x13,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,
1866 0x07,0x01,0xa0,0x06,0x04,0x04,0x01,0x02,0x03,0x04,0x04,0x10,0x08,0xd6,0xc0,
1867 0x5a,0x21,0x51,0x2a,0x79,0xa1,0xdf,0xeb,0x9d,0x2a,0x8f,0x26,0x2f };
1885 "Expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n",
GetLastError());
1900 ok(
count == 0,
"Expected 0 certificates, got %d\n",
count);
1913 ok(
ret,
"CertAddEncodedCertificateToStore failed: %08x\n",
1921 ok(
count == 1,
"Expected 1 certificate, got %d\n",
count);
1929 ok(
count == 0,
"Expected 0 certificates, got %d\n",
count);
1948 ok(
count == 1,
"Expected 1 certificate, got %d\n",
count);
1972 "Expected CRYPT_E_INVALID_MSG_TYPE, got %08x\n",
GetLastError());
1978 "Expected CRYPT_E_ASN1_BADTAG, got %08x\n",
GetLastError());
1998 "Expected ERROR_CALL_NOT_IMPLEMENTED, got %08x\n",
GetLastError());
2007 ok(
cert !=
NULL,
"CertEnumCertificatesInStore failed: %08x\n",
2010 ok(!
cert,
"Expected only one cert\n");
2012 ok(!
crl,
"Expected no CRLs\n");
2026 ok(
cert !=
NULL,
"CertEnumCertificatesInStore failed: %08x\n",
2029 ok(!
cert,
"Expected only one cert\n");
2031 ok(
crl !=
NULL,
"CertEnumCRLsInStore failed: %08x\n",
2034 ok(!
crl,
"Expected only one CRL\n");
2051 ok(store != 0,
"CertOpenSystemStore failed: %08x\n",
GetLastError());
2080 static const WCHAR WineTestW[] = {
'W',
'i',
'n',
'e',
'T',
'e',
's',
't',0};
2092 win_skip(
"Insufficient privileges for the flag %08x test\n", cur_flag);
2098 "Store registration (dwFlags=%08x) failed, last error %x\n", cur_flag,
err);
2101 skip(
"Nothing to test without registered store at %08x\n", cur_flag);
2106 ok (hstore !=
NULL,
"Opening just registered store at %08x failed, last error %x\n", cur_flag,
GetLastError());
2113 ok (
ret,
"Failed to add cert at %08x, last error: %x\n", cur_flag,
GetLastError());
2117 "Unexpected cert encoded size at %08x, last error: %x\n", cur_flag,
GetLastError());
2120 ok (
ret,
"Failed to delete certificate from the new store at %08x, last error: %x\n", cur_flag,
GetLastError());
2126 ok (
ret,
"CertCloseStore failed at %08x, last error %x\n", cur_flag,
GetLastError());
2131 "Unregistering failed at %08x, last error %d\n", cur_flag,
GetLastError());
2159 "Expected ERROR_FILE_NOT_FOUND, got %08x\n",
GetLastError());
2169 ok(!
ret,
"Expected CertEnumSystemStore to stop\n");
2170 ok(
info.storeCount == 0 ||
info.storeCount == 1,
2171 "Expected 0 or 1 stores\n");
2174 info.storeCount = 0;
2179 ok(
info.storeCount == 0 ||
info.storeCount >= 3,
2180 "Expected at least 3 stores\n");
2202 "Expected CRYPT_E_NOT_FOUND, got %08x\n",
GetLastError());
2206 ok(
ret,
"CertGetStoreProperty failed for CERT_ACCESS_STATE_PROP_ID: %08x\n",
2208 ok(!
state,
"Expected a non-persisted store\n");
2214 "Expected CRYPT_E_NOT_FOUND, got %08x\n",
GetLastError());
2229 ok(propID ==
state,
"CertGetStoreProperty got the wrong value\n");
2237 "Expected CRYPT_E_NOT_FOUND, got %08x\n",
GetLastError());
2244 ok(
ret,
"CertGetStoreProperty failed for CERT_ACCESS_STATE_PROP_ID: %08x\n",
2246 ok(
state,
"Expected a persisted store\n");
2252 "Expected CRYPT_E_NOT_FOUND, got %08x\n",
GetLastError());
2268 "Expected ERROR_END_OF_MEDIA, got %08x\n",
GetLastError());
2276 "Expected ERROR_END_OF_MEDIA, got %08x\n",
GetLastError());
2340 "Expected ERROR_FILE_NOT_FOUND got %08x\n",
GetLastError());
2345 "Expected ERROR_FILE_NOT_FOUND got %08x\n",
GetLastError());
2350 "Expected ERROR_FILE_NOT_FOUND got %08x\n",
GetLastError());
2370 "Expected CRYPT_E_EXISTS, got %08x\n",
GetLastError());
2401 ok(
ret,
"CertGetCertificateContextProperty failed: %08x\n",
2411 0x0b,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x12,0x00,0x00,0x00,0x57,0x00,0x69,
2412 0x00,0x6e,0x00,0x65,0x00,0x54,0x00,0x65,0x00,0x73,0x00,0x74,0x00,0x00,0x00,
2413 0x20,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x7c,0x00,0x00,0x00,0x30,0x7a,0x02,
2414 0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,
2415 0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x30,
2416 0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,
2417 0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,
2418 0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,
2419 0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x30,0x07,
2420 0x30,0x02,0x06,0x00,0x03,0x01,0x00,0xa3,0x16,0x30,0x14,0x30,0x12,0x06,0x03,
2421 0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,
2424 0x00,0x00,0x00,0x00,0x43,0x45,0x52,0x54,0x0b,0x00,0x00,0x00,0x01,0x00,0x00,
2425 0x00,0x12,0x00,0x00,0x00,0x57,0x00,0x69,0x00,0x6e,0x00,0x65,0x00,0x54,0x00,
2426 0x65,0x00,0x73,0x00,0x74,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x01,0x00,0x00,
2427 0x00,0x7c,0x00,0x00,0x00,0x30,0x7a,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,
2428 0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,
2429 0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,
2430 0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,
2431 0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,
2432 0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,
2433 0x20,0x4c,0x61,0x6e,0x67,0x00,0x30,0x07,0x30,0x02,0x06,0x00,0x03,0x01,0x00,
2434 0xa3,0x16,0x30,0x14,0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,
2435 0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
2436 0x00,0x00,0x00,0x00,0x00,0x00 };
2438 0x00,0x00,0x00,0x00,0x43,0x45,0x52,0x54,0x03,0x00,0x00,0x00,0x01,0x00,0x00,
2439 0x00,0x14,0x00,0x00,0x00,0x6e,0x30,0x90,0x71,0x5f,0xd9,0x23,0x56,0xeb,0xae,
2440 0x25,0x40,0xe6,0x22,0xda,0x19,0x26,0x02,0xa6,0x08,0x20,0x00,0x00,0x00,0x01,
2441 0x00,0x00,0x00,0x7c,0x00,0x00,0x00,0x30,0x7a,0x02,0x01,0x01,0x30,0x02,0x06,
2442 0x00,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,
2443 0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,
2444 0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,
2445 0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,
2446 0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,
2447 0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00,0x30,0x07,0x30,0x02,0x06,0x00,0x03,
2448 0x01,0x00,0xa3,0x16,0x30,0x14,0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,
2449 0xff,0x04,0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x01,0x00,0x00,0x00,0x00,
2450 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
2455 static const WCHAR SysCertW[] = {
'S',
'o',
'f',
't',
'w',
'a',
'r',
'e',
'\\',
'M',
'i',
'c',
'r',
'o',
's',
'o',
'f',
't',
'\\',
2456 'S',
'y',
's',
't',
'e',
'm',
'C',
'e',
'r',
't',
'i',
'f',
'i',
'c',
'a',
't',
'e',
's',0};
2457 static const WCHAR WineTestW[] = {
'W',
'i',
'n',
'e',
'T',
'e',
's',
't',0};
2458 WCHAR subkey_name[32];
2459 DWORD num_subkeys, subkey_name_len;
2469 RegQueryInfoKeyW(test_key,
NULL,
NULL,
NULL, &num_subkeys,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL);
2470 for (
idx = num_subkeys;
idx-- > 0;)
2489 static const WCHAR szPrefix[] = {
'c',
'e',
'r',0 };
2491 static const WCHAR WineTestW[] = {
'W',
'i',
'n',
'e',
'T',
'e',
's',
't',0 };
2534 ok(linked->
hCertStore == store1,
"unexpected store\n");
2536 ok(
ret,
"CertSerializeCertificateStoreElement failed: %08x\n",
2542 ok(
ret,
"CertSerializeCertificateStoreElement failed: %08x\n",
2549 "Unexpected serialized cert\n");
2554 blob.cbData =
sizeof(WineTestW);
2557 ok(
ret,
"CertSetCertificateContextProperty failed: %08x\n",
2562 ok(
ret,
"CertGetCertificateContextProperty failed: %08x\n",
2569 ok(
ret,
"CertGetCertificateContextProperty failed: %08x\n",
2572 "unexpected friendly name\n");
2599 ok(
ret,
"CertAddEncodedCertificateToStore failed: %08x\n",
2610 ok(linked->
hCertStore == store2,
"unexpected store\n");
2612 ok(
ret,
"CertSerializeCertificateStoreElement failed: %08x\n",
2624 "Unexpected serialized cert\n");
2629 blob.cbData =
sizeof(WineTestW);
2632 ok(
ret,
"CertSetCertificateContextProperty failed: %08x\n",
2637 ok(
ret,
"CertGetCertificateContextProperty failed: %08x\n",
2646 "unexpected friendly name\n");
2672 ok(linked->
hCertStore == store2,
"unexpected store\n");
2674 ok(
ret,
"CertSerializeCertificateStoreElement failed: %08x\n",
2680 ok(
ret,
"CertSerializeCertificateStoreElement failed: %08x\n",
2686 "Wrong size %d\n",
size);
2688 "Unexpected serialized cert\n");
2720 ok(
ret,
"CertAddEncodedCertificateToStore failed: %08x\n",
2741 ok(linked->
hCertStore == store2,
"unexpected store\n");
2743 ok(
ret,
"CertControlStore failed: %d\n",
ret);
2764 ok(linked->
hCertStore == store2,
"unexpected store\n");
2810 ok(
cert !=
NULL,
"CertCreateCertificateContext failed\n");
2811 ok(
cert->hCertStore !=
NULL,
"cert->hCertStore == NULL\n");
2812 if(!
cert->hCertStore) {
2820 ok(
cert2 !=
NULL,
"CertCreateCertificateContext failed\n");
2821 ok(
cert2->hCertStore ==
cert->hCertStore,
"Unexpected hCertStore\n");
2826 ok(
res,
"CertAddCertificateContextToStore failed\n");
2828 ok(cert3 && cert3 !=
cert2,
"Unexpected cert3\n");
2834 ok(
res,
"CertDeleteCertificateContextFromStore failed\n");
2840 ok(store !=
NULL,
"CertOpenStore failed\n");
2843 ok(
res,
"CertAddCertificateContextToStore failed\n");
2844 ok(cert3 && cert3 !=
cert2,
"Unexpected cert3\n");
2845 ok(cert3->
hCertStore == store,
"Unexpected hCertStore\n");
2848 ok(
res,
"CertDeleteCertificateContextFromStore failed\n");
2849 ok(cert3->
hCertStore == store,
"Unexpected hCertStore\n");
2863 ok(
crl !=
NULL,
"CertCreateCRLContext failed\n");
2864 ok(
crl->hCertStore ==
cert->hCertStore,
"unexpected hCertStore\n");
2869 ok(ctl !=
NULL,
"CertCreateCTLContext failed\n");
2886 ok(store !=
NULL,
"CertOpenStore failed\n");
2889 ok(
res,
"CertCloseStore failed\n");
2892 ok(store !=
NULL,
"CertOpenStore failed\n");
2895 ok(store2 !=
NULL,
"CertCloneStore failed\n");
2896 ok(store2 == store,
"unexpected store2\n");
2902 ok(
res,
"CertCloseStore failed\n");
2905 ok(store !=
NULL,
"CertOpenStore failed\n");
2909 ok(
res,
"CertAddEncodedCertificateToStore failed\n");
2916 ok(
res,
"CertFreeCertificateContext failed\n");
2919 ok(store !=
NULL,
"CertOpenStore failed\n");
2923 ok(
res,
"CertAddEncodedCRLToStore failed\n");
2930 ok(
res,
"CertFreeCRLContext failed\n");
2933 ok(store !=
NULL,
"CertOpenStore failed\n");
2937 ok(
res,
"CertAddEncodedCTLToStore failed\n");
2944 ok(
res,
"CertFreeCTLContext failed\n");
2948 ok(store !=
NULL,
"CertOpenStore failed\n");
2952 ok(
res,
"CertAddEncodedCertificateToStore failed\n");
2956 ok(
res,
"CertAddEncodedCRLToStore failed\n");
2960 ok(
res,
"CertAddEncodedCTLToStore failed\n");
2967 ok(
res,
"CertCloseStore failed\n");
2980 if (!pI_CertUpdatestore)
2982 win_skip(
"No I_CertUpdateStore\n");
2995 ret = pI_CertUpdatestore(store1, store2, 0, 0);
3001 ret = pI_CertUpdatestore(store1, store2, 0, 0);
3004 ok(certs == 1,
"Expected 1 cert, got %d\n", certs);
3006 ret = pI_CertUpdatestore(store1, store2, 0, 0);
3009 ok(certs == 1,
"Expected 1 cert, got %d\n", certs);
3012 ret = pI_CertUpdatestore(store1, store2, 1, 0);
3014 ret = pI_CertUpdatestore(store1, store2, 0, 1);
3021 ret = pI_CertUpdatestore(store1, store2, 0, 0);
3024 ok(certs == 1,
"Expected 1 cert, got %d\n", certs);
3026 ok(certs == 1,
"Expected 1 CRL, got %d\n", certs);
3032 ret = pI_CertUpdatestore(store1, store2, 0, 0);
3035 ok(certs == 0,
"Expected 0 certs, got %d\n", certs);
int WINAPIV wsprintfW(_Out_ LPWSTR, _In_ _Printf_format_string_ LPCWSTR,...)
#define CERT_STORE_DELETE_FLAG
#define CRYPT_E_ASN1_BADTAG
#define ERROR_INVALID_PARAMETER
PCCERT_CONTEXT WINAPI CertFindCertificateInStore(HCERTSTORE hCertStore, DWORD dwCertEncodingType, DWORD dwFlags, DWORD dwType, const void *pvPara, PCCERT_CONTEXT pPrevCertContext)
static void testCloseStore(void)
#define CERT_SYSTEM_STORE_CURRENT_SERVICE
static const BYTE signedBigCert[]
static void test_I_UpdateStore(void)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
static void testEmptyStore(void)
#define ERROR_FILE_EXISTS
#define CRYPT_E_ASN1_CORRUPT
static const WCHAR BogusW[]
static const BYTE serializedCertWithFriendlyName[]
static void testAddSerialized(void)
BOOL WINAPI CertGetStoreProperty(HCERTSTORE hCertStore, DWORD dwPropId, void *pvData, DWORD *pcbData)
static const BYTE serializedStoreWithCertAndCRL[]
#define CERT_STORE_CTRL_RESYNC
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
#define CRYPT_E_NOT_FOUND
PCCRL_CONTEXT WINAPI CertEnumCRLsInStore(HCERTSTORE hCertStore, PCCRL_CONTEXT pPrev)
#define CERT_STORE_PROV_SYSTEM_REGISTRY_W
static const BYTE bigCert[]
BOOL WINAPI CertAddCertificateContextToStore(HCERTSTORE hCertStore, PCCERT_CONTEXT pCertContext, DWORD dwAddDisposition, PCCERT_CONTEXT *ppStoreContext)
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
#define HKEY_CURRENT_USER
BOOL WINAPI CertFreeCertificateContext(PCCERT_CONTEXT pCertContext)
GLuint GLuint GLsizei count
#define ERROR_INVALID_HANDLE
#define CERT_STORE_PROV_MSG
static const BYTE hashBareContent[]
#define CERT_STORE_CERTIFICATE_CONTEXT_FLAG
BOOL WINAPI CertAddEncodedCertificateToStore(HCERTSTORE hCertStore, DWORD dwCertEncodingType, const BYTE *pbCertEncoded, DWORD cbCertEncoded, DWORD dwAddDisposition, PCCERT_CONTEXT *ppCertContext)
#define CERT_STORE_OPEN_EXISTING_FLAG
LONG WINAPI RegDeleteKeyW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey)
static const struct @1643 reg_store_saved_certs[]
#define test_store_is_empty(store)
static void testCertOpenSystemStore(void)
#define INVALID_HANDLE_VALUE
DWORD WINAPI GetLastError(VOID)
#define CERT_STORE_LOCALIZED_NAME_PROP_ID
static const BYTE hashVal[]
#define PKCS_7_ASN_ENCODING
static void testSerializedStore(void)
HCERTSTORE WINAPI CertOpenSystemStoreW(HCRYPTPROV_LEGACY hProv, LPCWSTR szSubSystemProtocol)
#define REG_OPENED_EXISTING_KEY
#define CERT_STORE_ADD_NEW
BOOL WINAPI CertAddStoreToCollection(HCERTSTORE hCollectionStore, HCERTSTORE hSiblingStore, DWORD dwUpdateFlags, DWORD dwPriority)
#define CERT_FIRST_USER_PROP_ID
static const BYTE cert1[]
BOOL WINAPI CertRegisterSystemStore(const void *pvSystemStore, DWORD dwFlags, PCERT_SYSTEM_STORE_INFO pStoreInfo, void *pvReserved)
#define CERT_STORE_CTRL_COMMIT
#define CERT_STORE_PROV_FILENAME_W
BOOL WINAPI CertAddEncodedCRLToStore(HCERTSTORE hCertStore, DWORD dwCertEncodingType, const BYTE *pbCrlEncoded, DWORD cbCrlEncoded, DWORD dwAddDisposition, PCCRL_CONTEXT *ppCrlContext)
#define CERT_STORE_PROV_COLLECTION
#define CERT_FILE_STORE_COMMIT_ENABLE_FLAG
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
#define CERT_SYSTEM_STORE_LOCAL_MACHINE
BOOL WINAPI PathAppendW(LPWSTR lpszPath, LPCWSTR lpszAppend)
HCRYPTMSG WINAPI CryptMsgOpenToDecode(DWORD dwMsgEncodingType, DWORD dwFlags, DWORD dwMsgType, HCRYPTPROV_LEGACY hCryptProv, PCERT_INFO pRecipientInfo, PCMSG_STREAM_INFO pStreamInfo)
static void compareStore(HCERTSTORE store, LPCSTR name, const BYTE *pb, DWORD cb, BOOL todo)
static const WCHAR CERT_LOCAL_MACHINE_SYSTEM_STORE_REGPATH[]
#define sprintf(buf, format,...)
GLenum GLuint GLenum GLsizei const GLchar * buf
static void testStoresInCollection(void)
#define X509_ASN_ENCODING
#define CERT_ACCESS_STATE_PROP_ID
PCCTL_CONTEXT WINAPI CertCreateCTLContext(DWORD dwMsgAndCertEncodingType, const BYTE *pbCtlEncoded, DWORD cbCtlEncoded)
static void testAddCertificateLink(void)
BOOL WINAPI CertGetCertificateContextProperty(PCCERT_CONTEXT pCertContext, DWORD dwPropId, void *pvData, DWORD *pcbData)
LONG WINAPI RegCloseKey(HKEY hKey)
#define CERT_STORE_CREATE_NEW_FLAG
#define ERROR_ACCESS_DENIED
static void testSystemStore(void)
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
BOOL WINAPI CertDeleteCertificateFromStore(PCCERT_CONTEXT pCertContext)
#define CERT_STORE_PROV_MEMORY
struct reiserfs_key root_key
#define CRYPT_E_INVALID_MSG_TYPE
BOOL WINAPI CertCloseStore(HCERTSTORE hCertStore, DWORD dwFlags)
static void testCertEnumSystemStore(void)
BOOL WINAPI CertControlStore(HCERTSTORE hCertStore, DWORD dwFlags, DWORD dwCtrlType, void const *pvCtrlPara)
#define CERT_STORE_ADD_REPLACE_EXISTING
#define CERT_FRIENDLY_NAME_PROP_ID
static BOOL CALLBACK enumSystemStoreCB(const void *systemStore, DWORD dwFlags, PCERT_SYSTEM_STORE_INFO pStoreInfo, void *pvReserved, void *pvArg)
static void testRegStore(void)
#define ERROR_FILE_NOT_FOUND
static const BYTE signedCRL[]
static const BYTE serializedCert[]
HCERTSTORE WINAPI CertDuplicateStore(HCERTSTORE hCertStore)
#define todo_wine_if(is_todo)
static const BYTE signedCTLWithCTLInnerContent[]
static const BYTE signedWithCertAndCrlBareContent[]
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
static void testFileStore(void)
static const BYTE serializedStoreWithCertWithFriendlyName[]
static LPCSTR DWORD void * pvReserved
PCCRL_CONTEXT WINAPI CertCreateCRLContext(DWORD dwCertEncodingType, const BYTE *pbCrlEncoded, DWORD cbCrlEncoded)
static void testRegStoreSavedCerts(void)
UINT WINAPI GetTempFileNameW(IN LPCWSTR lpPathName, IN LPCWSTR lpPrefixString, IN UINT uUnique, OUT LPWSTR lpTempFileName)
#define CERT_CERT_PROP_ID
#define CERT_STORE_SAVE_AS_STORE
#define CERT_STORE_PROV_SYSTEM_REGISTRY
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
#define CMSG_CERT_COUNT_PARAM
static const BYTE cert2[]
BOOL WINAPI CertEnumSystemStore(DWORD dwFlags, void *pvSystemStoreLocationPara, void *pvArg, PFN_CERT_ENUM_SYSTEM_STORE pfnEnum)
#define CERT_HASH_PROP_ID
void WINAPI CertRemoveStoreFromCollection(HCERTSTORE hCollectionStore, HCERTSTORE hSiblingStore)
_In_opt_ PVOID _In_ ULONG _In_ PVOID context
LONG WINAPI RegQueryInfoKeyW(HKEY hKey, LPWSTR lpClass, LPDWORD lpcClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcMaxSubKeyLen, LPDWORD lpcMaxClassLen, LPDWORD lpcValues, LPDWORD lpcMaxValueNameLen, LPDWORD lpcMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime)
#define CERT_STORE_READONLY_FLAG
BOOL WINAPI CertAddEncodedCTLToStore(HCERTSTORE hCertStore, DWORD dwMsgAndCertEncodingType, const BYTE *pbCtlEncoded, DWORD cbCtlEncoded, DWORD dwAddDisposition, PCCTL_CONTEXT *ppCtlContext)
static void testCollectionStore(void)
static const BYTE base64SPC[]
#define FILE_ATTRIBUTE_NORMAL
static void testCertRegisterSystemStore(void)
PCCERT_CONTEXT WINAPI CertCreateCertificateContext(DWORD dwCertEncodingType, const BYTE *pbCertEncoded, DWORD cbCertEncoded)
BOOL WINAPI CertAddSerializedElementToStore(HCERTSTORE hCertStore, const BYTE *pbElement, DWORD cbElement, DWORD dwAddDisposition, DWORD dwFlags, DWORD dwContextTypeFlags, DWORD *pdwContentType, const void **ppvContext)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
static const BYTE emptyCert[]
static const WCHAR szDot[]
BOOL WINAPI CertUnregisterSystemStore(const void *pvSystemStore, DWORD dwFlags)
static void _test_store_is_empty(unsigned line, HCERTSTORE store)
#define memcpy(s1, s2, n)
HCERTSTORE WINAPI CertOpenSystemStoreA(HCRYPTPROV_LEGACY hProv, LPCSTR szSubSystemProtocol)
static const BYTE bigCert2[]
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
#define CRYPT_E_PENDING_CLOSE
#define CERT_FIND_EXISTING
BOOL WINAPI CertFreeCTLContext(PCCTL_CONTEXT pCTLContext)
static const BYTE serializedStoreWithCertAndHash[]
PCCERT_CONTEXT WINAPI CertEnumCertificatesInStore(HCERTSTORE hCertStore, PCCERT_CONTEXT pPrev)
BOOL WINAPI CertSetStoreProperty(HCERTSTORE hCertStore, DWORD dwPropId, DWORD dwFlags, const void *pvData)
LONG WINAPI RegDeleteKeyA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey)
static BOOL initFileFromData(LPCWSTR filename, const BYTE *pb, DWORD cb)
#define CERT_SYSTEM_STORE_LOCAL_MACHINE_ENTERPRISE
DWORD WINAPI SHDeleteKeyA(HKEY hKey, LPCSTR lpszSubKey)
BOOL WINAPI CertSaveStore(HCERTSTORE hCertStore, DWORD dwMsgAndCertEncodingType, DWORD dwSaveAs, DWORD dwSaveTo, void *pvSaveToPara, DWORD dwFlags)
#define CERT_STORE_PROV_SYSTEM_W
#define CERT_STORE_CRL_CONTEXT_FLAG
#define CERT_STORE_SAVE_TO_MEMORY
#define CERT_STORE_PROV_PKCS7
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define ERROR_END_OF_MEDIA
static void testFileNameStore(void)
GLsizei GLsizei GLchar * source
static ICollection collection
#define CERT_SYSTEM_STORE_CURRENT_USER
#define CERT_STORE_PROV_REG
INT copy(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], INT append, DWORD lpdwFlags, BOOL bTouch)
#define CERT_STORE_PROV_SERIALIZED
#define CERT_STORE_PROV_FILE
static const BYTE hashContent[]
PCCERT_CONTEXT WINAPI CertDuplicateCertificateContext(PCCERT_CONTEXT pCertContext)
static DWORD countCertsInStore(HCERTSTORE store)
HCERTSTORE WINAPI CertOpenStore(LPCSTR lpszStoreProvider, DWORD dwMsgAndCertEncodingType, HCRYPTPROV_LEGACY hCryptProv, DWORD dwFlags, const void *pvPara)
BOOL WINAPI CertSerializeCertificateStoreElement(PCCERT_CONTEXT pCertContext, DWORD dwFlags, BYTE *pbElement, DWORD *pcbElement)
static void delete_test_key(void)
static const struct @1644 reg_system_store_test_data[]
static DWORD countCRLsInStore(HCERTSTORE store)