42 static const BYTE bin3[] = {0x02,0x02,0x00,0x80};
43 static const BYTE bin4[] = {0x02,0x02,0x01,0x00};
45 static const BYTE bin6[] = {0x02,0x02,0xff,0x7f};
46 static const BYTE bin7[] = {0x02,0x04,0xba,0xdd,0xf0,0x0d};
65 static const BYTE bin8[] = {0xff,0xff,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0};
66 static const BYTE bin9[] = {0x02,0x0a,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01,0xff,0xff,0};
67 static const BYTE bin10[] = {0xff,0xff,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0};
69 static const BYTE bin11[] = {0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01,0xff,0xff,0xff,0};
70 static const BYTE bin12[] = {0x02,0x09,0xff,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0};
71 static const BYTE bin13[] = {0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01,0xff,0};
78 static const BYTE bin14[] = {0xff,0xff,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0};
79 static const BYTE bin15[] = {0x02,0x0a,0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01,0xff,0xff,0};
80 static const BYTE bin16[] = {0x08,0x07,0x06,0x05,0x04,0x03,0x02,0x01,0xff,0xff,0xff,0};
81 static const BYTE bin17[] = {0x02,0x0c,0x00,0xff,0xff,0xff,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0};
105 "Expected ERROR_FILE_NOT_FOUND, got %d\n",
GetLastError());
114 "Expected STATUS_ACCESS_VIOLATION, got %08x\n",
GetLastError());
127 ok(
buf[0] == 2,
"Got unexpected type %d for integer (expected 2)\n",
132 "Encoded value of 0x%08x didn't match expected\n",
ints[
i].
val);
146 ok(
buf[0] == 2,
"Got unexpected type %d for integer (expected 2)\n",
151 "Encoded value of 0x%08x didn't match expected\n",
ints[
i].
val);
170 ok(
buf[0] == 2,
"Got unexpected type %d for integer (expected 2)\n",
176 "Encoded value didn't match expected\n");
193 ok(
buf[0] == 2,
"Got unexpected type %d for integer (expected 2)\n",
199 "Encoded value didn't match expected\n");
207 static const BYTE bigInt[] = { 2, 5, 0xff, 0xfe, 0xff, 0xfe, 0xff };
208 static const BYTE testStr[] = { 0x16, 4,
't',
'e',
's',
't' };
209 static const BYTE longForm[] = { 2, 0x81, 0x01, 0x01 };
210 static const BYTE bigBogus[] = { 0x02, 0x84, 0x01, 0xff, 0xff, 0xf9 };
211 static const BYTE extraBytes[] = { 2, 1, 1, 0, 0, 0, 0 };
225 "Expected ERROR_FILE_NOT_FOUND, got %d\n",
GetLastError());
231 "Expected CRYPT_E_ASN1_EOD or OSS_BAD_ARG, got %08x\n",
GetLastError());
233 ret = pCryptDecodeObjectEx(dwEncoding,
X509_INTEGER, bigInt, bigInt[1] + 2,
237 "Expected CRYPT_E_ASN1_LARGE, got %d\n",
GetLastError());
239 ret = pCryptDecodeObjectEx(dwEncoding,
X509_INTEGER, testStr, testStr[1] + 2,
243 "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH, got %08x\n",
253 "Expected success and NOERROR, got %d\n",
GetLastError());
259 ok(
buf !=
NULL,
"Expected allocated buffer\n");
273 "Expected success and NOERROR, got %d\n",
GetLastError());
279 ok(
buf !=
NULL,
"Expected allocated buffer\n");
288 "Unexpected value\n");
298 "Expected success and NOERROR, got %d\n",
GetLastError());
304 ok(
buf !=
NULL,
"Expected allocated buffer\n");
313 "Unexpected value\n");
323 ok(*(
int *)
buf == 1,
"Expected 1, got %d\n", *(
int *)
buf);
332 ok(*(
int *)
buf == 1,
"Expected 1, got %d\n", *(
int *)
buf);
355 "Expected STATUS_ACCESS_VIOLATION, got %08x\n",
GetLastError());
360 static const BYTE bin19[] = {0x0a,0x05,0x00,0xff,0xff,0xff,0x80};
395 "Got unexpected type %d for enumerated (expected 0xa)\n",
401 "Encoded value of 0x%08x didn't match expected\n",
426 "Got unexpected size %d for enumerated\n",
bufSize);
449 ret = pCryptEncodeObjectEx(dwEncoding, structType, &ft,
455 (
time->sysTime.wYear >= 1950 &&
time->sysTime.wYear <= 2050))
459 ok(
buf !=
NULL,
"Expected an allocated buffer\n");
463 "Expected type 0x%02x, got 0x%02x\n",
time->encodedTime[0],
465 ok(
buf[1] ==
time->encodedTime[1],
"Expected %d bytes, got %d\n",
468 "Got unexpected value for time encoding\n");
475 "Expected CRYPT_E_BAD_ENCODE, got 0x%08x\n",
GetLastError());
517 "Got unexpected value for time decoding:\nexpected %s, got %s\n",
528 ret = pCryptDecodeObjectEx(dwEncoding, structType,
time->encodedTime,
534 (
time->sysTime.wYear >= 1950 &&
time->sysTime.wYear <= 2050))
537 "CryptDecodeObjectEx failed: %d (0x%08x)\n",
GetLastError(),
545 "Expected CRYPT_E_ASN1_BADTAG or OSS_PDU_MISMATCH, got %08x\n",
550 0x17,0x0d,
'0',
'5',
'0',
'6',
'0',
'6',
'1',
'6',
'1',
'0',
'0',
'0',
'Z'};
552 0x18,0x0f,
'1',
'9',
'4',
'5',
'0',
'6',
'0',
'6',
'1',
'6',
'1',
'0',
'0',
'0',
'Z'};
554 0x18,0x0f,
'2',
'1',
'4',
'5',
'0',
'6',
'0',
'6',
'1',
'6',
'1',
'0',
'0',
'0',
'Z'};
557 { { 2005, 6, 1, 6, 16, 10, 0, 0 },
bin20 },
558 { { 1945, 6, 1, 6, 16, 10, 0, 0 },
bin21 },
559 { { 2145, 6, 1, 6, 16, 10, 0, 0 },
bin22 },
575 0x18,0x13,
'1',
'9',
'4',
'5',
'0',
'6',
'0',
'6',
'1',
'6',
'1',
'0',
'0',
'0',
'.',
'0',
'0',
'0',
'Z'};
577 0x18,0x13,
'1',
'9',
'4',
'5',
'0',
'6',
'0',
'6',
'1',
'6',
'1',
'0',
'0',
'0',
'.',
'9',
'9',
'9',
'Z'};
579 0x18,0x13,
'1',
'9',
'4',
'5',
'0',
'6',
'0',
'6',
'1',
'6',
'1',
'0',
'0',
'0',
'+',
'0',
'1',
'0',
'0'};
581 0x18,0x13,
'1',
'9',
'4',
'5',
'0',
'6',
'0',
'6',
'1',
'6',
'1',
'0',
'0',
'0',
'-',
'0',
'1',
'0',
'0'};
583 0x18,0x13,
'1',
'9',
'4',
'5',
'0',
'6',
'0',
'6',
'1',
'6',
'1',
'0',
'0',
'0',
'-',
'0',
'1',
'1',
'5'};
585 0x18,0x0a,
'2',
'1',
'4',
'5',
'0',
'6',
'0',
'6',
'1',
'6'};
587 0x17,0x0a,
'4',
'5',
'0',
'6',
'0',
'6',
'1',
'6',
'1',
'0'};
589 0x17,0x0b,
'4',
'5',
'0',
'6',
'0',
'6',
'1',
'6',
'1',
'0',
'Z'};
591 0x17,0x0d,
'4',
'5',
'0',
'6',
'0',
'6',
'1',
'6',
'1',
'0',
'+',
'0',
'1'};
593 0x17,0x0d,
'4',
'5',
'0',
'6',
'0',
'6',
'1',
'6',
'1',
'0',
'-',
'0',
'1'};
595 0x17,0x0f,
'4',
'5',
'0',
'6',
'0',
'6',
'1',
'6',
'1',
'0',
'+',
'0',
'1',
'0',
'0'};
597 0x17,0x0f,
'4',
'5',
'0',
'6',
'0',
'6',
'1',
'6',
'1',
'0',
'-',
'0',
'1',
'0',
'0'};
599 0x17,0x08,
'4',
'5',
'0',
'6',
'0',
'6',
'1',
'6'};
601 0x18,0x0f,
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'Z'};
603 0x18,0x04,
'2',
'1',
'4',
'5'};
605 0x18,0x08,
'2',
'1',
'4',
'5',
'0',
'6',
'0',
'6'};
610 { { 1945, 6, 1, 6, 16, 10, 0, 0 },
bin23 },
611 { { 1945, 6, 1, 6, 16, 10, 0, 999 },
bin24 },
612 { { 1945, 6, 1, 6, 17, 10, 0, 0 },
bin25 },
613 { { 1945, 6, 1, 6, 15, 10, 0, 0 },
bin26 },
614 { { 1945, 6, 1, 6, 14, 55, 0, 0 },
bin27 },
615 { { 2145, 6, 1, 6, 16, 0, 0, 0 },
bin28 },
616 { { 2045, 6, 1, 6, 16, 10, 0, 0 },
bin29 },
617 { { 2045, 6, 1, 6, 16, 10, 0, 0 },
bin30 },
618 { { 2045, 6, 1, 6, 17, 10, 0, 0 },
bin31 },
619 { { 2045, 6, 1, 6, 15, 10, 0, 0 },
bin32 },
620 { { 2045, 6, 1, 6, 17, 10, 0, 0 },
bin33 },
621 { { 2045, 6, 1, 6, 15, 10, 0, 0 },
bin34 },
626 static const unsigned char *bogusTimes[] = {
664 bogusTimes[
i], bogusTimes[
i][1] + 2, 0,
NULL, &ft1, &
size);
668 "Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08x\n",
679 0x30,0x23,0x31,0x21,0x30,0x0c,0x06,0x03,0x55,0x04,0x04,
680 0x13,0x05,0x4c,0x61,0x6e,0x67,0x00,0x30,0x11,0x06,0x03,0x55,0x04,0x03,
681 0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0};
683 0x30,0x2e,0x31,0x2c,0x30,0x2a,0x06,0x03,0x55,0x04,0x03,0x30,0x23,0x31,0x21,
684 0x30,0x0c,0x06,0x03,0x55,0x04,0x04,0x13,0x05,0x4c,0x61,0x6e,0x67,0x00,0x30,
685 0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,
693 0x6f, 0x6c, 0x69, 0x73 };
695 0x76, 0x65, 0x72, 0x73 };
696 static const BYTE wine[] = { 0x57, 0x69, 0x6e, 0x65, 0x20, 0x44, 0x65, 0x76,
697 0x65, 0x6c, 0x6f, 0x70, 0x6d, 0x65, 0x6e, 0x74 };
700 static const BYTE aric[] = { 0x61, 0x72, 0x69, 0x63, 0x40, 0x63, 0x6f, 0x64,
701 0x65, 0x77, 0x65, 0x61, 0x76, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d };
703 #define RDNA(arr) oid_ ## arr, CERT_RDN_PRINTABLE_STRING, { sizeof(arr), (LPBYTE)arr } 704 #define RDNIA5(arr) oid_ ## arr, CERT_RDN_IA5_STRING, { sizeof(arr), (LPBYTE)arr } 732 0x30,0x81,0x96,0x31,0x81,0x93,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,
733 0x53,0x30,0x10,0x06,0x03,0x55,0x04,0x03,0x13,0x09,0x6c,0x6f,0x63,0x61,0x6c,0x68,
734 0x6f,0x73,0x74,0x30,0x10,0x06,0x03,0x55,0x04,0x08,0x13,0x09,0x4d,0x69,0x6e,0x6e,
735 0x65,0x73,0x6f,0x74,0x61,0x30,0x12,0x06,0x03,0x55,0x04,0x07,0x13,0x0b,0x4d,0x69,
736 0x6e,0x6e,0x65,0x61,0x70,0x6f,0x6c,0x69,0x73,0x30,0x12,0x06,0x03,0x55,0x04,0x0a,
737 0x13,0x0b,0x43,0x6f,0x64,0x65,0x57,0x65,0x61,0x76,0x65,0x72,0x73,0x30,0x17,0x06,
738 0x03,0x55,0x04,0x0b,0x13,0x10,0x57,0x69,0x6e,0x65,0x20,0x44,0x65,0x76,0x65,0x6c,
739 0x6f,0x70,0x6d,0x65,0x6e,0x74,0x30,0x21,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,
740 0x01,0x09,0x01,0x16,0x14,0x61,0x72,0x69,0x63,0x40,0x63,0x6f,0x64,0x65,0x77,0x65,
741 0x61,0x76,0x65,0x72,0x73,0x2e,0x63,0x6f,0x6d
761 "Expected STATUS_ACCESS_VIOLATION, got %08x\n",
GetLastError());
772 "Got unexpected encoding for empty name\n");
782 "Expected STATUS_ACCESS_VIOLATION, got %08x\n",
GetLastError());
795 "Got unexpected encoding for empty RDN array\n");
806 "Expected STATUS_ACCESS_VIOLATION, got %08x\n",
GetLastError());
822 attrs[0].
pszObjId = oid_common_name;
838 "Got unexpected encoding for two RDN array\n");
853 "Unexpected value for re-encoded two RDN array\n");
885 0x30,0x21,0x31,0x1f,0x30,0x0b,0x06,0x03,0x55,0x04,0x04,0x13,0x04,0x4c,0x61,
886 0x6e,0x67,0x30,0x10,0x06,0x03,0x55,0x04,0x03,0x13,0x09,0x4a,0x75,0x61,0x6e,
887 0x20,0x4c,0x61,0x6e,0x67 };
889 0x30,0x2f,0x31,0x2d,0x30,0x2b,0x06,0x03,0x55,0x04,0x03,0x1e,0x24,0x23,0x30,
890 0x21,0x31,0x0c,0x30,0x03,0x06,0x04,0x55,0x13,0x04,0x4c,0x05,0x6e,0x61,0x00,
891 0x67,0x11,0x30,0x03,0x06,0x04,0x55,0x13,0x03,0x4a,0x0a,0x61,0x75,0x20,0x6e,
892 0x61,0x4c,0x67,0x6e };
911 "Expected STATUS_ACCESS_VIOLATION, got %08x\n",
GetLastError());
922 "Got unexpected encoding for empty name\n");
928 attrs[0].
pszObjId = oid_common_name;
939 "Expected CRYPT_E_INVALID_PRINTABLE_STRING, got %08x\n",
GetLastError());
940 ok(
size == 9,
"Unexpected error index %08x\n",
size);
944 attrs[0].
pszObjId = oid_common_name;
962 "Got unexpected encoding for two RDN array\n");
977 "Unexpected value for re-encoded two RDN array\n");
1000 win_skip(
"Can't handle CERT_RDN_UTF8_STRING\n");
1005 "Expected string type %d, got %d\n",
expected->dwValueType,
1009 "String type %d: unexpected data size, got %d, expected %d\n",
1014 "String type %d: unexpected value\n",
expected->dwValueType);
1027 "Got unexpected OID %s, expected %s\n", got->
pszObjId,
1057 for (
i = 0;
i < got->
cRDN;
i++)
1064 0x30,0x23,0x31,0x21,0x30,0x0c,0x06,0x03,0x55,0x04,0x04,
1065 0x13,0x05,0x4c,0x61,0x6e,0x67,0x00,0x30,0x11,0x06,0x03,0x55,0x04,0x03,
1066 0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0,0,0,0,0,0};
1090 "Expected 0 RDNs in empty info, got %d\n",
1103 "Expected 0 RDNs in empty info, got %d\n",
1119 info->cRDN == 1 &&
info->rgRDN &&
info->rgRDN[0].cRDNAttr == 0,
1120 "Got unexpected value for empty RDN\n");
1185 "Got wrong bufSize %d\n",
bufSize);
1187 "Expected 0 RDNs in empty info, got %d\n",
1203 info->cRDN == 1 &&
info->rgRDN &&
info->rgRDN[0].cRDNAttr == 0,
1204 "Got unexpected value for empty RDN\n");
1247 0x04,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00 };
1249 0x12,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00 };
1251 0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00 };
1253 0x14,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00 };
1255 0x15,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00 };
1257 0x16,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00 };
1259 0x19,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00 };
1261 0x1a,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00 };
1263 0x1b,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00 };
1265 0x1e,0x14,0x00,0x4a,0x00,0x75,0x00,0x61,0x00,0x6e,0x00,0x20,0x00,0x4c,0x00,
1266 0x61,0x00,0x6e,0x00,0x67,0x00,0x00 };
1268 0x0c,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00 };
1271 0x16,0x07,0x66,0x6f,0x6f,0x00,0x63,0x6f,0x6d };
1332 "Unexpected encoding\n");
1340 "Type %d: CryptEncodeObjectEx failed: %08x\n",
1347 "Got unexpected encoding\n");
1354 "Type %d: CryptEncodeObjectEx failed: %08x\n",
1361 "Got unexpected encoding\n");
1379 ok(
ret,
"Value type %d: CryptDecodeObjectEx failed: %08x\n",
1410 "Expected CERT_RDN_ENCODED_BLOB or CERT_RDN_IA5_STRING, got %d\n",
1419 "String type %d: unexpected data size, got %d, expected %d\n",
1424 "String type %d: unexpected value\n",
expected->dwValueType);
1432 static const WCHAR url[] = {
'h',
't',
't',
'p',
':',
'/',
'/',
'w',
'i',
'n',
'e',
1433 'h',
'q',
'.',
'o',
'r',
'g',0 };
1435 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x69, 0x6e, 0x65, 0x68, 0x71, 0x2e,
1439 static const WCHAR dnsName[] = {
'w',
'i',
'n',
'e',
'h',
'q',
'.',
'o',
'r',
'g',0 };
1441 0x6e, 0x65, 0x68, 0x71, 0x2e, 0x6f, 0x72, 0x67 };
1446 0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,
'J',
'u',
'a',
'n',
' ',
'L',
'a',
'n',
'g',0};
1449 0x30,0x19,0xa4,0x17,0x30,0x15,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x03,
1450 0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,0x00 };
1459 char oid[] =
"1.2.3";
1502 "Expected CRYPT_E_INVALID_IA5_STRING, got %08x\n",
GetLastError());
1505 "Expected invalid char at index 7, got %d\n",
1542 U(
entry).pszRegisteredID = oid;
1567 static const BYTE unimplementedType[] = { 0x30, 0x06, 0x85, 0x04, 0x7f,
1569 static const BYTE bogusType[] = { 0x30, 0x06, 0x89, 0x04, 0x7f, 0x00, 0x00,
1571 static const BYTE dns_embedded_null[] = { 0x30,0x10,0x82,0x0e,0x66,0x6f,
1572 0x6f,0x2e,0x63,0x6f,0x6d,0x00,0x62,0x61,0x64,0x64,0x69,0x65 };
1573 static const BYTE dns_embedded_bell[] = { 0x30,0x10,0x82,0x0e,0x66,0x6f,
1574 0x6f,0x2e,0x63,0x6f,0x6d,0x07,0x62,0x61,0x64,0x64,0x69,0x65 };
1575 static const BYTE url_embedded_null[] = { 0x30,0x10,0x86,0x0e,0x66,0x6f,
1576 0x6f,0x2e,0x63,0x6f,0x6d,0x00,0x62,0x61,0x64,0x64,0x69,0x65 };
1588 "Expected CRYPT_E_ASN1_BADTAG or OSS_DATA_ERROR, got %08x\n",
1595 "Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08x\n",
1605 ok(
info->cAltEntry == 0,
"Expected 0 entries, got %d\n",
1616 ok(
info->cAltEntry == 1,
"Expected 1 entries, got %d\n",
1619 "Expected CERT_ALT_NAME_URL, got %d\n",
1620 info->rgAltEntry[0].dwAltNameChoice);
1621 ok(
U(
info->rgAltEntry[0]).pwszURL ==
NULL || !*
U(
info->rgAltEntry[0]).pwszURL,
1622 "Expected empty URL\n");
1635 ok(
info->cAltEntry == 1,
"Expected 1 entries, got %d\n",
1638 "Expected CERT_ALT_NAME_URL, got %d\n",
1639 info->rgAltEntry[0].dwAltNameChoice);
1650 ok(
info->cAltEntry == 1,
"Expected 1 entries, got %d\n",
1653 "Expected CERT_ALT_NAME_DNS_NAME, got %d\n",
1654 info->rgAltEntry[0].dwAltNameChoice);
1656 "Unexpected DNS name\n");
1666 ok(
info->cAltEntry == 1,
"Expected 1 entries, got %d\n",
1669 "Expected CERT_ALT_NAME_IP_ADDRESS, got %d\n",
1670 info->rgAltEntry[0].dwAltNameChoice);
1672 "Unexpected IP address length %d\n",
1673 U(
info->rgAltEntry[0]).IPAddress.cbData);
1675 sizeof(
localhost)),
"Unexpected IP address value\n");
1685 ok(
info->cAltEntry == 1,
"Expected 1 entries, got %d\n",
1688 "Expected CERT_ALT_NAME_REGISTERED_ID, got %d\n",
1689 info->rgAltEntry[0].dwAltNameChoice);
1690 ok(!
strcmp(
U(
info->rgAltEntry[0]).pszRegisteredID,
"1.2.3"),
1691 "Expected OID 1.2.3, got %s\n",
U(
info->rgAltEntry[0]).pszRegisteredID);
1702 ok(
info->cAltEntry == 1,
"Expected 1 entries, got %d\n",
1705 "Expected CERT_ALT_NAME_DIRECTORY_NAME, got %d\n",
1706 info->rgAltEntry[0].dwAltNameChoice);
1707 ok(
U(
info->rgAltEntry[0]).DirectoryName.cbData ==
1709 U(
info->rgAltEntry[0]).DirectoryName.cbData);
1712 "Unexpected directory name value\n");
1733 ok(
info->cAltEntry == 1,
"Expected 1 entries, got %d\n",
1736 "Expected CERT_ALT_NAME_DNS_NAME, got %d\n",
1737 info->rgAltEntry[0].dwAltNameChoice);
1790 static BYTE nihongoT61[] = { 0x14,0x09,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6f,
1794 static BYTE nihongoBMP[] = { 0x1e,0x12,0x00,0x68,0x00,0x74,0x00,0x74,0x00,0x70,
1795 0x00,0x3a,0x00,0x2f,0x00,0x2f,0x22,0x6f,0x57,0x5b };
1797 0xe2,0x89,0xaf,0xe5,0x9d,0x9b };
1833 "Expected STATUS_ACCESS_VIOLATION, got %08x\n",
GetLastError());
1836 value.dwValueType = 0;
1838 value.Value.cbData = 0;
1842 "Expected CRYPT_E_NOT_CHAR_STRING, got %08x\n",
GetLastError());
1847 "Expected CRYPT_E_NOT_CHAR_STRING, got %08x\n",
GetLastError());
1853 "Expected CRYPT_E_NOT_CHAR_STRING, got %08x\n",
GetLastError());
1858 "Expected CRYPT_E_NOT_CHAR_STRING, got %08x\n",
GetLastError());
1866 "Expected CRYPT_E_NOT_CHAR_STRING, got %08x\n",
GetLastError());
1868 value.Value.cbData = 0;
1876 "Value type %d: expected %08x, got %08x\n",
value.dwValueType,
1879 "Expected error index %d, got %d\n",
unicodeErrors[
i].errorIndex,
1883 value.Value.cbData = 0;
1895 "Value type %d: expected size %d, got %d\n",
1898 "Value type %d: unexpected value\n",
value.dwValueType);
1916 "Value type %d: expected size %d, got %d\n",
1919 "Value type %d: unexpected value\n",
value.dwValueType);
1927 if (
n <= 0)
return 0;
1928 while ((--
n > 0) && *str1 && (*str1 == *str2)) { str1++; str2++; }
1929 return *str1 - *str2;
1953 value->dwValueType);
1956 "Unexpected decoded value for index %d (value type %d)\n",
i,
1966 's',
'o',
'm',
'e',
'l',
'o',
'n',
'g',0xff,
's',
't',
'r',
'i',
'n',
'g' };
1968 ASN_OCTETSTRING,15,
's',
'o',
'm',
'e',
'l',
'o',
'n',
'g',0xff,
's',
't',
'r',
'i',
'n',
'g' };
1976 static const struct {
1977 const BYTE *decoded;
2007 ok(
bufSize ==
tests[
i].encoded_size,
"[%u] buf size %u expected %u\n",
2009 ok(
buf[0] == 4,
"Got unexpected type %d for octet string (expected 4)\n",
buf[0]);
2023 {
ASN_CONSTRUCTOR|
ASN_OCTETSTRING,8,
ASN_CONSTRUCTOR|
ASN_OCTETSTRING,0x80,
ASN_OCTETSTRING,2,
'h',
'i', 0,0, 0,0 };
2031 static const struct {
2032 const BYTE *encoded;
2034 const BYTE *decoded;
2085 "[%u] Expected size >= %d, got %d\n",
i,
2087 ok(
buf !=
NULL,
"Expected allocated buffer\n");
2092 ok (
blob->cbData ==
tests[
i].decoded_size,
"[%u] cbData = %u\n",
i,
blob->cbData);
2095 "Unexpected value\n");
2111 static const unsigned char bin52[] = { 0x03,0x03,0x00,0xff,0xff };
2112 static const unsigned char bin53[] = { 0xff,0xff };
2113 static const unsigned char bin54[] = { 0x03,0x03,0x01,0xff,0xfe };
2114 static const unsigned char bin55[] = { 0xff,0xfe };
2115 static const unsigned char bin56[] = { 0x03,0x02,0x01,0xfe };
2116 static const unsigned char bin57[] = { 0xfe };
2146 "%d: Got unexpected size %d, expected %d\n",
i,
bufSize,
2149 "%d: Unexpected value\n",
i);
2157 static const BYTE ber[] =
"\x03\x02\x01\xff";
2158 static const BYTE berDecoded = 0xfe;
2176 "Got unexpected size %d\n",
bufSize);
2179 "Got unexpected length %d, expected %d\n",
blob->cbData,
2183 "Unexpected value\n");
2190 ret = pCryptDecodeObjectEx(dwEncoding,
X509_BITS, ber, ber[1] + 2,
2198 "Got unexpected size %d\n",
bufSize);
2200 ok(
blob->cbData ==
sizeof(berDecoded),
2201 "Got unexpected length %d\n",
blob->cbData);
2203 ok(*
blob->pbData == berDecoded,
"Unexpected value\n");
2214 static const unsigned char bin59[] = { 0x30,0x00 };
2215 static const unsigned char bin60[] = { 0x30,0x03,0x01,0x01,0xff };
2216 static const unsigned char bin61[] = { 0x30,0x03,0x02,0x01,0x00 };
2217 static const unsigned char bin62[] = { 0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x01 };
2233 0x06, 0x0a, 0x09, 0x92, 0x26, 0x89, 0x93, 0xf2, 0x2c, 0x64, 0x01, 0x19, 0x16,
2234 0x03, 0x6f, 0x72, 0x67, 0x30, 0x14, 0x06, 0x0a, 0x09, 0x92, 0x26, 0x89, 0x93,
2235 0xf2, 0x2c, 0x64, 0x01, 0x19, 0x16, 0x06, 0x77, 0x69, 0x6e, 0x65, 0x68, 0x71 };
2237 0x30, 0x2d, 0x30, 0x2b, 0x31, 0x29, 0x30, 0x11, 0x06, 0x0a, 0x09, 0x92, 0x26,
2238 0x89, 0x93, 0xf2, 0x2c, 0x64, 0x01, 0x19, 0x16, 0x03, 0x6f, 0x72, 0x67, 0x30,
2239 0x14, 0x06, 0x0a, 0x09, 0x92, 0x26, 0x89, 0x93, 0xf2, 0x2c, 0x64, 0x01, 0x19,
2240 0x16, 0x06, 0x77, 0x69, 0x6e, 0x65, 0x68, 0x71 };
2269 info.SubjectType.cbData = 0;
2271 info.cSubtreesConstraint = 0;
2280 "Unexpected value\n");
2286 info.cSubtreesConstraint = 1;
2287 info.rgSubtreesConstraint = &nameBlob;
2302 static const unsigned char bin63[] = { 0x30,0x06,0x01,0x01,0x01,0x02,0x01,0x01 };
2306 static const BYTE inverted[] = { 0x30, 0x06, 0x02, 0x01, 0x01, 0x01, 0x01,
2320 ok(
ret,
"CryptDecodeObjectEx failed for item %d: %08x\n",
i,
2328 "Unexpected value for item %d\n",
i);
2339 "Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08x\n",
2341 ok(!
buf,
"Expected buf to be set to NULL\n");
2361 "Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08x\n",
2372 ok(
info->SubjectType.cbData == 0,
"Expected no subject type\n");
2373 ok(!
info->fPathLenConstraint,
"Expected no path length constraint\n");
2374 ok(
info->cSubtreesConstraint == 0,
"Expected no subtree constraints\n");
2385 ok(
info->SubjectType.cbData == 0,
"Expected no subject type\n");
2386 ok(!
info->fPathLenConstraint,
"Expected no path length constraint\n");
2387 ok(
info->cSubtreesConstraint == 1,
"Expected a subtree constraint\n");
2388 if (
info->cSubtreesConstraint &&
info->rgSubtreesConstraint)
2390 ok(
info->rgSubtreesConstraint[0].cbData ==
2392 info->rgSubtreesConstraint[0].cbData);
2405 static const BYTE mod1_encoded[] = { 0x30,0x0f,0x02,0x08,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x02,0x03,0x01,0x00,0x01 };
2406 static const BYTE mod2_encoded[] = { 0x30,0x0c,0x02,0x05,0x01,0x01,0x01,0x01,0x01,0x02,0x03,0x01,0x00,0x01 };
2407 static const BYTE mod3_encoded[] = { 0x30,0x0c,0x02,0x05,0x01,0x01,0x01,0x01,0x80,0x02,0x03,0x01,0x00,0x01 };
2408 static const BYTE mod4_encoded[] = { 0x30,0x10,0x02,0x09,0x00,0x80,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x02,0x03,0x01,0x00,0x01 };
2439 rsaPubKey->
magic = 0x31415352;
2441 rsaPubKey->
pubexp = 65537;
2490 "Expected ERROR_FILE_NOT_FOUND, got %08x\n",
GetLastError());
2494 "Expected ERROR_FILE_NOT_FOUND, got %08x\n",
GetLastError());
2510 "Unexpected value\n");
2529 "Expected CRYPT_E_ASN1_EOD or OSS_MORE_INPUT, got %08x\n",
2536 "Expected ERROR_FILE_NOT_FOUND, got %08x\n",
GetLastError());
2541 "Expected ERROR_FILE_NOT_FOUND, got %08x\n",
GetLastError());
2559 "Expected type PUBLICKEYBLOB (%d), got %d\n",
PUBLICKEYBLOB,
2562 "Expected version CUR_BLOB_VERSION (%d), got %d\n",
2564 ok(
hdr->reserved == 0,
"Expected reserved 0, got %d\n",
2567 "Expected CALG_RSA_KEYX, got %08x\n",
hdr->aiKeyAlg);
2568 ok(rsaPubKey->
magic == 0x31415352,
2569 "Expected magic RSA1, got %08x\n", rsaPubKey->
magic);
2571 "Wrong bit len %d\n", rsaPubKey->
bitlen);
2572 ok(rsaPubKey->
pubexp == 65537,
"Expected pubexp 65537, got %d\n",
2576 "Unexpected modulus\n");
2583 0x7f, 0x02, 0x02, 0x00, 0x80, 0x02, 0x02, 0x01, 0x00, 0x02, 0x01, 0x80, 0x02,
2584 0x02, 0xff, 0x7f, 0x02, 0x04, 0xba, 0xdd, 0xf0, 0x0d };
2587 0x36, 0x30, 0x36, 0x31, 0x36, 0x31, 0x30, 0x30, 0x30, 0x5a, 0x02, 0x01, 0x7f,
2588 0x02, 0x02, 0x00, 0x80, 0x02, 0x02, 0x01, 0x00, 0x02, 0x01, 0x80, 0x02, 0x02,
2589 0xff, 0x7f, 0x02, 0x04, 0xba, 0xdd, 0xf0, 0x0d };
2630 "Unexpected value\n");
2653 "Expected %d bytes, got %d\n",
ints[
i].encoded[1] + 2,
2656 ints[
i].encoded[1] + 2),
"Unexpected value\n");
2671 "Expected %d bytes, got %d\n",
times[0].encodedTime[1] + 2,
2674 times[0].encodedTime[1] + 2),
"Unexpected value\n");
2697 static const BYTE ext1[] = { 0x30,0x14,0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,
2698 0xff,0x04,0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x01 };
2699 static const BYTE ext2[] = { 0x30,0x11,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x04,
2700 0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x01 };
2701 static const BYTE ext3[] = { 0x30,0x07,0x30,0x05,0x06,0x01,0x29,0x04,0x00 };
2728 "Unexpected value\n");
2753 ok(
ext->cExtension ==
exts[
i].exts.cExtension,
2754 "Expected %d extensions, see %d\n",
exts[
i].exts.cExtension,
2756 for (
j = 0;
j <
min(
ext->cExtension,
exts[
i].exts.cExtension);
j++)
2759 exts[
i].exts.rgExtension[
j].pszObjId),
2760 "Expected OID %s, got %s\n",
2761 exts[
i].exts.rgExtension[
j].pszObjId,
2762 ext->rgExtension[
j].pszObjId);
2764 exts[
i].exts.rgExtension[
j].Value.pbData,
2765 exts[
i].exts.rgExtension[
j].Value.cbData),
2766 "Unexpected value\n");
2797 static const BYTE aKey[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xa, 0xb, 0xc, 0xd,
2802 0x30,0x0b,0x30,0x06,0x06,0x02,0x2a,0x03,0x05,0x00,0x03,0x01,0x00};
2804 0x30,0x09,0x30,0x04,0x06,0x02,0x2a,0x03,0x03,0x01,0x00};
2806 0x30,0x0f,0x30,0x0a,0x06,0x06,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x05,0x00,0x03,0x01,0x00};
2808 0x30,0x0d,0x30,0x08,0x06,0x06,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x03,0x01,0x00};
2810 0x30,0x1f,0x30,0x0a,0x06,0x06,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x05,0x00,0x03,0x11,0x00,0x00,0x01,
2811 0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f};
2813 0x30,0x1d,0x30,0x08,0x06,0x06,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x03,0x11,0x00,0x00,0x01,
2814 0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f};
2816 0x30,0x20,0x30,0x0b,0x06,0x06,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x01,0x01,
2817 0x03,0x11,0x00,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,
2820 0x30,0x20,0x30,0x0b,0x06,0x06,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x02,0x01,0x01,
2821 0x03,0x11,0x00,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,
2823 static unsigned char bin72[] = { 0x05,0x00};
2869 "Unexpected value\n");
2879 "Expected OID %s, got %s\n",
expected->Algorithm.pszObjId,
2883 "Expected parameters of %d bytes, got %d\n",
2885 if (
expected->Algorithm.Parameters.cbData)
2888 "Unexpected algorithm parameters\n");
2890 "Expected public key of %d bytes, got %d\n",
2899 static const BYTE bogusPubKeyInfo[] = { 0x30, 0x22, 0x30, 0x0d, 0x06, 0x06,
2900 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03,
2901 0x11, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
2902 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f };
2938 "Expected CRYPT_E_ASN1_CORRUPT or OSS_DATA_ERROR, got %08x\n",
2942 static const BYTE v1Cert[] = { 0x30, 0x33, 0x02, 0x00, 0x30, 0x02, 0x06, 0x00,
2943 0x30, 0x22, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30,
2944 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30,
2945 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, 0x07, 0x30,
2946 0x02, 0x06, 0x00, 0x03, 0x01, 0x00 };
2947 static const BYTE v2Cert[] = { 0x30, 0x38, 0xa0, 0x03, 0x02, 0x01, 0x01, 0x02,
2948 0x00, 0x30, 0x02, 0x06, 0x00, 0x30, 0x22, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31,
2949 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f,
2950 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30,
2951 0x30, 0x5a, 0x30, 0x07, 0x30, 0x02, 0x06, 0x00, 0x03, 0x01, 0x00 };
2952 static const BYTE v3Cert[] = { 0x30, 0x38, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02,
2953 0x00, 0x30, 0x02, 0x06, 0x00, 0x30, 0x22, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31,
2954 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f,
2955 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30,
2956 0x30, 0x5a, 0x30, 0x07, 0x30, 0x02, 0x06, 0x00, 0x03, 0x01, 0x00 };
2958 0x30,0x38,0xa0,0x03,0x02,0x01,0x03,0x02,0x00,0x30,0x02,0x06,0x00,0x30,0x22,
2959 0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,
2960 0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,
2961 0x30,0x30,0x30,0x5a,0x30,0x07,0x30,0x02,0x06,0x00,0x03,0x01,0x00 };
2963 0x02, 0x06, 0x00, 0x30, 0x22, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31,
2964 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x31, 0x36,
2965 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a,
2966 0x30, 0x07, 0x30, 0x02, 0x06, 0x00, 0x03, 0x01, 0x00, 0xa3, 0x16, 0x30, 0x14,
2967 0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x08, 0x30,
2968 0x06, 0x01, 0x01, 0xff, 0x02, 0x01, 0x01 };
2970 0x02, 0x06, 0x00, 0x30, 0x22, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31,
2971 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x31, 0x36,
2972 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a,
2973 0x30, 0x07, 0x30, 0x02, 0x06, 0x00, 0x03, 0x01, 0x00, 0xa3, 0x16, 0x30, 0x14,
2974 0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x08, 0x30,
2975 0x06, 0x01, 0x01, 0xff, 0x02, 0x01, 0x01 };
2976 static const BYTE bigCert[] = { 0x30, 0x7a, 0x02, 0x01, 0x01, 0x30, 0x02, 0x06,
2977 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13,
2978 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x22,
2979 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30,
2980 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30,
2981 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, 0x15, 0x31, 0x13, 0x30,
2982 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20,
2983 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x07, 0x30, 0x02, 0x06, 0x00, 0x03, 0x01,
2984 0x00, 0xa3, 0x16, 0x30, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01,
2985 0x01, 0xff, 0x04, 0x08, 0x30, 0x06, 0x01, 0x01, 0xff, 0x02, 0x01, 0x01 };
2987 0x30,0x81,0x95,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30,
2988 0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,
2989 0x6e,0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,
2990 0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,
2991 0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30,0x11,
2992 0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,
2993 0x67,0x00,0x30,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,
2994 0x01,0x01,0x05,0x00,0x03,0x11,0x00,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
2995 0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0xa3,0x16,0x30,0x14,0x30,0x12,0x06,
2996 0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01,0x01,0xff,0x02,
2999 0x30,0x81,0x93,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30,
3000 0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,
3001 0x6e,0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,
3002 0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,
3003 0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30,0x11,
3004 0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,
3005 0x67,0x00,0x30,0x20,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,
3006 0x01,0x01,0x03,0x11,0x00,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,
3007 0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0xa3,0x16,0x30,0x14,0x30,0x12,0x06,0x03,0x55,
3008 0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x01 };
3010 0x30,0x7b,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30,0x11,
3011 0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,
3012 0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,
3013 0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,
3014 0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30,0x11,0x06,
3015 0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,0x67,
3016 0x00,0x30,0x07,0x30,0x02,0x06,0x00,0x03,0x01,0x00,0xa3,0x17,0x30,0x15,0x30,
3017 0x13,0x06,0x03,0x55,0x1d,0x0e,0x04,0x0c,0x04,0x0a,0x4a,0x75,0x61,0x6e,0x20,
3018 0x4c,0x61,0x6e,0x67,0x00 };
3020 0x30,0x38,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,
3021 0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,
3022 0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,
3023 0x30,0x07,0x30,0x02,0x06,0x00,0x03,0x01,0x00,0x81,0x02,0x00,0x01 };
3025 0x30,0x81,0x99,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30,
3026 0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,
3027 0x6e,0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,
3028 0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,
3029 0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30,0x11,
3030 0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,
3031 0x67,0x00,0x30,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,
3032 0x01,0x01,0x05,0x00,0x03,0x11,0x00,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,
3033 0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x81,0x02,0x00,0x01,0xa3,0x16,0x30,
3034 0x14,0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,
3035 0x01,0x01,0xff,0x02,0x01,0x01 };
3037 0x30,0x81,0x97,0x02,0x01,0x01,0x30,0x02,0x06,0x00,0x30,0x15,0x31,0x13,0x30,
3038 0x11,0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,
3039 0x6e,0x67,0x00,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,0x30,0x31,
3040 0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x18,0x0f,0x31,0x36,0x30,0x31,0x30,0x31,
3041 0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x15,0x31,0x13,0x30,0x11,
3042 0x06,0x03,0x55,0x04,0x03,0x13,0x0a,0x4a,0x75,0x61,0x6e,0x20,0x4c,0x61,0x6e,
3043 0x67,0x00,0x30,0x20,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,
3044 0x01,0x01,0x03,0x11,0x00,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,
3045 0x0a,0x0b,0x0c,0x0d,0x0e,0x0f,0x81,0x02,0x00,0x01,0xa3,0x16,0x30,0x14,0x30,
3046 0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01,0x01,
3047 0xff,0x02,0x01,0x01 };
3067 "Expected STATUS_ACCESS_VIOLATION, got %08x\n",
GetLastError());
3076 ok(
size ==
v1Cert[1] + 2,
"Expected size %d, got %d\n",
3119 info.cExtension = 1;
3144 info.cExtension = 0;
3155 "Got unexpected value\n");
3159 info.IssuerUniqueId.cbData = 0;
3161 info.cExtension = 1;
3176 info.SubjectPublicKeyInfo.Algorithm.pszObjId = oid_rsa_rsa;
3177 info.SubjectPublicKeyInfo.PublicKey.cbData =
sizeof(
aKey);
3189 "Got unexpected value\n");
3202 "Wrong size %d\n",
size);
3205 size),
"unexpected value\n");
3210 "unexpected value\n");