46static BYTE bin2[] = { 0x4d, 0x69, 0x6e, 0x6e, 0x65, 0x73, 0x6f, 0x74,
48static BYTE bin3[] = { 0x4d, 0x69, 0x6e, 0x6e, 0x65, 0x61, 0x70, 0x6f,
50static BYTE bin4[] = { 0x43, 0x6f, 0x64, 0x65, 0x57, 0x65, 0x61, 0x76,
52static BYTE bin5[] = { 0x57, 0x69, 0x6e, 0x65, 0x20, 0x44, 0x65, 0x76,
53 0x65, 0x6c, 0x6f, 0x70, 0x6d, 0x65, 0x6e, 0x74 };
54static BYTE bin6[] = { 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73,
56static BYTE bin7[] = { 0x61, 0x72, 0x69, 0x63, 0x40, 0x63, 0x6f, 0x64,
57 0x65, 0x77, 0x65, 0x61, 0x76, 0x65, 0x72, 0x73, 0x2e, 0x63, 0x6f, 0x6d };
590x65,0x00,0x50,0x00,0x4b,0x00,0x49,0x00,0x20,0x00,0x52,0x00,0x6f,0x00,0x6f,
600x00,0x74,0x00,0x20,0x00,0x43,0x00,0x65,0x00,0x72,0x00,0x74,0x00,0x69,0x00,
610x66,0x00,0x69,0x00,0x63,0x00,0x61,0x00,0x74,0x00,0x69,0x00,0x6f,0x00,0x6e,
620x00,0x20,0x00,0x41,0x00,0x75,0x00,0x74,0x00,0x68,0x00,0x6f,0x00,0x72,0x00,
630x69,0x00,0x74,0x00,0x79,0x00 };
64static BYTE bin9[] = { 0x61, 0x62, 0x63, 0x22, 0x64, 0x65, 0x66 };
65static BYTE bin10[] = { 0x61, 0x62, 0x63, 0x27, 0x64, 0x65, 0x66 };
66static BYTE bin11[] = { 0x61, 0x62, 0x63, 0x2c, 0x20, 0x64, 0x65, 0x66 };
67static BYTE bin12[] = { 0x20, 0x61, 0x62, 0x63, 0x20 };
68static BYTE bin13[] = { 0x22, 0x64, 0x65, 0x66, 0x22 };
72{0x30,0x82,0x2,0xbb,0x30,0x82,0x2,0x24,0x2,0x9,0x0,0xe3,0x5a,0x10,0xf1,0xfc,
73 0x4b,0xf3,0xa2,0x30,0xd,0x6,0x9,0x2a,0x86,0x48,0x86,0xf7,0xd,0x1,0x1,0x4,0x5,
74 0x0,0x30,0x81,0xa1,0x31,0xb,0x30,0x9,0x6,0x3,0x55,0x4,0x6,0x13,0x2,0x55,0x53,
75 0x31,0x12,0x30,0x10,0x6,0x3,0x55,0x4,0x8,0x13,0x9,0x4d,0x69,0x6e,0x6e,0x65,
76 0x73,0x6f,0x74,0x61,0x31,0x14,0x30,0x12,0x6,0x3,0x55,0x4,0x7,0x13,0xb,0x4d,
77 0x69,0x6e,0x6e,0x65,0x61,0x70,0x6f,0x6c,0x69,0x73,0x31,0x14,0x30,0x12,0x6,0x3,
78 0x55,0x4,0xa,0x13,0xb,0x43,0x6f,0x64,0x65,0x57,0x65,0x61,0x76,0x65,0x72,0x73,
79 0x31,0x19,0x30,0x17,0x6,0x3,0x55,0x4,0xb,0x13,0x10,0x57,0x69,0x6e,0x65,0x20,
80 0x44,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d,0x65,0x6e,0x74,0x31,0x12,0x30,0x10,
81 0x6,0x3,0x55,0x4,0x3,0x13,0x9,0x6c,0x6f,0x63,0x61,0x6c,0x68,0x6f,0x73,0x74,
82 0x31,0x23,0x30,0x21,0x6,0x9,0x2a,0x86,0x48,0x86,0xf7,0xd,0x1,0x9,0x1,0x16,
83 0x14,0x61,0x72,0x69,0x63,0x40,0x63,0x6f,0x64,0x65,0x77,0x65,0x61,0x76,0x65,
84 0x72,0x73,0x2e,0x63,0x6f,0x6d,0x30,0x1e,0x17,0xd,0x30,0x36,0x30,0x31,0x32,
85 0x35,0x31,0x33,0x35,0x37,0x32,0x34,0x5a,0x17,0xd,0x30,0x36,0x30,0x32,0x32,
86 0x34,0x31,0x33,0x35,0x37,0x32,0x34,0x5a,0x30,0x81,0xa1,0x31,0xb,0x30,0x9,0x6,
87 0x3,0x55,0x4,0x6,0x13,0x2,0x55,0x53,0x31,0x12,0x30,0x10,0x6,0x3,0x55,0x4,0x8,
88 0x13,0x9,0x4d,0x69,0x6e,0x6e,0x65,0x73,0x6f,0x74,0x61,0x31,0x14,0x30,0x12,0x6,
89 0x3,0x55,0x4,0x7,0x13,0xb,0x4d,0x69,0x6e,0x6e,0x65,0x61,0x70,0x6f,0x6c,0x69,
90 0x73,0x31,0x14,0x30,0x12,0x6,0x3,0x55,0x4,0xa,0x13,0xb,0x43,0x6f,0x64,0x65,
91 0x57,0x65,0x61,0x76,0x65,0x72,0x73,0x31,0x19,0x30,0x17,0x6,0x3,0x55,0x4,0xb,
92 0x13,0x10,0x57,0x69,0x6e,0x65,0x20,0x44,0x65,0x76,0x65,0x6c,0x6f,0x70,0x6d,
93 0x65,0x6e,0x74,0x31,0x12,0x30,0x10,0x6,0x3,0x55,0x4,0x3,0x13,0x9,0x6c,0x6f,
94 0x63,0x61,0x6c,0x68,0x6f,0x73,0x74,0x31,0x23,0x30,0x21,0x6,0x9,0x2a,0x86,0x48,
95 0x86,0xf7,0xd,0x1,0x9,0x1,0x16,0x14,0x61,0x72,0x69,0x63,0x40,0x63,0x6f,0x64,
96 0x65,0x77,0x65,0x61,0x76,0x65,0x72,0x73,0x2e,0x63,0x6f,0x6d,0x30,0x81,0x9f,
97 0x30,0xd,0x6,0x9,0x2a,0x86,0x48,0x86,0xf7,0xd,0x1,0x1,0x1,0x5,0x0,0x3,0x81,
98 0x8d,0x0,0x30,0x81,0x89,0x2,0x81,0x81,0x0,0x9b,0xb5,0x8f,0xaf,0xfb,0x9a,0xaf,
99 0xdc,0xa2,0x4d,0xb1,0xc8,0x72,0x44,0xef,0x79,0x7f,0x28,0xb6,0xfe,0x50,0xdc,
100 0x8a,0xf7,0x11,0x2f,0x90,0x70,0xed,0xa4,0xa9,0xd,0xbf,0x82,0x3e,0x56,0xd8,
101 0x36,0xb6,0x9,0x52,0x83,0xab,0x65,0x95,0x0,0xe2,0xea,0x3c,0x4f,0x85,0xb8,0xc,
102 0x41,0x42,0x77,0x5c,0x9d,0x44,0xeb,0xcf,0x7d,0x60,0x64,0x7a,0x6c,0x4c,0xac,
103 0x4a,0x9a,0x23,0x25,0x15,0xd7,0x92,0xb4,0x10,0xe7,0x95,0xad,0x4b,0x93,0xda,
104 0x6a,0x76,0xe0,0xa5,0xd2,0x13,0x8,0x12,0x30,0x68,0xde,0xb9,0x5b,0x6e,0x2a,
105 0x97,0x43,0xaa,0x7b,0x22,0x33,0x34,0xb1,0xca,0x5d,0x19,0xd8,0x42,0x26,0x45,
106 0xc6,0xe9,0x1d,0xee,0x7,0xc2,0x27,0x95,0x87,0xd8,0x12,0xec,0x4b,0x16,0x9f,0x2,
107 0x3,0x1,0x0,0x1,0x30,0xd,0x6,0x9,0x2a,0x86,0x48,0x86,0xf7,0xd,0x1,0x1,0x4,0x5,
108 0x0,0x3,0x81,0x81,0x0,0x96,0xf9,0xf6,0x6a,0x3d,0xd9,0xca,0x6e,0xd5,0x76,0x73,
109 0xab,0x75,0xc1,0xcc,0x98,0x44,0xc3,0xa9,0x90,0x68,0x88,0x76,0xb9,0xeb,0xb6,
110 0xbe,0x60,0x62,0xb9,0x67,0x1e,0xcc,0xf4,0xe1,0xe7,0x6c,0xc8,0x67,0x3f,0x1d,
111 0xf3,0x68,0x86,0x30,0xee,0xaa,0x92,0x61,0x37,0xd7,0x82,0x90,0x28,0xaa,0x7a,
112 0x18,0x88,0x60,0x14,0x88,0x75,0xc0,0x4a,0x4e,0x7d,0x48,0xe7,0x3,0xa6,0xfd,
113 0xd7,0xce,0x3c,0xe5,0x9b,0xaf,0x2f,0xdc,0xbb,0x7c,0xbd,0x20,0x49,0xd9,0x68,
114 0x37,0xeb,0x5d,0xbb,0xe2,0x6d,0x66,0xe3,0x11,0xc1,0xa7,0x88,0x49,0xc6,0x6f,
115 0x65,0xd3,0xce,0xae,0x26,0x19,0x3,0x2e,0x4f,0x78,0xa5,0xa,0x97,0x7e,0x4f,0xc4,
116 0x91,0x8a,0xf8,0x5,0xef,0x5b,0x3b,0x49,0xbf,0x5f,0x2b};
119 "US, Minnesota, Minneapolis, CodeWeavers, Wine Development, localhost, aric@codeweavers.com";
121 "US; Minnesota; Minneapolis; CodeWeavers; Wine Development; localhost; aric@codeweavers.com";
123 "US\r\nMinnesota\r\nMinneapolis\r\nCodeWeavers\r\nWine Development\r\nlocalhost\r\naric@codeweavers.com";
125 "2.5.4.6=US, 2.5.4.8=Minnesota, 2.5.4.7=Minneapolis, 2.5.4.10=CodeWeavers, 2.5.4.11=Wine Development, 2.5.4.3=localhost, 1.2.840.113549.1.9.1=aric@codeweavers.com";
127 "2.5.4.6=US; 2.5.4.8=Minnesota; 2.5.4.7=Minneapolis; 2.5.4.10=CodeWeavers; 2.5.4.11=Wine Development; 2.5.4.3=localhost; 1.2.840.113549.1.9.1=aric@codeweavers.com";
129 "2.5.4.6=US\r\n2.5.4.8=Minnesota\r\n2.5.4.7=Minneapolis\r\n2.5.4.10=CodeWeavers\r\n2.5.4.11=Wine Development\r\n2.5.4.3=localhost\r\n1.2.840.113549.1.9.1=aric@codeweavers.com";
130static char x500SubjectStr[] =
"C=US, S=Minnesota, L=Minneapolis, O=CodeWeavers, OU=Wine Development, CN=localhost, E=aric@codeweavers.com";
133 'U',
'S',
',',
' ',
'M',
'i',
'n',
'n',
'e',
's',
'o',
't',
'a',
',',
' ',
'M',
'i',
'n',
'n',
134 'e',
'a',
'p',
'o',
'l',
'i',
's',
',',
' ',
'C',
'o',
'd',
'e',
'W',
'e',
'a',
'v',
'e',
'r',
135 's',
',',
' ',
'W',
'i',
'n',
'e',
' ',
'D',
'e',
'v',
'e',
'l',
'o',
'p',
'm',
'e',
'n',
't',
136 ',',
' ',
'l',
'o',
'c',
'a',
'l',
'h',
'o',
's',
't',
',',
' ',
'a',
'r',
'i',
'c',
'@',
'c',
137 'o',
'd',
'e',
'w',
'e',
'a',
'v',
'e',
'r',
's',
'.',
'c',
'o',
'm',0 };
139 'U',
'S',
';',
' ',
'M',
'i',
'n',
'n',
'e',
's',
'o',
't',
'a',
';',
' ',
'M',
'i',
'n',
'n',
140 'e',
'a',
'p',
'o',
'l',
'i',
's',
';',
' ',
'C',
'o',
'd',
'e',
'W',
'e',
'a',
'v',
'e',
'r',
141 's',
';',
' ',
'W',
'i',
'n',
'e',
' ',
'D',
'e',
'v',
'e',
'l',
'o',
'p',
'm',
'e',
'n',
't',
142 ';',
' ',
'l',
'o',
'c',
'a',
'l',
'h',
'o',
's',
't',
';',
' ',
'a',
'r',
'i',
'c',
'@',
'c',
143 'o',
'd',
'e',
'w',
'e',
'a',
'v',
'e',
'r',
's',
'.',
'c',
'o',
'm',0 };
145 'U',
'S',
'\r',
'\n',
'M',
'i',
'n',
'n',
'e',
's',
'o',
't',
'a',
'\r',
'\n',
'M',
'i',
'n',
146 'n',
'e',
'a',
'p',
'o',
'l',
'i',
's',
'\r',
'\n',
'C',
'o',
'd',
'e',
'W',
'e',
'a',
'v',
'e',
147 'r',
's',
'\r',
'\n',
'W',
'i',
'n',
'e',
' ',
'D',
'e',
'v',
'e',
'l',
'o',
'p',
'm',
'e',
'n',
148 't',
'\r',
'\n',
'l',
'o',
'c',
'a',
'l',
'h',
'o',
's',
't',
'\r',
'\n',
'a',
'r',
'i',
'c',
149 '@',
'c',
'o',
'd',
'e',
'w',
'e',
'a',
'v',
'e',
'r',
's',
'.',
'c',
'o',
'm',0 };
151 '2',
'.',
'5',
'.',
'4',
'.',
'6',
'=',
'U',
'S',
',',
' ',
'2',
'.',
'5',
'.',
'4',
'.',
'8',
152 '=',
'M',
'i',
'n',
'n',
'e',
's',
'o',
't',
'a',
',',
' ',
'2',
'.',
'5',
'.',
'4',
'.',
'7',
153 '=',
'M',
'i',
'n',
'n',
'e',
'a',
'p',
'o',
'l',
'i',
's',
',',
' ',
'2',
'.',
'5',
'.',
'4',
154 '.',
'1',
'0',
'=',
'C',
'o',
'd',
'e',
'W',
'e',
'a',
'v',
'e',
'r',
's',
',',
' ',
'2',
'.',
155 '5',
'.',
'4',
'.',
'1',
'1',
'=',
'W',
'i',
'n',
'e',
' ',
'D',
'e',
'v',
'e',
'l',
'o',
'p',
156 'm',
'e',
'n',
't',
',',
' ',
'2',
'.',
'5',
'.',
'4',
'.',
'3',
'=',
'l',
'o',
'c',
'a',
'l',
157 'h',
'o',
's',
't',
',',
' ',
'1',
'.',
'2',
'.',
'8',
'4',
'0',
'.',
'1',
'1',
'3',
'5',
'4',
158 '9',
'.',
'1',
'.',
'9',
'.',
'1',
'=',
'a',
'r',
'i',
'c',
'@',
'c',
'o',
'd',
'e',
'w',
'e',
159 'a',
'v',
'e',
'r',
's',
'.',
'c',
'o',
'm',0 };
161 '2',
'.',
'5',
'.',
'4',
'.',
'6',
'=',
'U',
'S',
';',
' ',
'2',
'.',
'5',
'.',
'4',
'.',
'8',
162 '=',
'M',
'i',
'n',
'n',
'e',
's',
'o',
't',
'a',
';',
' ',
'2',
'.',
'5',
'.',
'4',
'.',
'7',
163 '=',
'M',
'i',
'n',
'n',
'e',
'a',
'p',
'o',
'l',
'i',
's',
';',
' ',
'2',
'.',
'5',
'.',
'4',
164 '.',
'1',
'0',
'=',
'C',
'o',
'd',
'e',
'W',
'e',
'a',
'v',
'e',
'r',
's',
';',
' ',
'2',
'.',
165 '5',
'.',
'4',
'.',
'1',
'1',
'=',
'W',
'i',
'n',
'e',
' ',
'D',
'e',
'v',
'e',
'l',
'o',
'p',
166 'm',
'e',
'n',
't',
';',
' ',
'2',
'.',
'5',
'.',
'4',
'.',
'3',
'=',
'l',
'o',
'c',
'a',
'l',
167 'h',
'o',
's',
't',
';',
' ',
'1',
'.',
'2',
'.',
'8',
'4',
'0',
'.',
'1',
'1',
'3',
'5',
'4',
168 '9',
'.',
'1',
'.',
'9',
'.',
'1',
'=',
'a',
'r',
'i',
'c',
'@',
'c',
'o',
'd',
'e',
'w',
'e',
169 'a',
'v',
'e',
'r',
's',
'.',
'c',
'o',
'm',0 };
171 '2',
'.',
'5',
'.',
'4',
'.',
'6',
'=',
'U',
'S',
'\r',
'\n',
'2',
'.',
'5',
'.',
'4',
'.',
'8',
172 '=',
'M',
'i',
'n',
'n',
'e',
's',
'o',
't',
'a',
'\r',
'\n',
'2',
'.',
'5',
'.',
'4',
'.',
'7',
173 '=',
'M',
'i',
'n',
'n',
'e',
'a',
'p',
'o',
'l',
'i',
's',
'\r',
'\n',
'2',
'.',
'5',
'.',
'4',
174 '.',
'1',
'0',
'=',
'C',
'o',
'd',
'e',
'W',
'e',
'a',
'v',
'e',
'r',
's',
'\r',
'\n',
'2',
'.',
175 '5',
'.',
'4',
'.',
'1',
'1',
'=',
'W',
'i',
'n',
'e',
' ',
'D',
'e',
'v',
'e',
'l',
'o',
'p',
176 'm',
'e',
'n',
't',
'\r',
'\n',
'2',
'.',
'5',
'.',
'4',
'.',
'3',
'=',
'l',
'o',
'c',
'a',
'l',
177 'h',
'o',
's',
't',
'\r',
'\n',
'1',
'.',
'2',
'.',
'8',
'4',
'0',
'.',
'1',
'1',
'3',
'5',
'4',
178 '9',
'.',
'1',
'.',
'9',
'.',
'1',
'=',
'a',
'r',
'i',
'c',
'@',
'c',
'o',
'd',
'e',
'w',
'e',
179 'a',
'v',
'e',
'r',
's',
'.',
'c',
'o',
'm',0 };
181 'E',
'=',
'a',
'r',
'i',
'c',
'@',
'c',
'o',
'd',
'e',
'w',
'e',
'a',
'v',
'e',
'r',
's',
'.',
'c',
182 'o',
'm',
';',
' ',
'C',
'N',
'=',
'l',
'o',
'c',
'a',
'l',
'h',
'o',
's',
't',
';',
' ',
'O',
'U',
183 '=',
'W',
'i',
'n',
'e',
' ',
'D',
'e',
'v',
'e',
'l',
'o',
'p',
'm',
'e',
'n',
't',
';',
' ',
'O',
184 '=',
'C',
'o',
'd',
'e',
'W',
'e',
'a',
'v',
'e',
'r',
's',
';',
' ',
'L',
'=',
'M',
'i',
'n',
'n',
185 'e',
'a',
'p',
'o',
'l',
'i',
's',
';',
' ',
'S',
'=',
'M',
'i',
'n',
'n',
'e',
's',
'o',
't',
'a',
186 ';',
' ',
'C',
'=',
'U',
'S',0 };
238 static const char ePKI[] =
"ePKI Root Certification Authority";
240 if (!pCertRDNValueToStrA)
return;
251 ok(!
buffer[0],
"Expected empty string\n");
255 ret = pCertRDNValueToStrA(attrs[
i].dwValueType, &attrs[
i].
Value,
270 "Expected length %d, got %d\n",
lstrlenA(ePKI),
ret);
277 static const WCHAR usW[] = {
'U',
'S',0 };
278 static const WCHAR minnesotaW[] = {
'M',
'i',
'n',
'n',
'e',
's',
'o',
't',
'a',0 };
279 static const WCHAR minneapolisW[] = {
'M',
'i',
'n',
'n',
'e',
'a',
'p',
'o',
'l',
281 static const WCHAR codeweaversW[] = {
'C',
'o',
'd',
'e',
'W',
'e',
'a',
'v',
'e',
283 static const WCHAR wineDevW[] = {
'W',
'i',
'n',
'e',
' ',
'D',
'e',
'v',
'e',
'l',
284 'o',
'p',
'm',
'e',
'n',
't',0 };
285 static const WCHAR localhostW[] = {
'l',
'o',
'c',
'a',
'l',
'h',
'o',
's',
't',0 };
286 static const WCHAR aricW[] = {
'a',
'r',
'i',
'c',
'@',
'c',
'o',
'd',
'e',
'w',
'e',
287 'a',
'v',
'e',
'r',
's',
'.',
'c',
'o',
'm',0 };
288 static const WCHAR ePKIW[] = {
'e',
'P',
'K',
'I',
' ',
'R',
'o',
'o',
't',
' ',
289 'C',
'e',
'r',
't',
'i',
'f',
'i',
'c',
'a',
't',
'i',
'o',
'n',
' ',
'A',
'u',
't',
'h',
290 'o',
'r',
'i',
't',
'y',0 };
291 static const WCHAR embeddedDoubleQuoteW[] = {
'a',
'b',
'c',
'"',
'd',
'e',
'f',
293 static const WCHAR embeddedSingleQuoteW[] = {
'a',
'b',
'c',
'\'',
'd',
'e',
'f',
295 static const WCHAR embeddedCommaW[] = {
'a',
'b',
'c',
',',
' ',
'd',
'e',
'f',0 };
296 static const WCHAR trailingAndEndingSpaceW[] = {
' ',
'a',
'b',
'c',
' ',0 };
297 static const WCHAR enclosingQuotesW[] = {
'"',
'd',
'e',
'f',
'"',0 };
298 static const WCHAR embeddedSemiW[] = {
'1',
';',
'3',0 };
331 if (!pCertRDNValueToStrW)
333 win_skip(
"CertRDNValueToStrW is not available\n");
346 ok(!
buffer[0],
"Expected empty string\n");
364 "Expected length %d, got %d\n",
lstrlenW(ePKIW),
ret);
373 char buffer[2000] = { 0 };
3910x30,0x0c,0x31,0x0a,0x30,0x08,0x06,0x03,0x55,0x04,0x03,0x13,0x01,0x31 };
393 0x06,0x03,0x55,0x04,0x03,0x13,0x03,0x27,0x31,0x27 };
395 0x55,0x04,0x03,0x13,0x03,0x20,0x31,0x20 };
397 0x55, 0x04,0x03,0x1e,0x06,0x00,0x22,0x00,0x31,0x00,0x22, };
399 0x06,0x03,0x55,0x04,0x03,0x13,0x03,0x31,0x2b,0x32 };
4010x30,0x0e,0x31,0x0c,0x30,0x0a,0x06,0x03,0x55,0x04,0x03,0x13,0x03,0x61,0x2c,
4040x30,0x0e,0x31,0x0c,0x30,0x0a,0x06,0x03,0x55,0x04,0x03,0x13,0x03,0x61,0x3d,
4070x30,0x0d,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x03,0x1e,0x02,0x00,0x3c
4100x30,0x0d,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x03,0x1e,0x02,0x00,0x3e
4130x30,0x0d,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x03,0x1e,0x02,0x00,0x23
4160x30,0x0d,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x03,0x1e,0x02,0x00,0x3b
4190x30,0x11,0x31,0x0f,0x30,0x0d,0x06,0x03,0x55,0x04,0x03,0x1e,0x06,0x00,0x61,
4200x00,0x0a,0x00,0x62 };
4220x30,0x1F,0x31,0x0E,0x30,0x0C,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x64,0x75,
4230x6D,0x6D,0x79,0x31,0x0D,0x30,0x0B,0x06,0x03,0x55,0x04,0x0C,0x13,0x04,0x74,
4260x30,0x2F,0x31,0x12,0x30,0x10,0x06,0x03,0x55,0x04,0x03,0x13,0x09,0x57,0x69,
4270x6E,0x65,0x20,0x54,0x65,0x73,0x74,0x31,0x0C,0x30,0x0A,0x06,0x03,0x55,0x04,
4280x0C,0x13,0x03,0x31,0x32,0x33,0x31,0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06,
4290x13,0x02,0x42,0x52 };
436 if (!pCertNameToStrA)
438 win_skip(
"CertNameToStrA is not available\n");
444 ok(
context !=
NULL,
"CertCreateCertificateContext failed: %08x\n",
455 ret = pCertNameToStrA(0, &
context->pCertInfo->Issuer, 0,
NULL, 0);
457 "Expected retval 1 and ERROR_FILE_NOT_FOUND, got %d - %08x\n",
463 "Expected positive return and ERROR_SUCCESS, got %d - %08x\n",
565static const WCHAR quotedCN_W[] = {
'C',
'N',
'=',
'"',
'"',
'"',
'1',
'"',
'"',
'"',0 };
589 if (!pCertNameToStrW)
591 win_skip(
"CertNameToStrW is not available\n");
597 ok(
context !=
NULL,
"CertCreateCertificateContext failed: %08x\n",
608 ret = pCertNameToStrW(0, &
context->pCertInfo->Issuer, 0,
NULL, 0);
610 "Expected retval 1 and ERROR_FILE_NOT_FOUND, got %d - %08x\n",
616 "Expected positive return and ERROR_SUCCESS, got %d - %08x\n",
736 if (!pCertStrToNameA)
738 win_skip(
"CertStrToNameA is not available\n");
746 ok(!
ret,
"Expected failure\n");
749 "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n",
GetLastError());
752 "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n",
GetLastError());
755 "Expected ERROR_FILE_NOT_FOUND, got %08x\n",
GetLastError());
762 "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n",
GetLastError());
766 "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n",
GetLastError());
774 "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n",
GetLastError());
778 "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n",
GetLastError());
794 "Expected ERROR_MORE_DATA, got %08x\n",
GetLastError());
806 "Unexpected value for string %s\n",
namesA[
i].
x500);
821static const WCHAR dummyCN_W[] = {
'C',
'N',
'=',
'd',
'u',
'm',
'm',
'y',
',',
'T',
'=',
't',
'e',
's',
't',0 };
822static const WCHAR encodedFields_W[] = {
' ',
'C',
'N',
' ',
'=',
' ',
' ',
' ',
'W',
'i',
'n',
'e',
' ',
'T',
823 'e',
's',
't',
',',
'T',
' ',
'=',
' ',
'1',
'2',
'3',
',',
' ',
'C',
824 ' ',
'=',
' ',
'B',
'R',0 };
826 0x03,0x55,0x04,0x03,0x1e,0x04,0x22,0x6f,0x57,0x5b };
849 static const WCHAR bogusW[] = {
'b',
'o',
'g',
'u',
's',0 };
850 static const WCHAR fooW[] = {
'f',
'o',
'o',
'=',
'1',0 };
856 if (!pCertStrToNameW)
858 win_skip(
"CertStrToNameW is not available\n");
866 ok(!
ret,
"Expected failure\n");
869 "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n",
GetLastError());
872 "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n",
GetLastError());
875 "Expected ERROR_FILE_NOT_FOUND, got %08x\n",
GetLastError());
883 "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n",
GetLastError());
887 "Expected CRYPT_E_INVALID_X500_STRING, got %08x\n",
GetLastError());
888 ok(errorPtr && *errorPtr ==
'1',
"Expected first error character was 1\n");
908 if (!pCertGetNameStringA)
910 win_skip(
"CertGetNameStringA is not available\n");
916 ok(
context !=
NULL,
"CertCreateCertificateContext failed: %08x\n",
920 static const char aric[] =
"aric@codeweavers.com";
921 static const char localhost[] =
"localhost";
927 ok(
len == 1,
"expected 1, got %d\n",
len);
929 ok(
len == 1,
"expected 1, got %d\n",
len);
932 ok(
len == 1,
"expected 1, got %d\n",
len);
1043 "unexpected length %d\n",
len);
int strcmp(const char *String1, const char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_SIZE strlen(const char *String)
BOOL WINAPI CertFreeCertificateContext(PCCERT_CONTEXT pCertContext)
PCCERT_CONTEXT WINAPI CertCreateCertificateContext(DWORD dwCertEncodingType, const BYTE *pbCertEncoded, DWORD cbCertEncoded)
#define GetProcAddress(x, y)
#define HeapFree(x, y, z)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
GLuint GLuint GLsizei GLenum type
GLenum GLuint GLenum GLsizei const GLchar * buf
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
int WINAPI lstrlenA(LPCSTR lpString)
#define ERROR_FILE_NOT_FOUND
static const BYTE localhost[]
static const WCHAR simpleLessThanCN_W[]
static BYTE encodedQuotedCN[]
static BYTE encodedLessThanCN[]
static BYTE encodedSpacedCN[]
static const WCHAR multipleAttrCN_W[]
static WCHAR subjectStrW[]
static void test_CertGetNameStringA(void)
struct _CertRDNAttrEncodingW * PCertRDNAttrEncodingW
static DWORD DWORD void LPSTR DWORD cch
static const BYTE encodedJapaneseCN[]
static LPCSTR DWORD void * pvReserved
static char x500SubjectStr[]
static const WCHAR hashCN_W[]
static const WCHAR newlineCN_W[]
static const WCHAR simpleCN3_W[]
static LPCSTR DWORD void BYTE * pbEncoded
static const WCHAR simpleSingleQuotedCN_W[]
static void test_NameToStrConversionA(PCERT_NAME_BLOB pName, DWORD dwStrType, LPCSTR expected, BOOL todo)
static char issuerStrSemicolon[]
static WCHAR issuerStrCRLFW[]
static const WCHAR spacedCN_W[]
static const WCHAR simpleQuotedCN_W[]
static BYTE encodedEqualCN[]
static LPCSTR DWORD void BYTE DWORD LPCSTR * ppszError
static const WCHAR simpleSpacedCN_W[]
static BYTE encodedSimpleCN[]
static void test_NameToStrConversionW(PCERT_NAME_BLOB pName, DWORD dwStrType, LPCWSTR expected, BOOL todo)
struct _CertRDNAttrEncodingW CertRDNAttrEncodingW
static const WCHAR simpleMultipleAttrCN_W[]
static const WCHAR encodedFields_W[]
static BYTE encodedGreaterThanCN[]
static const WCHAR japaneseCN_W[]
static DWORD DWORD void * typePara
struct _CertRDNAttrEncoding CertRDNAttrEncoding
static const WCHAR badlyQuotedCN_W[]
static BYTE encodedNewlineCN[]
static const WCHAR equalCN_W[]
static const WCHAR simpleCN2_W[]
static const WCHAR simpleSemiCN_W[]
static BYTE encodedSemiCN[]
static const WCHAR simpleHashCN_W[]
static const WCHAR lessThanCN_W[]
static char x500SubjectStrSemicolonReverse[]
static WCHAR issuerStrSemicolonW[]
static BYTE encodedCommaCN[]
static const WCHAR singledQuotedCN_W[]
static BYTE encodedMultipleAttrCN[]
struct _CertRDNAttrEncoding * PCertRDNAttrEncoding
static char subjectStrCRLF[]
static void test_CertRDNValueToStrW(void)
static void test_CertNameToStrW(void)
static BYTE encodedSingleQuotedCN[]
static const WCHAR commaCN_W[]
static const WCHAR semiCN_W[]
static LPCSTR DWORD void BYTE DWORD * pcbEncoded
static WCHAR subjectStrSemicolonW[]
static char subjectStrSemicolon[]
static const struct StrToNameW namesW[]
static void test_CertStrToNameA(void)
static const WCHAR quotedCN_W[]
static const WCHAR simpleEqualCN_W[]
static void test_CertRDNValueToStrA(void)
static BYTE encodedHashCN[]
static void test_CertStrToNameW(void)
static const WCHAR simpleCN_W[]
static const WCHAR simpleGreaterThanCN_W[]
static const WCHAR simpleCommaCN_W[]
static WCHAR x500SubjectStrSemicolonReverseW[]
static const WCHAR simpleNewlineCN_W[]
static char issuerStrCRLF[]
static const WCHAR greaterThanCN_W[]
static BYTE encodedDummyCN[]
static const WCHAR dummyCN_W[]
static BYTE encodedFields[]
static WCHAR issuerStrW[]
static LPCSTR DWORD dwStrType
static WCHAR subjectStrCRLFW[]
static const struct StrToNameA namesA[]
static PCERT_RDN_VALUE_BLOB
static void test_CertNameToStrA(void)
static const WCHAR fooW[]
#define todo_wine_if(is_todo)
static const WCHAR localhostW[]
CERT_RDN_VALUE_BLOB Value
CERT_RDN_VALUE_BLOB Value
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
DWORD WINAPI GetLastError(void)
#define CERT_NAME_STR_NO_QUOTING_FLAG
#define CERT_RDN_UTF8_STRING
#define CERT_RDN_IA5_STRING
#define CERT_NAME_SIMPLE_DISPLAY_TYPE
#define CERT_RDN_PRINTABLE_STRING
#define CERT_X500_NAME_STR
#define CERT_NAME_EMAIL_TYPE
#define CERT_NAME_STR_NO_PLUS_FLAG
#define X509_ASN_ENCODING
#define CERT_NAME_STR_SEMICOLON_FLAG
_In_ DWORD dwCertEncodingType
#define CERT_SIMPLE_NAME_STR
#define CERT_NAME_STR_CRLF_FLAG
#define szOID_RSA_emailAddr
#define CERT_NAME_DNS_TYPE
#define CERT_NAME_RDN_TYPE
#define CERT_NAME_ATTR_TYPE
#define CERT_NAME_URL_TYPE
#define szOID_COMMON_NAME
#define CERT_NAME_STR_REVERSE_FLAG
#define CERT_OID_NAME_STR
#define CERT_NAME_FRIENDLY_DISPLAY_TYPE
#define CRYPT_E_INVALID_X500_STRING