1c2c66affSColin Finck /*
2c2c66affSColin Finck  * crypt32 certificate chain functions tests
3c2c66affSColin Finck  *
4c2c66affSColin Finck  * Copyright 2006 Juan Lang
5c2c66affSColin Finck  *
6c2c66affSColin Finck  * This library is free software; you can redistribute it and/or
7c2c66affSColin Finck  * modify it under the terms of the GNU Lesser General Public
8c2c66affSColin Finck  * License as published by the Free Software Foundation; either
9c2c66affSColin Finck  * version 2.1 of the License, or (at your option) any later version.
10c2c66affSColin Finck  *
11c2c66affSColin Finck  * This library is distributed in the hope that it will be useful,
12c2c66affSColin Finck  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13c2c66affSColin Finck  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14c2c66affSColin Finck  * Lesser General Public License for more details.
15c2c66affSColin Finck  *
16c2c66affSColin Finck  * You should have received a copy of the GNU Lesser General Public
17c2c66affSColin Finck  * License along with this library; if not, write to the Free Software
18c2c66affSColin Finck  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19c2c66affSColin Finck  */
20c2c66affSColin Finck 
21d03ac84fSAmine Khaldi #include <stdio.h>
22d03ac84fSAmine Khaldi #include <stdarg.h>
23c2c66affSColin Finck 
24d03ac84fSAmine Khaldi #include <windef.h>
25d03ac84fSAmine Khaldi #include <winbase.h>
26d03ac84fSAmine Khaldi #include <winerror.h>
27d03ac84fSAmine Khaldi #include <wincrypt.h>
28c2c66affSColin Finck #include <wininet.h>
29c2c66affSColin Finck 
30d03ac84fSAmine Khaldi #include "wine/test.h"
31d03ac84fSAmine Khaldi 
32c2c66affSColin Finck static const BYTE selfSignedCert[] = {
33c2c66affSColin Finck  0x30, 0x82, 0x01, 0x1f, 0x30, 0x81, 0xce, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02,
34c2c66affSColin Finck  0x10, 0xeb, 0x0d, 0x57, 0x2a, 0x9c, 0x09, 0xba, 0xa4, 0x4a, 0xb7, 0x25, 0x49,
35c2c66affSColin Finck  0xd9, 0x3e, 0xb5, 0x73, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0e, 0x03, 0x02, 0x1d,
36c2c66affSColin Finck  0x05, 0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03,
37c2c66affSColin Finck  0x13, 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30,
38c2c66affSColin Finck  0x1e, 0x17, 0x0d, 0x30, 0x36, 0x30, 0x36, 0x32, 0x39, 0x30, 0x35, 0x30, 0x30,
39c2c66affSColin Finck  0x34, 0x36, 0x5a, 0x17, 0x0d, 0x30, 0x37, 0x30, 0x36, 0x32, 0x39, 0x31, 0x31,
40c2c66affSColin Finck  0x30, 0x30, 0x34, 0x36, 0x5a, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03,
41c2c66affSColin Finck  0x55, 0x04, 0x03, 0x13, 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e,
42c2c66affSColin Finck  0x67, 0x00, 0x30, 0x5c, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7,
43c2c66affSColin Finck  0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x4b, 0x00, 0x30, 0x48, 0x02, 0x41,
44c2c66affSColin Finck  0x00, 0xe2, 0x54, 0x3a, 0xa7, 0x83, 0xb1, 0x27, 0x14, 0x3e, 0x59, 0xbb, 0xb4,
45c2c66affSColin Finck  0x53, 0xe6, 0x1f, 0xe7, 0x5d, 0xf1, 0x21, 0x68, 0xad, 0x85, 0x53, 0xdb, 0x6b,
46c2c66affSColin Finck  0x1e, 0xeb, 0x65, 0x97, 0x03, 0x86, 0x60, 0xde, 0xf3, 0x6c, 0x38, 0x75, 0xe0,
47c2c66affSColin Finck  0x4c, 0x61, 0xbb, 0xbc, 0x62, 0x17, 0xa9, 0xcd, 0x79, 0x3f, 0x21, 0x4e, 0x96,
48c2c66affSColin Finck  0xcb, 0x0e, 0xdc, 0x61, 0x94, 0x30, 0x18, 0x10, 0x6b, 0xd0, 0x1c, 0x10, 0x79,
49c2c66affSColin Finck  0x02, 0x03, 0x01, 0x00, 0x01, 0x30, 0x09, 0x06, 0x05, 0x2b, 0x0e, 0x03, 0x02,
50c2c66affSColin Finck  0x1d, 0x05, 0x00, 0x03, 0x41, 0x00, 0x25, 0x90, 0x53, 0x34, 0xd9, 0x56, 0x41,
51c2c66affSColin Finck  0x5e, 0xdb, 0x7e, 0x01, 0x36, 0xec, 0x27, 0x61, 0x5e, 0xb7, 0x4d, 0x90, 0x66,
52c2c66affSColin Finck  0xa2, 0xe1, 0x9d, 0x58, 0x76, 0xd4, 0x9c, 0xba, 0x2c, 0x84, 0xc6, 0x83, 0x7a,
53c2c66affSColin Finck  0x22, 0x0d, 0x03, 0x69, 0x32, 0x1a, 0x6d, 0xcb, 0x0c, 0x15, 0xb3, 0x6b, 0xc7,
54c2c66affSColin Finck  0x0a, 0x8c, 0xb4, 0x5c, 0x34, 0x78, 0xe0, 0x3c, 0x9c, 0xe9, 0xf3, 0x30, 0x9f,
55c2c66affSColin Finck  0xa8, 0x76, 0x57, 0x92, 0x36 };
56c2c66affSColin Finck 
57c2c66affSColin Finck static BOOL (WINAPI *pCertCreateCertificateChainEngine)(PCERT_CHAIN_ENGINE_CONFIG,HCERTCHAINENGINE*);
58c2c66affSColin Finck static BOOL (WINAPI *pCertGetCertificateChain)(HCERTCHAINENGINE,PCCERT_CONTEXT,LPFILETIME,HCERTSTORE,PCERT_CHAIN_PARA,DWORD,LPVOID,PCCERT_CHAIN_CONTEXT*);
59c2c66affSColin Finck static VOID (WINAPI *pCertFreeCertificateChain)(PCCERT_CHAIN_CONTEXT);
60c2c66affSColin Finck static VOID (WINAPI *pCertFreeCertificateChainEngine)(HCERTCHAINENGINE);
61c2c66affSColin Finck static BOOL (WINAPI *pCertVerifyCertificateChainPolicy)(LPCSTR,PCCERT_CHAIN_CONTEXT,PCERT_CHAIN_POLICY_PARA,PCERT_CHAIN_POLICY_STATUS);
62c2c66affSColin Finck 
63c2c66affSColin Finck #define IS_INTOID(x)    (((ULONG_PTR)(x) >> 16) == 0)
64c2c66affSColin Finck 
65c2c66affSColin Finck typedef struct _CERT_CHAIN_ENGINE_CONFIG_NO_EXCLUSIVE_ROOT
66c2c66affSColin Finck {
67c2c66affSColin Finck     DWORD       cbSize;
68c2c66affSColin Finck     HCERTSTORE  hRestrictedRoot;
69c2c66affSColin Finck     HCERTSTORE  hRestrictedTrust;
70c2c66affSColin Finck     HCERTSTORE  hRestrictedOther;
71c2c66affSColin Finck     DWORD       cAdditionalStore;
72c2c66affSColin Finck     HCERTSTORE *rghAdditionalStore;
73c2c66affSColin Finck     DWORD       dwFlags;
74c2c66affSColin Finck     DWORD       dwUrlRetrievalTimeout;
75c2c66affSColin Finck     DWORD       MaximumCachedCertificates;
76c2c66affSColin Finck     DWORD       CycleDetectionModulus;
77c2c66affSColin Finck } CERT_CHAIN_ENGINE_CONFIG_NO_EXCLUSIVE_ROOT;
78c2c66affSColin Finck 
testCreateCertChainEngine(void)79c2c66affSColin Finck static void testCreateCertChainEngine(void)
80c2c66affSColin Finck {
81c2c66affSColin Finck     BOOL ret;
82c2c66affSColin Finck     CERT_CHAIN_ENGINE_CONFIG_NO_EXCLUSIVE_ROOT config = { 0 };
83c2c66affSColin Finck     CERT_CHAIN_ENGINE_CONFIG *pConfig = (CERT_CHAIN_ENGINE_CONFIG *)&config;
84c2c66affSColin Finck     HCERTCHAINENGINE engine;
85c2c66affSColin Finck     HCERTSTORE store;
86c2c66affSColin Finck 
87c2c66affSColin Finck     if (!pCertCreateCertificateChainEngine || !pCertFreeCertificateChainEngine)
88c2c66affSColin Finck     {
89c2c66affSColin Finck         win_skip("Cert*CertificateChainEngine() functions are not available\n");
90c2c66affSColin Finck         return;
91c2c66affSColin Finck     }
92c2c66affSColin Finck 
93c2c66affSColin Finck     /* Crash
94c2c66affSColin Finck     ret = pCertCreateCertificateChainEngine(NULL, NULL);
95c2c66affSColin Finck     ret = pCertCreateCertificateChainEngine(NULL, &engine);
96c2c66affSColin Finck     ret = pCertCreateCertificateChainEngine(pConfig, NULL);
97c2c66affSColin Finck      */
98c2c66affSColin Finck     ret = pCertCreateCertificateChainEngine(pConfig, &engine);
99c2c66affSColin Finck     ok(!ret && GetLastError() == E_INVALIDARG,
100c2c66affSColin Finck      "Expected E_INVALIDARG, got %08x\n", GetLastError());
101c2c66affSColin Finck     /* Crashes
102c2c66affSColin Finck     config.cbSize = sizeof(config);
103c2c66affSColin Finck     ret = pCertCreateCertificateChainEngine(pConfig, NULL);
104c2c66affSColin Finck      */
105c2c66affSColin Finck     config.cbSize = sizeof(config);
106c2c66affSColin Finck     ret = pCertCreateCertificateChainEngine(pConfig, &engine);
107c2c66affSColin Finck     ok(ret, "CertCreateCertificateChainEngine failed: %08x\n", GetLastError());
108c2c66affSColin Finck     pCertFreeCertificateChainEngine(engine);
109c2c66affSColin Finck     config.dwFlags = 0xff000000;
110c2c66affSColin Finck     ret = pCertCreateCertificateChainEngine(pConfig, &engine);
111c2c66affSColin Finck     ok(ret, "CertCreateCertificateChainEngine failed: %08x\n", GetLastError());
112c2c66affSColin Finck     pCertFreeCertificateChainEngine(engine);
113c2c66affSColin Finck 
114c2c66affSColin Finck     /* Creating a cert with no root certs at all is allowed.. */
115c2c66affSColin Finck     store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0,
116c2c66affSColin Finck      CERT_STORE_CREATE_NEW_FLAG, NULL);
117c2c66affSColin Finck     config.hRestrictedRoot = store;
118c2c66affSColin Finck     ret = pCertCreateCertificateChainEngine(pConfig, &engine);
119c2c66affSColin Finck     ok(ret, "CertCreateCertificateChainEngine failed: %08x\n", GetLastError());
120c2c66affSColin Finck     pCertFreeCertificateChainEngine(engine);
121c2c66affSColin Finck 
122c2c66affSColin Finck     /* but creating one with a restricted root with a cert that isn't a member
123c2c66affSColin Finck      * of the Root store isn't allowed.
124c2c66affSColin Finck      */
125c2c66affSColin Finck     CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, selfSignedCert,
126c2c66affSColin Finck      sizeof(selfSignedCert), CERT_STORE_ADD_ALWAYS, NULL);
127c2c66affSColin Finck     ret = pCertCreateCertificateChainEngine(pConfig, &engine);
128c2c66affSColin Finck     /* ERROR_FILE_NOT_FOUND used in Windows 10 */
129c2c66affSColin Finck     ok(!ret && ((GetLastError() == CRYPT_E_NOT_FOUND) ||
130c2c66affSColin Finck                 (GetLastError() == ERROR_FILE_NOT_FOUND)),
131c2c66affSColin Finck         "Expected CRYPT_E_NOT_FOUND or ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError());
132c2c66affSColin Finck 
133c2c66affSColin Finck     CertCloseStore(store, 0);
134c2c66affSColin Finck }
135c2c66affSColin Finck 
136c2c66affSColin Finck static const BYTE bigCert[] = { 0x30, 0x7a, 0x02, 0x01, 0x01, 0x30, 0x02, 0x06,
137c2c66affSColin Finck  0x00, 0x30, 0x15, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13,
138c2c66affSColin Finck  0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20, 0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x22,
139c2c66affSColin Finck  0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30, 0x31, 0x30, 0x30, 0x30,
140c2c66affSColin Finck  0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x31, 0x36, 0x30, 0x31, 0x30, 0x31, 0x30,
141c2c66affSColin Finck  0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x30, 0x15, 0x31, 0x13, 0x30,
142c2c66affSColin Finck  0x11, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x0a, 0x4a, 0x75, 0x61, 0x6e, 0x20,
143c2c66affSColin Finck  0x4c, 0x61, 0x6e, 0x67, 0x00, 0x30, 0x07, 0x30, 0x02, 0x06, 0x00, 0x03, 0x01,
144c2c66affSColin Finck  0x00, 0xa3, 0x16, 0x30, 0x14, 0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01,
145c2c66affSColin Finck  0x01, 0xff, 0x04, 0x08, 0x30, 0x06, 0x01, 0x01, 0xff, 0x02, 0x01, 0x01 };
146c2c66affSColin Finck static const BYTE geotrust_global_ca[]={
147c2c66affSColin Finck 0x30,0x82,0x03,0x54,0x30,0x82,0x02,0x3c,0xa0,0x03,0x02,0x01,0x02,0x02,0x03,
148c2c66affSColin Finck 0x02,0x34,0x56,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,
149c2c66affSColin Finck 0x05,0x05,0x00,0x30,0x42,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,
150c2c66affSColin Finck 0x02,0x55,0x53,0x31,0x16,0x30,0x14,0x06,0x03,0x55,0x04,0x0a,0x13,0x0d,0x47,
151c2c66affSColin Finck 0x65,0x6f,0x54,0x72,0x75,0x73,0x74,0x20,0x49,0x6e,0x63,0x2e,0x31,0x1b,0x30,
152c2c66affSColin Finck 0x19,0x06,0x03,0x55,0x04,0x03,0x13,0x12,0x47,0x65,0x6f,0x54,0x72,0x75,0x73,
153c2c66affSColin Finck 0x74,0x20,0x47,0x6c,0x6f,0x62,0x61,0x6c,0x20,0x43,0x41,0x30,0x1e,0x17,0x0d,
154c2c66affSColin Finck 0x30,0x32,0x30,0x35,0x32,0x31,0x30,0x34,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,
155c2c66affSColin Finck 0x32,0x32,0x30,0x35,0x32,0x31,0x30,0x34,0x30,0x30,0x30,0x30,0x5a,0x30,0x42,
156c2c66affSColin Finck 0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x16,
157c2c66affSColin Finck 0x30,0x14,0x06,0x03,0x55,0x04,0x0a,0x13,0x0d,0x47,0x65,0x6f,0x54,0x72,0x75,
158c2c66affSColin Finck 0x73,0x74,0x20,0x49,0x6e,0x63,0x2e,0x31,0x1b,0x30,0x19,0x06,0x03,0x55,0x04,
159c2c66affSColin Finck 0x03,0x13,0x12,0x47,0x65,0x6f,0x54,0x72,0x75,0x73,0x74,0x20,0x47,0x6c,0x6f,
160c2c66affSColin Finck 0x62,0x61,0x6c,0x20,0x43,0x41,0x30,0x82,0x01,0x22,0x30,0x0d,0x06,0x09,0x2a,
161c2c66affSColin Finck 0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x82,0x01,0x0f,0x00,
162c2c66affSColin Finck 0x30,0x82,0x01,0x0a,0x02,0x82,0x01,0x01,0x00,0xda,0xcc,0x18,0x63,0x30,0xfd,
163c2c66affSColin Finck 0xf4,0x17,0x23,0x1a,0x56,0x7e,0x5b,0xdf,0x3c,0x6c,0x38,0xe4,0x71,0xb7,0x78,
164c2c66affSColin Finck 0x91,0xd4,0xbc,0xa1,0xd8,0x4c,0xf8,0xa8,0x43,0xb6,0x03,0xe9,0x4d,0x21,0x07,
165c2c66affSColin Finck 0x08,0x88,0xda,0x58,0x2f,0x66,0x39,0x29,0xbd,0x05,0x78,0x8b,0x9d,0x38,0xe8,
166c2c66affSColin Finck 0x05,0xb7,0x6a,0x7e,0x71,0xa4,0xe6,0xc4,0x60,0xa6,0xb0,0xef,0x80,0xe4,0x89,
167c2c66affSColin Finck 0x28,0x0f,0x9e,0x25,0xd6,0xed,0x83,0xf3,0xad,0xa6,0x91,0xc7,0x98,0xc9,0x42,
168c2c66affSColin Finck 0x18,0x35,0x14,0x9d,0xad,0x98,0x46,0x92,0x2e,0x4f,0xca,0xf1,0x87,0x43,0xc1,
169c2c66affSColin Finck 0x16,0x95,0x57,0x2d,0x50,0xef,0x89,0x2d,0x80,0x7a,0x57,0xad,0xf2,0xee,0x5f,
170c2c66affSColin Finck 0x6b,0xd2,0x00,0x8d,0xb9,0x14,0xf8,0x14,0x15,0x35,0xd9,0xc0,0x46,0xa3,0x7b,
171c2c66affSColin Finck 0x72,0xc8,0x91,0xbf,0xc9,0x55,0x2b,0xcd,0xd0,0x97,0x3e,0x9c,0x26,0x64,0xcc,
172c2c66affSColin Finck 0xdf,0xce,0x83,0x19,0x71,0xca,0x4e,0xe6,0xd4,0xd5,0x7b,0xa9,0x19,0xcd,0x55,
173c2c66affSColin Finck 0xde,0xc8,0xec,0xd2,0x5e,0x38,0x53,0xe5,0x5c,0x4f,0x8c,0x2d,0xfe,0x50,0x23,
174c2c66affSColin Finck 0x36,0xfc,0x66,0xe6,0xcb,0x8e,0xa4,0x39,0x19,0x00,0xb7,0x95,0x02,0x39,0x91,
175c2c66affSColin Finck 0x0b,0x0e,0xfe,0x38,0x2e,0xd1,0x1d,0x05,0x9a,0xf6,0x4d,0x3e,0x6f,0x0f,0x07,
176c2c66affSColin Finck 0x1d,0xaf,0x2c,0x1e,0x8f,0x60,0x39,0xe2,0xfa,0x36,0x53,0x13,0x39,0xd4,0x5e,
177c2c66affSColin Finck 0x26,0x2b,0xdb,0x3d,0xa8,0x14,0xbd,0x32,0xeb,0x18,0x03,0x28,0x52,0x04,0x71,
178c2c66affSColin Finck 0xe5,0xab,0x33,0x3d,0xe1,0x38,0xbb,0x07,0x36,0x84,0x62,0x9c,0x79,0xea,0x16,
179c2c66affSColin Finck 0x30,0xf4,0x5f,0xc0,0x2b,0xe8,0x71,0x6b,0xe4,0xf9,0x02,0x03,0x01,0x00,0x01,
180c2c66affSColin Finck 0xa3,0x53,0x30,0x51,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,
181c2c66affSColin Finck 0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x1d,0x06,0x03,0x55,0x1d,0x0e,0x04,0x16,
182c2c66affSColin Finck 0x04,0x14,0xc0,0x7a,0x98,0x68,0x8d,0x89,0xfb,0xab,0x05,0x64,0x0c,0x11,0x7d,
183c2c66affSColin Finck 0xaa,0x7d,0x65,0xb8,0xca,0xcc,0x4e,0x30,0x1f,0x06,0x03,0x55,0x1d,0x23,0x04,
184c2c66affSColin Finck 0x18,0x30,0x16,0x80,0x14,0xc0,0x7a,0x98,0x68,0x8d,0x89,0xfb,0xab,0x05,0x64,
185c2c66affSColin Finck 0x0c,0x11,0x7d,0xaa,0x7d,0x65,0xb8,0xca,0xcc,0x4e,0x30,0x0d,0x06,0x09,0x2a,
186c2c66affSColin Finck 0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x82,0x01,0x01,0x00,
187c2c66affSColin Finck 0x35,0xe3,0x29,0x6a,0xe5,0x2f,0x5d,0x54,0x8e,0x29,0x50,0x94,0x9f,0x99,0x1a,
188c2c66affSColin Finck 0x14,0xe4,0x8f,0x78,0x2a,0x62,0x94,0xa2,0x27,0x67,0x9e,0xd0,0xcf,0x1a,0x5e,
189c2c66affSColin Finck 0x47,0xe9,0xc1,0xb2,0xa4,0xcf,0xdd,0x41,0x1a,0x05,0x4e,0x9b,0x4b,0xee,0x4a,
190c2c66affSColin Finck 0x6f,0x55,0x52,0xb3,0x24,0xa1,0x37,0x0a,0xeb,0x64,0x76,0x2a,0x2e,0x2c,0xf3,
191c2c66affSColin Finck 0xfd,0x3b,0x75,0x90,0xbf,0xfa,0x71,0xd8,0xc7,0x3d,0x37,0xd2,0xb5,0x05,0x95,
192c2c66affSColin Finck 0x62,0xb9,0xa6,0xde,0x89,0x3d,0x36,0x7b,0x38,0x77,0x48,0x97,0xac,0xa6,0x20,
193c2c66affSColin Finck 0x8f,0x2e,0xa6,0xc9,0x0c,0xc2,0xb2,0x99,0x45,0x00,0xc7,0xce,0x11,0x51,0x22,
194c2c66affSColin Finck 0x22,0xe0,0xa5,0xea,0xb6,0x15,0x48,0x09,0x64,0xea,0x5e,0x4f,0x74,0xf7,0x05,
195c2c66affSColin Finck 0x3e,0xc7,0x8a,0x52,0x0c,0xdb,0x15,0xb4,0xbd,0x6d,0x9b,0xe5,0xc6,0xb1,0x54,
196c2c66affSColin Finck 0x68,0xa9,0xe3,0x69,0x90,0xb6,0x9a,0xa5,0x0f,0xb8,0xb9,0x3f,0x20,0x7d,0xae,
197c2c66affSColin Finck 0x4a,0xb5,0xb8,0x9c,0xe4,0x1d,0xb6,0xab,0xe6,0x94,0xa5,0xc1,0xc7,0x83,0xad,
198c2c66affSColin Finck 0xdb,0xf5,0x27,0x87,0x0e,0x04,0x6c,0xd5,0xff,0xdd,0xa0,0x5d,0xed,0x87,0x52,
199c2c66affSColin Finck 0xb7,0x2b,0x15,0x02,0xae,0x39,0xa6,0x6a,0x74,0xe9,0xda,0xc4,0xe7,0xbc,0x4d,
200c2c66affSColin Finck 0x34,0x1e,0xa9,0x5c,0x4d,0x33,0x5f,0x92,0x09,0x2f,0x88,0x66,0x5d,0x77,0x97,
201c2c66affSColin Finck 0xc7,0x1d,0x76,0x13,0xa9,0xd5,0xe5,0xf1,0x16,0x09,0x11,0x35,0xd5,0xac,0xdb,
202c2c66affSColin Finck 0x24,0x71,0x70,0x2c,0x98,0x56,0x0b,0xd9,0x17,0xb4,0xd1,0xe3,0x51,0x2b,0x5e,
203c2c66affSColin Finck 0x75,0xe8,0xd5,0xd0,0xdc,0x4f,0x34,0xed,0xc2,0x05,0x66,0x80,0xa1,0xcb,0xe6,
204c2c66affSColin Finck 0x33
205c2c66affSColin Finck };
206c2c66affSColin Finck /* Google Internet Authority G2 */
207c2c66affSColin Finck static const BYTE google_internet_authority[]={
208c2c66affSColin Finck 0x30,0x82,0x03,0xf0,0x30,0x82,0x02,0xd8,0xa0,0x03,0x02,0x01,0x02,0x02,0x03,
209c2c66affSColin Finck 0x02,0x3a,0x92,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,
210c2c66affSColin Finck 0x0b,0x05,0x00,0x30,0x42,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,
211c2c66affSColin Finck 0x02,0x55,0x53,0x31,0x16,0x30,0x14,0x06,0x03,0x55,0x04,0x0a,0x13,0x0d,0x47,
212c2c66affSColin Finck 0x65,0x6f,0x54,0x72,0x75,0x73,0x74,0x20,0x49,0x6e,0x63,0x2e,0x31,0x1b,0x30,
213c2c66affSColin Finck 0x19,0x06,0x03,0x55,0x04,0x03,0x13,0x12,0x47,0x65,0x6f,0x54,0x72,0x75,0x73,
214c2c66affSColin Finck 0x74,0x20,0x47,0x6c,0x6f,0x62,0x61,0x6c,0x20,0x43,0x41,0x30,0x1e,0x17,0x0d,
215c2c66affSColin Finck 0x31,0x35,0x30,0x34,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,
216c2c66affSColin Finck 0x31,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35,0x39,0x5a,0x30,0x49,
217c2c66affSColin Finck 0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x13,
218c2c66affSColin Finck 0x30,0x11,0x06,0x03,0x55,0x04,0x0a,0x13,0x0a,0x47,0x6f,0x6f,0x67,0x6c,0x65,
219c2c66affSColin Finck 0x20,0x49,0x6e,0x63,0x31,0x25,0x30,0x23,0x06,0x03,0x55,0x04,0x03,0x13,0x1c,
220c2c66affSColin Finck 0x47,0x6f,0x6f,0x67,0x6c,0x65,0x20,0x49,0x6e,0x74,0x65,0x72,0x6e,0x65,0x74,
221c2c66affSColin Finck 0x20,0x41,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x20,0x47,0x32,0x30,0x82,
222c2c66affSColin Finck 0x01,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,
223c2c66affSColin Finck 0x05,0x00,0x03,0x82,0x01,0x0f,0x00,0x30,0x82,0x01,0x0a,0x02,0x82,0x01,0x01,
224c2c66affSColin Finck 0x00,0x9c,0x2a,0x04,0x77,0x5c,0xd8,0x50,0x91,0x3a,0x06,0xa3,0x82,0xe0,0xd8,
225c2c66affSColin Finck 0x50,0x48,0xbc,0x89,0x3f,0xf1,0x19,0x70,0x1a,0x88,0x46,0x7e,0xe0,0x8f,0xc5,
226c2c66affSColin Finck 0xf1,0x89,0xce,0x21,0xee,0x5a,0xfe,0x61,0x0d,0xb7,0x32,0x44,0x89,0xa0,0x74,
227c2c66affSColin Finck 0x0b,0x53,0x4f,0x55,0xa4,0xce,0x82,0x62,0x95,0xee,0xeb,0x59,0x5f,0xc6,0xe1,
228c2c66affSColin Finck 0x05,0x80,0x12,0xc4,0x5e,0x94,0x3f,0xbc,0x5b,0x48,0x38,0xf4,0x53,0xf7,0x24,
229c2c66affSColin Finck 0xe6,0xfb,0x91,0xe9,0x15,0xc4,0xcf,0xf4,0x53,0x0d,0xf4,0x4a,0xfc,0x9f,0x54,
230c2c66affSColin Finck 0xde,0x7d,0xbe,0xa0,0x6b,0x6f,0x87,0xc0,0xd0,0x50,0x1f,0x28,0x30,0x03,0x40,
231c2c66affSColin Finck 0xda,0x08,0x73,0x51,0x6c,0x7f,0xff,0x3a,0x3c,0xa7,0x37,0x06,0x8e,0xbd,0x4b,
232c2c66affSColin Finck 0x11,0x04,0xeb,0x7d,0x24,0xde,0xe6,0xf9,0xfc,0x31,0x71,0xfb,0x94,0xd5,0x60,
233c2c66affSColin Finck 0xf3,0x2e,0x4a,0xaf,0x42,0xd2,0xcb,0xea,0xc4,0x6a,0x1a,0xb2,0xcc,0x53,0xdd,
234c2c66affSColin Finck 0x15,0x4b,0x8b,0x1f,0xc8,0x19,0x61,0x1f,0xcd,0x9d,0xa8,0x3e,0x63,0x2b,0x84,
235c2c66affSColin Finck 0x35,0x69,0x65,0x84,0xc8,0x19,0xc5,0x46,0x22,0xf8,0x53,0x95,0xbe,0xe3,0x80,
236c2c66affSColin Finck 0x4a,0x10,0xc6,0x2a,0xec,0xba,0x97,0x20,0x11,0xc7,0x39,0x99,0x10,0x04,0xa0,
237c2c66affSColin Finck 0xf0,0x61,0x7a,0x95,0x25,0x8c,0x4e,0x52,0x75,0xe2,0xb6,0xed,0x08,0xca,0x14,
238c2c66affSColin Finck 0xfc,0xce,0x22,0x6a,0xb3,0x4e,0xcf,0x46,0x03,0x97,0x97,0x03,0x7e,0xc0,0xb1,
239c2c66affSColin Finck 0xde,0x7b,0xaf,0x45,0x33,0xcf,0xba,0x3e,0x71,0xb7,0xde,0xf4,0x25,0x25,0xc2,
240c2c66affSColin Finck 0x0d,0x35,0x89,0x9d,0x9d,0xfb,0x0e,0x11,0x79,0x89,0x1e,0x37,0xc5,0xaf,0x8e,
241c2c66affSColin Finck 0x72,0x69,0x02,0x03,0x01,0x00,0x01,0xa3,0x81,0xe7,0x30,0x81,0xe4,0x30,0x1f,
242c2c66affSColin Finck 0x06,0x03,0x55,0x1d,0x23,0x04,0x18,0x30,0x16,0x80,0x14,0xc0,0x7a,0x98,0x68,
243c2c66affSColin Finck 0x8d,0x89,0xfb,0xab,0x05,0x64,0x0c,0x11,0x7d,0xaa,0x7d,0x65,0xb8,0xca,0xcc,
244c2c66affSColin Finck 0x4e,0x30,0x1d,0x06,0x03,0x55,0x1d,0x0e,0x04,0x16,0x04,0x14,0x4a,0xdd,0x06,
245c2c66affSColin Finck 0x16,0x1b,0xbc,0xf6,0x68,0xb5,0x76,0xf5,0x81,0xb6,0xbb,0x62,0x1a,0xba,0x5a,
246c2c66affSColin Finck 0x81,0x2f,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,0xff,0x04,0x04,0x03,
247c2c66affSColin Finck 0x02,0x01,0x06,0x30,0x2e,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x01,0x01,
248c2c66affSColin Finck 0x04,0x22,0x30,0x20,0x30,0x1e,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x30,
249c2c66affSColin Finck 0x01,0x86,0x12,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x67,0x2e,0x73,0x79,0x6d,
250c2c66affSColin Finck 0x63,0x64,0x2e,0x63,0x6f,0x6d,0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,
251c2c66affSColin Finck 0xff,0x04,0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x00,0x30,0x35,0x06,0x03,
252c2c66affSColin Finck 0x55,0x1d,0x1f,0x04,0x2e,0x30,0x2c,0x30,0x2a,0xa0,0x28,0xa0,0x26,0x86,0x24,
253c2c66affSColin Finck 0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x67,0x2e,0x73,0x79,0x6d,0x63,0x62,0x2e,
254c2c66affSColin Finck 0x63,0x6f,0x6d,0x2f,0x63,0x72,0x6c,0x73,0x2f,0x67,0x74,0x67,0x6c,0x6f,0x62,
255c2c66affSColin Finck 0x61,0x6c,0x2e,0x63,0x72,0x6c,0x30,0x17,0x06,0x03,0x55,0x1d,0x20,0x04,0x10,
256c2c66affSColin Finck 0x30,0x0e,0x30,0x0c,0x06,0x0a,0x2b,0x06,0x01,0x04,0x01,0xd6,0x79,0x02,0x05,
257c2c66affSColin Finck 0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x0b,0x05,
258c2c66affSColin Finck 0x00,0x03,0x82,0x01,0x01,0x00,0x08,0x4e,0x04,0xa7,0x80,0x7f,0x10,0x16,0x43,
259c2c66affSColin Finck 0x5e,0x02,0xad,0xd7,0x42,0x80,0xf4,0xb0,0x8e,0xd2,0xae,0xb3,0xeb,0x11,0x7d,
260c2c66affSColin Finck 0x90,0x84,0x18,0x7d,0xe7,0x90,0x15,0xfb,0x49,0x7f,0xa8,0x99,0x05,0x91,0xbb,
261c2c66affSColin Finck 0x7a,0xc9,0xd6,0x3c,0x37,0x18,0x09,0x9a,0xb6,0xc7,0x92,0x20,0x07,0x35,0x33,
262c2c66affSColin Finck 0x09,0xe4,0x28,0x63,0x72,0x0d,0xb4,0xe0,0x32,0x9c,0x87,0x98,0xc4,0x1b,0x76,
263c2c66affSColin Finck 0x89,0x67,0xc1,0x50,0x58,0xb0,0x13,0xaa,0x13,0x1a,0x1b,0x32,0xa5,0xbe,0xea,
264c2c66affSColin Finck 0x11,0x95,0x4c,0x48,0x63,0x49,0xe9,0x99,0x5d,0x20,0x37,0xcc,0xfe,0x2a,0x69,
265c2c66affSColin Finck 0x51,0x16,0x95,0x4b,0xa9,0xde,0x49,0x82,0xc0,0x10,0x70,0xf4,0x2c,0xf3,0xec,
266c2c66affSColin Finck 0xbc,0x24,0x24,0xd0,0x4e,0xac,0xa5,0xd9,0x5e,0x1e,0x6d,0x92,0xc1,0xa7,0xac,
267c2c66affSColin Finck 0x48,0x35,0x81,0xf9,0xe5,0xe4,0x9c,0x65,0x69,0xcd,0x87,0xa4,0x41,0x50,0x3f,
268c2c66affSColin Finck 0x2e,0x57,0xa5,0x91,0x51,0x12,0x58,0x0e,0x8c,0x09,0xa1,0xac,0x7a,0xa4,0x12,
269c2c66affSColin Finck 0xa5,0x27,0xf3,0x9a,0x10,0x97,0x7d,0x55,0x03,0x06,0xf7,0x66,0x58,0x5f,0x5f,
270c2c66affSColin Finck 0x64,0xe1,0xab,0x5d,0x6d,0xa5,0x39,0x48,0x75,0x98,0x4c,0x29,0x5a,0x3a,0x8d,
271c2c66affSColin Finck 0xd3,0x2b,0xca,0x9c,0x55,0x04,0xbf,0xf4,0xe6,0x14,0xd5,0x80,0xac,0x26,0xed,
272c2c66affSColin Finck 0x17,0x89,0xa6,0x93,0x6c,0x5c,0xa4,0xcc,0xb8,0xf0,0x66,0x8e,0x64,0xe3,0x7d,
273c2c66affSColin Finck 0x9a,0xe2,0x00,0xb3,0x49,0xc7,0xe4,0x0a,0xaa,0xdd,0x5b,0x83,0xc7,0x70,0x90,
274c2c66affSColin Finck 0x46,0x4e,0xbe,0xd0,0xdb,0x59,0x96,0x6c,0x2e,0xf5,0x16,0x36,0xde,0x71,0xcc,
275c2c66affSColin Finck 0x01,0xc2,0x12,0xc1,0x21,0xc6,0x16
276c2c66affSColin Finck };
277c2c66affSColin Finck /* *.google.com cert */
278c2c66affSColin Finck static const BYTE google_com[]={
279c2c66affSColin Finck 0x30,0x82,0x07,0x2f,0x30,0x82,0x06,0x17,0xa0,0x03,0x02,0x01,0x02,0x02,0x08,
280c2c66affSColin Finck 0x73,0x73,0x50,0xab,0x51,0x66,0x4b,0x73,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,
281c2c66affSColin Finck 0x86,0xf7,0x0d,0x01,0x01,0x0b,0x05,0x00,0x30,0x49,0x31,0x0b,0x30,0x09,0x06,
282c2c66affSColin Finck 0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x13,0x30,0x11,0x06,0x03,0x55,
283c2c66affSColin Finck 0x04,0x0a,0x13,0x0a,0x47,0x6f,0x6f,0x67,0x6c,0x65,0x20,0x49,0x6e,0x63,0x31,
284c2c66affSColin Finck 0x25,0x30,0x23,0x06,0x03,0x55,0x04,0x03,0x13,0x1c,0x47,0x6f,0x6f,0x67,0x6c,
285c2c66affSColin Finck 0x65,0x20,0x49,0x6e,0x74,0x65,0x72,0x6e,0x65,0x74,0x20,0x41,0x75,0x74,0x68,
286c2c66affSColin Finck 0x6f,0x72,0x69,0x74,0x79,0x20,0x47,0x32,0x30,0x1e,0x17,0x0d,0x31,0x36,0x31,
287c2c66affSColin Finck 0x31,0x31,0x30,0x31,0x35,0x34,0x35,0x35,0x33,0x5a,0x17,0x0d,0x31,0x37,0x30,
288c2c66affSColin Finck 0x32,0x30,0x32,0x31,0x35,0x33,0x31,0x30,0x30,0x5a,0x30,0x66,0x31,0x0b,0x30,
289c2c66affSColin Finck 0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x13,0x30,0x11,0x06,
290c2c66affSColin Finck 0x03,0x55,0x04,0x08,0x0c,0x0a,0x43,0x61,0x6c,0x69,0x66,0x6f,0x72,0x6e,0x69,
291c2c66affSColin Finck 0x61,0x31,0x16,0x30,0x14,0x06,0x03,0x55,0x04,0x07,0x0c,0x0d,0x4d,0x6f,0x75,
292c2c66affSColin Finck 0x6e,0x74,0x61,0x69,0x6e,0x20,0x56,0x69,0x65,0x77,0x31,0x13,0x30,0x11,0x06,
293c2c66affSColin Finck 0x03,0x55,0x04,0x0a,0x0c,0x0a,0x47,0x6f,0x6f,0x67,0x6c,0x65,0x20,0x49,0x6e,
294c2c66affSColin Finck 0x63,0x31,0x15,0x30,0x13,0x06,0x03,0x55,0x04,0x03,0x0c,0x0c,0x2a,0x2e,0x67,
295c2c66affSColin Finck 0x6f,0x6f,0x67,0x6c,0x65,0x2e,0x63,0x6f,0x6d,0x30,0x59,0x30,0x13,0x06,0x07,
296c2c66affSColin Finck 0x2a,0x86,0x48,0xce,0x3d,0x02,0x01,0x06,0x08,0x2a,0x86,0x48,0xce,0x3d,0x03,
297c2c66affSColin Finck 0x01,0x07,0x03,0x42,0x00,0x04,0xe6,0xec,0xdc,0xce,0x7e,0x73,0xe8,0x34,0x4f,
298c2c66affSColin Finck 0x1a,0xe1,0x29,0xf6,0x6d,0xe1,0xd4,0x63,0xc6,0x5f,0xcd,0xa7,0x0e,0x91,0xe3,
299c2c66affSColin Finck 0x6a,0x41,0xf6,0x64,0x30,0xfb,0x01,0xec,0x98,0xa2,0xb9,0xfe,0x63,0xef,0x07,
300c2c66affSColin Finck 0xec,0x09,0x50,0x99,0x0e,0x91,0xf9,0xca,0x56,0x16,0xdb,0x1c,0x10,0xe8,0x51,
301c2c66affSColin Finck 0x84,0xc7,0xb0,0x62,0x05,0x52,0x09,0xfc,0xce,0x1c,0xa3,0x82,0x04,0xc7,0x30,
302c2c66affSColin Finck 0x82,0x04,0xc3,0x30,0x1d,0x06,0x03,0x55,0x1d,0x25,0x04,0x16,0x30,0x14,0x06,
303c2c66affSColin Finck 0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x03,0x01,0x06,0x08,0x2b,0x06,0x01,0x05,
304c2c66affSColin Finck 0x05,0x07,0x03,0x02,0x30,0x82,0x03,0x86,0x06,0x03,0x55,0x1d,0x11,0x04,0x82,
305c2c66affSColin Finck 0x03,0x7d,0x30,0x82,0x03,0x79,0x82,0x0c,0x2a,0x2e,0x67,0x6f,0x6f,0x67,0x6c,
306c2c66affSColin Finck 0x65,0x2e,0x63,0x6f,0x6d,0x82,0x0d,0x2a,0x2e,0x61,0x6e,0x64,0x72,0x6f,0x69,
307c2c66affSColin Finck 0x64,0x2e,0x63,0x6f,0x6d,0x82,0x16,0x2a,0x2e,0x61,0x70,0x70,0x65,0x6e,0x67,
308c2c66affSColin Finck 0x69,0x6e,0x65,0x2e,0x67,0x6f,0x6f,0x67,0x6c,0x65,0x2e,0x63,0x6f,0x6d,0x82,
309c2c66affSColin Finck 0x12,0x2a,0x2e,0x63,0x6c,0x6f,0x75,0x64,0x2e,0x67,0x6f,0x6f,0x67,0x6c,0x65,
310c2c66affSColin Finck 0x2e,0x63,0x6f,0x6d,0x82,0x16,0x2a,0x2e,0x67,0x6f,0x6f,0x67,0x6c,0x65,0x2d,
311c2c66affSColin Finck 0x61,0x6e,0x61,0x6c,0x79,0x74,0x69,0x63,0x73,0x2e,0x63,0x6f,0x6d,0x82,0x0b,
312c2c66affSColin Finck 0x2a,0x2e,0x67,0x6f,0x6f,0x67,0x6c,0x65,0x2e,0x63,0x61,0x82,0x0b,0x2a,0x2e,
313c2c66affSColin Finck 0x67,0x6f,0x6f,0x67,0x6c,0x65,0x2e,0x63,0x6c,0x82,0x0e,0x2a,0x2e,0x67,0x6f,
314c2c66affSColin Finck 0x6f,0x67,0x6c,0x65,0x2e,0x63,0x6f,0x2e,0x69,0x6e,0x82,0x0e,0x2a,0x2e,0x67,
315c2c66affSColin Finck 0x6f,0x6f,0x67,0x6c,0x65,0x2e,0x63,0x6f,0x2e,0x6a,0x70,0x82,0x0e,0x2a,0x2e,
316c2c66affSColin Finck 0x67,0x6f,0x6f,0x67,0x6c,0x65,0x2e,0x63,0x6f,0x2e,0x75,0x6b,0x82,0x0f,0x2a,
317c2c66affSColin Finck 0x2e,0x67,0x6f,0x6f,0x67,0x6c,0x65,0x2e,0x63,0x6f,0x6d,0x2e,0x61,0x72,0x82,
318c2c66affSColin Finck 0x0f,0x2a,0x2e,0x67,0x6f,0x6f,0x67,0x6c,0x65,0x2e,0x63,0x6f,0x6d,0x2e,0x61,
319c2c66affSColin Finck 0x75,0x82,0x0f,0x2a,0x2e,0x67,0x6f,0x6f,0x67,0x6c,0x65,0x2e,0x63,0x6f,0x6d,
320c2c66affSColin Finck 0x2e,0x62,0x72,0x82,0x0f,0x2a,0x2e,0x67,0x6f,0x6f,0x67,0x6c,0x65,0x2e,0x63,
321c2c66affSColin Finck 0x6f,0x6d,0x2e,0x63,0x6f,0x82,0x0f,0x2a,0x2e,0x67,0x6f,0x6f,0x67,0x6c,0x65,
322c2c66affSColin Finck 0x2e,0x63,0x6f,0x6d,0x2e,0x6d,0x78,0x82,0x0f,0x2a,0x2e,0x67,0x6f,0x6f,0x67,
323c2c66affSColin Finck 0x6c,0x65,0x2e,0x63,0x6f,0x6d,0x2e,0x74,0x72,0x82,0x0f,0x2a,0x2e,0x67,0x6f,
324c2c66affSColin Finck 0x6f,0x67,0x6c,0x65,0x2e,0x63,0x6f,0x6d,0x2e,0x76,0x6e,0x82,0x0b,0x2a,0x2e,
325c2c66affSColin Finck 0x67,0x6f,0x6f,0x67,0x6c,0x65,0x2e,0x64,0x65,0x82,0x0b,0x2a,0x2e,0x67,0x6f,
326c2c66affSColin Finck 0x6f,0x67,0x6c,0x65,0x2e,0x65,0x73,0x82,0x0b,0x2a,0x2e,0x67,0x6f,0x6f,0x67,
327c2c66affSColin Finck 0x6c,0x65,0x2e,0x66,0x72,0x82,0x0b,0x2a,0x2e,0x67,0x6f,0x6f,0x67,0x6c,0x65,
328c2c66affSColin Finck 0x2e,0x68,0x75,0x82,0x0b,0x2a,0x2e,0x67,0x6f,0x6f,0x67,0x6c,0x65,0x2e,0x69,
329c2c66affSColin Finck 0x74,0x82,0x0b,0x2a,0x2e,0x67,0x6f,0x6f,0x67,0x6c,0x65,0x2e,0x6e,0x6c,0x82,
330c2c66affSColin Finck 0x0b,0x2a,0x2e,0x67,0x6f,0x6f,0x67,0x6c,0x65,0x2e,0x70,0x6c,0x82,0x0b,0x2a,
331c2c66affSColin Finck 0x2e,0x67,0x6f,0x6f,0x67,0x6c,0x65,0x2e,0x70,0x74,0x82,0x12,0x2a,0x2e,0x67,
332c2c66affSColin Finck 0x6f,0x6f,0x67,0x6c,0x65,0x61,0x64,0x61,0x70,0x69,0x73,0x2e,0x63,0x6f,0x6d,
333c2c66affSColin Finck 0x82,0x0f,0x2a,0x2e,0x67,0x6f,0x6f,0x67,0x6c,0x65,0x61,0x70,0x69,0x73,0x2e,
334c2c66affSColin Finck 0x63,0x6e,0x82,0x14,0x2a,0x2e,0x67,0x6f,0x6f,0x67,0x6c,0x65,0x63,0x6f,0x6d,
335c2c66affSColin Finck 0x6d,0x65,0x72,0x63,0x65,0x2e,0x63,0x6f,0x6d,0x82,0x11,0x2a,0x2e,0x67,0x6f,
336c2c66affSColin Finck 0x6f,0x67,0x6c,0x65,0x76,0x69,0x64,0x65,0x6f,0x2e,0x63,0x6f,0x6d,0x82,0x0c,
337c2c66affSColin Finck 0x2a,0x2e,0x67,0x73,0x74,0x61,0x74,0x69,0x63,0x2e,0x63,0x6e,0x82,0x0d,0x2a,
338c2c66affSColin Finck 0x2e,0x67,0x73,0x74,0x61,0x74,0x69,0x63,0x2e,0x63,0x6f,0x6d,0x82,0x0a,0x2a,
339c2c66affSColin Finck 0x2e,0x67,0x76,0x74,0x31,0x2e,0x63,0x6f,0x6d,0x82,0x0a,0x2a,0x2e,0x67,0x76,
340c2c66affSColin Finck 0x74,0x32,0x2e,0x63,0x6f,0x6d,0x82,0x14,0x2a,0x2e,0x6d,0x65,0x74,0x72,0x69,
341c2c66affSColin Finck 0x63,0x2e,0x67,0x73,0x74,0x61,0x74,0x69,0x63,0x2e,0x63,0x6f,0x6d,0x82,0x0c,
342c2c66affSColin Finck 0x2a,0x2e,0x75,0x72,0x63,0x68,0x69,0x6e,0x2e,0x63,0x6f,0x6d,0x82,0x10,0x2a,
343c2c66affSColin Finck 0x2e,0x75,0x72,0x6c,0x2e,0x67,0x6f,0x6f,0x67,0x6c,0x65,0x2e,0x63,0x6f,0x6d,
344c2c66affSColin Finck 0x82,0x16,0x2a,0x2e,0x79,0x6f,0x75,0x74,0x75,0x62,0x65,0x2d,0x6e,0x6f,0x63,
345c2c66affSColin Finck 0x6f,0x6f,0x6b,0x69,0x65,0x2e,0x63,0x6f,0x6d,0x82,0x0d,0x2a,0x2e,0x79,0x6f,
346c2c66affSColin Finck 0x75,0x74,0x75,0x62,0x65,0x2e,0x63,0x6f,0x6d,0x82,0x16,0x2a,0x2e,0x79,0x6f,
347c2c66affSColin Finck 0x75,0x74,0x75,0x62,0x65,0x65,0x64,0x75,0x63,0x61,0x74,0x69,0x6f,0x6e,0x2e,
348c2c66affSColin Finck 0x63,0x6f,0x6d,0x82,0x0b,0x2a,0x2e,0x79,0x74,0x69,0x6d,0x67,0x2e,0x63,0x6f,
349c2c66affSColin Finck 0x6d,0x82,0x1a,0x61,0x6e,0x64,0x72,0x6f,0x69,0x64,0x2e,0x63,0x6c,0x69,0x65,
350c2c66affSColin Finck 0x6e,0x74,0x73,0x2e,0x67,0x6f,0x6f,0x67,0x6c,0x65,0x2e,0x63,0x6f,0x6d,0x82,
351c2c66affSColin Finck 0x0b,0x61,0x6e,0x64,0x72,0x6f,0x69,0x64,0x2e,0x63,0x6f,0x6d,0x82,0x1b,0x64,
352c2c66affSColin Finck 0x65,0x76,0x65,0x6c,0x6f,0x70,0x65,0x72,0x2e,0x61,0x6e,0x64,0x72,0x6f,0x69,
353c2c66affSColin Finck 0x64,0x2e,0x67,0x6f,0x6f,0x67,0x6c,0x65,0x2e,0x63,0x6e,0x82,0x04,0x67,0x2e,
354c2c66affSColin Finck 0x63,0x6f,0x82,0x06,0x67,0x6f,0x6f,0x2e,0x67,0x6c,0x82,0x14,0x67,0x6f,0x6f,
355c2c66affSColin Finck 0x67,0x6c,0x65,0x2d,0x61,0x6e,0x61,0x6c,0x79,0x74,0x69,0x63,0x73,0x2e,0x63,
356c2c66affSColin Finck 0x6f,0x6d,0x82,0x0a,0x67,0x6f,0x6f,0x67,0x6c,0x65,0x2e,0x63,0x6f,0x6d,0x82,
357c2c66affSColin Finck 0x12,0x67,0x6f,0x6f,0x67,0x6c,0x65,0x63,0x6f,0x6d,0x6d,0x65,0x72,0x63,0x65,
358c2c66affSColin Finck 0x2e,0x63,0x6f,0x6d,0x82,0x19,0x70,0x6f,0x6c,0x69,0x63,0x79,0x2e,0x6d,0x74,
359c2c66affSColin Finck 0x61,0x2d,0x73,0x74,0x73,0x2e,0x67,0x6f,0x6f,0x67,0x6c,0x65,0x2e,0x63,0x6f,
360c2c66affSColin Finck 0x6d,0x82,0x0a,0x75,0x72,0x63,0x68,0x69,0x6e,0x2e,0x63,0x6f,0x6d,0x82,0x0a,
361c2c66affSColin Finck 0x77,0x77,0x77,0x2e,0x67,0x6f,0x6f,0x2e,0x67,0x6c,0x82,0x08,0x79,0x6f,0x75,
362c2c66affSColin Finck 0x74,0x75,0x2e,0x62,0x65,0x82,0x0b,0x79,0x6f,0x75,0x74,0x75,0x62,0x65,0x2e,
363c2c66affSColin Finck 0x63,0x6f,0x6d,0x82,0x14,0x79,0x6f,0x75,0x74,0x75,0x62,0x65,0x65,0x64,0x75,
364c2c66affSColin Finck 0x63,0x61,0x74,0x69,0x6f,0x6e,0x2e,0x63,0x6f,0x6d,0x30,0x0b,0x06,0x03,0x55,
365c2c66affSColin Finck 0x1d,0x0f,0x04,0x04,0x03,0x02,0x07,0x80,0x30,0x68,0x06,0x08,0x2b,0x06,0x01,
366c2c66affSColin Finck 0x05,0x05,0x07,0x01,0x01,0x04,0x5c,0x30,0x5a,0x30,0x2b,0x06,0x08,0x2b,0x06,
367c2c66affSColin Finck 0x01,0x05,0x05,0x07,0x30,0x02,0x86,0x1f,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,
368c2c66affSColin Finck 0x70,0x6b,0x69,0x2e,0x67,0x6f,0x6f,0x67,0x6c,0x65,0x2e,0x63,0x6f,0x6d,0x2f,
369c2c66affSColin Finck 0x47,0x49,0x41,0x47,0x32,0x2e,0x63,0x72,0x74,0x30,0x2b,0x06,0x08,0x2b,0x06,
370c2c66affSColin Finck 0x01,0x05,0x05,0x07,0x30,0x01,0x86,0x1f,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,
371c2c66affSColin Finck 0x63,0x6c,0x69,0x65,0x6e,0x74,0x73,0x31,0x2e,0x67,0x6f,0x6f,0x67,0x6c,0x65,
372c2c66affSColin Finck 0x2e,0x63,0x6f,0x6d,0x2f,0x6f,0x63,0x73,0x70,0x30,0x1d,0x06,0x03,0x55,0x1d,
373c2c66affSColin Finck 0x0e,0x04,0x16,0x04,0x14,0xe8,0xf5,0x4a,0xed,0x91,0xb9,0xc8,0x2d,0x5d,0xfb,
374c2c66affSColin Finck 0x47,0x65,0x53,0x1b,0x47,0x6f,0xe6,0xe9,0x63,0xa3,0x30,0x0c,0x06,0x03,0x55,
375c2c66affSColin Finck 0x1d,0x13,0x01,0x01,0xff,0x04,0x02,0x30,0x00,0x30,0x1f,0x06,0x03,0x55,0x1d,
376c2c66affSColin Finck 0x23,0x04,0x18,0x30,0x16,0x80,0x14,0x4a,0xdd,0x06,0x16,0x1b,0xbc,0xf6,0x68,
377c2c66affSColin Finck 0xb5,0x76,0xf5,0x81,0xb6,0xbb,0x62,0x1a,0xba,0x5a,0x81,0x2f,0x30,0x21,0x06,
378c2c66affSColin Finck 0x03,0x55,0x1d,0x20,0x04,0x1a,0x30,0x18,0x30,0x0c,0x06,0x0a,0x2b,0x06,0x01,
379c2c66affSColin Finck 0x04,0x01,0xd6,0x79,0x02,0x05,0x01,0x30,0x08,0x06,0x06,0x67,0x81,0x0c,0x01,
380c2c66affSColin Finck 0x02,0x02,0x30,0x30,0x06,0x03,0x55,0x1d,0x1f,0x04,0x29,0x30,0x27,0x30,0x25,
381c2c66affSColin Finck 0xa0,0x23,0xa0,0x21,0x86,0x1f,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x70,0x6b,
382c2c66affSColin Finck 0x69,0x2e,0x67,0x6f,0x6f,0x67,0x6c,0x65,0x2e,0x63,0x6f,0x6d,0x2f,0x47,0x49,
383c2c66affSColin Finck 0x41,0x47,0x32,0x2e,0x63,0x72,0x6c,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,
384c2c66affSColin Finck 0xf7,0x0d,0x01,0x01,0x0b,0x05,0x00,0x03,0x82,0x01,0x01,0x00,0x0c,0x58,0x93,
385c2c66affSColin Finck 0x06,0x54,0x42,0x57,0x48,0xe4,0xfa,0x57,0xf0,0x5b,0x96,0x94,0xfc,0xf3,0x3d,
386c2c66affSColin Finck 0xe3,0xba,0x73,0x71,0xe9,0xe7,0x56,0x3d,0x21,0x70,0x82,0x4d,0x59,0x7e,0x85,
387c2c66affSColin Finck 0xbd,0x87,0x36,0xb6,0x43,0x4a,0xe7,0x6f,0x0a,0x95,0xbf,0xde,0x35,0x1c,0x60,
388c2c66affSColin Finck 0xbf,0xd1,0x60,0x41,0x98,0x6d,0xe9,0xea,0xcc,0xa1,0x85,0x91,0x94,0x7e,0x71,
389c2c66affSColin Finck 0xa3,0x40,0x40,0x5a,0xbb,0x7d,0x49,0xfd,0x39,0xf9,0xf1,0xe5,0x2f,0xee,0xcf,
390c2c66affSColin Finck 0xcf,0x65,0xca,0xc1,0xb4,0xf1,0xb5,0xae,0xf3,0x6b,0x53,0x7d,0x8d,0x2b,0x60,
391c2c66affSColin Finck 0x1c,0x2a,0xb3,0xa5,0xe0,0x55,0x11,0x8d,0x13,0xd8,0x91,0x5a,0xb0,0xcc,0x91,
392c2c66affSColin Finck 0xa8,0xbc,0x2b,0x6b,0x63,0xff,0x14,0xfe,0x00,0x16,0x07,0xfb,0xef,0xae,0xd5,
393c2c66affSColin Finck 0xa8,0x13,0x0e,0x59,0xdc,0x68,0x96,0xd5,0x63,0xea,0xf7,0x56,0x0e,0x38,0x5a,
394c2c66affSColin Finck 0x57,0xc8,0x5e,0x52,0x95,0xe3,0xab,0x0a,0x33,0xc8,0x61,0xb2,0xdf,0xdb,0x77,
395c2c66affSColin Finck 0xea,0x49,0x90,0x3d,0xa8,0xd1,0x56,0x40,0x16,0xa5,0x14,0x5d,0xc3,0xc6,0x09,
396c2c66affSColin Finck 0xc2,0xd1,0x03,0xac,0x2e,0x02,0xab,0x88,0x59,0xb2,0x18,0x2b,0xf9,0xfb,0xf5,
397c2c66affSColin Finck 0xfc,0x64,0x7c,0x73,0x1c,0xa0,0x05,0xaf,0xc8,0x2f,0x4d,0xb0,0x1b,0x20,0x40,
398c2c66affSColin Finck 0xe2,0x8b,0x17,0xb1,0x5b,0x71,0xd0,0x4b,0x5d,0xa4,0x07,0x7b,0xd9,0xbf,0x39,
399c2c66affSColin Finck 0x72,0x4e,0x35,0x8f,0xf2,0x13,0x6d,0xb9,0x6b,0x5d,0x02,0x55,0x85,0x4a,0x78,
400c2c66affSColin Finck 0xfc,0x76,0x0e,0x65,0xf4,0xd6,0xe0,0x29,0x6e,0x04,0x57,0x22,0x03,0x8e,0x6b,
401c2c66affSColin Finck 0x59,0x4f,0x43,0x6a,0x5b,0x36,0xaa,0xa5,0x68,0xb4,0x1a,0x60,0x88
402c2c66affSColin Finck };
403c2c66affSColin Finck /* *.winehq.org cert */
404c2c66affSColin Finck static const BYTE winehq_org[] = {
405c2c66affSColin Finck 0x30,0x82,0x05,0x2a,0x30,0x82,0x04,0x12,0xa0,0x03,0x02,0x01,0x02,0x02,0x03,
406c2c66affSColin Finck 0x0c,0x35,0xd0,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,
407c2c66affSColin Finck 0x05,0x05,0x00,0x30,0x3c,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,
408c2c66affSColin Finck 0x02,0x55,0x53,0x31,0x17,0x30,0x15,0x06,0x03,0x55,0x04,0x0a,0x13,0x0e,0x47,
409c2c66affSColin Finck 0x65,0x6f,0x54,0x72,0x75,0x73,0x74,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x14,
410c2c66affSColin Finck 0x30,0x12,0x06,0x03,0x55,0x04,0x03,0x13,0x0b,0x52,0x61,0x70,0x69,0x64,0x53,
411c2c66affSColin Finck 0x53,0x4c,0x20,0x43,0x41,0x30,0x1e,0x17,0x0d,0x31,0x33,0x30,0x35,0x32,0x32,
412c2c66affSColin Finck 0x30,0x33,0x35,0x36,0x30,0x39,0x5a,0x17,0x0d,0x31,0x34,0x30,0x35,0x32,0x35,
413c2c66affSColin Finck 0x30,0x37,0x33,0x34,0x31,0x34,0x5a,0x30,0x81,0xbb,0x31,0x29,0x30,0x27,0x06,
414c2c66affSColin Finck 0x03,0x55,0x04,0x05,0x13,0x20,0x30,0x6d,0x4a,0x75,0x76,0x31,0x74,0x2d,0x31,
415c2c66affSColin Finck 0x43,0x46,0x79,0x70,0x51,0x6b,0x79,0x54,0x5a,0x77,0x66,0x76,0x6a,0x48,0x48,
416c2c66affSColin Finck 0x42,0x41,0x62,0x6e,0x55,0x6e,0x64,0x47,0x31,0x13,0x30,0x11,0x06,0x03,0x55,
417c2c66affSColin Finck 0x04,0x0b,0x13,0x0a,0x47,0x54,0x39,0x38,0x33,0x38,0x30,0x30,0x31,0x31,0x31,
418c2c66affSColin Finck 0x31,0x30,0x2f,0x06,0x03,0x55,0x04,0x0b,0x13,0x28,0x53,0x65,0x65,0x20,0x77,
419c2c66affSColin Finck 0x77,0x77,0x2e,0x72,0x61,0x70,0x69,0x64,0x73,0x73,0x6c,0x2e,0x63,0x6f,0x6d,
420c2c66affSColin Finck 0x2f,0x72,0x65,0x73,0x6f,0x75,0x72,0x63,0x65,0x73,0x2f,0x63,0x70,0x73,0x20,
421c2c66affSColin Finck 0x28,0x63,0x29,0x31,0x33,0x31,0x2f,0x30,0x2d,0x06,0x03,0x55,0x04,0x0b,0x13,
422c2c66affSColin Finck 0x26,0x44,0x6f,0x6d,0x61,0x69,0x6e,0x20,0x43,0x6f,0x6e,0x74,0x72,0x6f,0x6c,
423c2c66affSColin Finck 0x20,0x56,0x61,0x6c,0x69,0x64,0x61,0x74,0x65,0x64,0x20,0x2d,0x20,0x52,0x61,
424c2c66affSColin Finck 0x70,0x69,0x64,0x53,0x53,0x4c,0x28,0x52,0x29,0x31,0x15,0x30,0x13,0x06,0x03,
425c2c66affSColin Finck 0x55,0x04,0x03,0x0c,0x0c,0x2a,0x2e,0x77,0x69,0x6e,0x65,0x68,0x71,0x2e,0x6f,
426c2c66affSColin Finck 0x72,0x67,0x30,0x82,0x01,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,
427c2c66affSColin Finck 0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x82,0x01,0x0f,0x00,0x30,0x82,0x01,0x0a,
428c2c66affSColin Finck 0x02,0x82,0x01,0x01,0x00,0xc2,0x91,0x35,0xc7,0x67,0x32,0xf1,0x66,0x12,0x38,
429c2c66affSColin Finck 0x79,0xdb,0x02,0x11,0x95,0x89,0x1b,0x4a,0x6a,0x63,0x45,0x35,0x58,0x1b,0x57,
430c2c66affSColin Finck 0x8d,0xec,0x19,0x88,0xf5,0xa3,0x9e,0x6b,0xdb,0x07,0xfb,0x6e,0x29,0xe9,0xa9,
431c2c66affSColin Finck 0x14,0x07,0x8c,0x3a,0xc1,0xd7,0x88,0xcc,0xe4,0x55,0x79,0x6e,0x97,0xe9,0x93,
432c2c66affSColin Finck 0x88,0x9a,0x89,0xf9,0x31,0x0f,0x91,0x61,0xc2,0x9c,0xae,0x59,0x25,0x93,0x9a,
433c2c66affSColin Finck 0xc8,0xf9,0x28,0x7a,0x0f,0x0f,0x89,0x9a,0xda,0x46,0xbe,0xb2,0xdc,0x90,0x5b,
434c2c66affSColin Finck 0xd8,0x87,0xda,0xda,0xce,0x70,0x70,0x95,0x43,0x51,0xa0,0x21,0x22,0x54,0xab,
435c2c66affSColin Finck 0xa7,0x09,0xe1,0x81,0x09,0x8c,0x00,0x15,0x30,0x5a,0xa7,0x61,0x77,0xba,0x48,
436c2c66affSColin Finck 0x91,0xc6,0x94,0x90,0xdd,0x1a,0xf4,0x3f,0xa6,0x8a,0xb4,0x2f,0x98,0x16,0x0d,
437c2c66affSColin Finck 0x96,0x9f,0x0c,0x96,0x01,0x15,0xbc,0x74,0x7e,0x5c,0x4e,0xe3,0x95,0xae,0x00,
438c2c66affSColin Finck 0xf5,0x5b,0x88,0x0f,0xef,0x7c,0x1f,0xab,0x22,0xfe,0x95,0x42,0x1a,0xbd,0xee,
439c2c66affSColin Finck 0x23,0xca,0x5b,0x7f,0x4a,0xb0,0xbe,0x15,0x65,0xe2,0xce,0x02,0xc4,0xf6,0xb8,
440c2c66affSColin Finck 0xf3,0xd6,0x7e,0x75,0x5e,0x63,0x47,0x5d,0xc1,0xca,0xc3,0xc4,0x4a,0xf5,0x4d,
441c2c66affSColin Finck 0x66,0x34,0x03,0xf8,0xf4,0x54,0x7d,0x6b,0x54,0x2f,0x17,0x7c,0x39,0x13,0x78,
442c2c66affSColin Finck 0x09,0x9e,0xd0,0x9c,0x51,0x02,0x11,0x9d,0xa7,0x53,0x60,0xdd,0x62,0x2b,0xee,
443c2c66affSColin Finck 0xb0,0xd1,0xf2,0x1a,0x5c,0xdc,0xa7,0x58,0xc2,0xfa,0x29,0xcf,0xf3,0xc9,0xe9,
444c2c66affSColin Finck 0xae,0xe8,0x70,0x60,0x99,0xc7,0x30,0xdd,0x1c,0xda,0x32,0xc0,0x45,0xa5,0x48,
445c2c66affSColin Finck 0xc5,0x22,0x29,0x0c,0x74,0x25,0x02,0x03,0x01,0x00,0x01,0xa3,0x82,0x01,0xb3,
446c2c66affSColin Finck 0x30,0x82,0x01,0xaf,0x30,0x1f,0x06,0x03,0x55,0x1d,0x23,0x04,0x18,0x30,0x16,
447c2c66affSColin Finck 0x80,0x14,0x6b,0x69,0x3d,0x6a,0x18,0x42,0x4a,0xdd,0x8f,0x02,0x65,0x39,0xfd,
448c2c66affSColin Finck 0x35,0x24,0x86,0x78,0x91,0x16,0x30,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,
449c2c66affSColin Finck 0x01,0xff,0x04,0x04,0x03,0x02,0x05,0xa0,0x30,0x1d,0x06,0x03,0x55,0x1d,0x25,
450c2c66affSColin Finck 0x04,0x16,0x30,0x14,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x03,0x01,0x06,
451c2c66affSColin Finck 0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x03,0x02,0x30,0x23,0x06,0x03,0x55,0x1d,
452c2c66affSColin Finck 0x11,0x04,0x1c,0x30,0x1a,0x82,0x0c,0x2a,0x2e,0x77,0x69,0x6e,0x65,0x68,0x71,
453c2c66affSColin Finck 0x2e,0x6f,0x72,0x67,0x82,0x0a,0x77,0x69,0x6e,0x65,0x68,0x71,0x2e,0x6f,0x72,
454c2c66affSColin Finck 0x67,0x30,0x43,0x06,0x03,0x55,0x1d,0x1f,0x04,0x3c,0x30,0x3a,0x30,0x38,0xa0,
455c2c66affSColin Finck 0x36,0xa0,0x34,0x86,0x32,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x72,0x61,0x70,
456c2c66affSColin Finck 0x69,0x64,0x73,0x73,0x6c,0x2d,0x63,0x72,0x6c,0x2e,0x67,0x65,0x6f,0x74,0x72,
457c2c66affSColin Finck 0x75,0x73,0x74,0x2e,0x63,0x6f,0x6d,0x2f,0x63,0x72,0x6c,0x73,0x2f,0x72,0x61,
458c2c66affSColin Finck 0x70,0x69,0x64,0x73,0x73,0x6c,0x2e,0x63,0x72,0x6c,0x30,0x1d,0x06,0x03,0x55,
459c2c66affSColin Finck 0x1d,0x0e,0x04,0x16,0x04,0x14,0xff,0x4c,0x0f,0x46,0xb8,0x3c,0x5b,0x72,0xe4,
460c2c66affSColin Finck 0x10,0x96,0xbb,0xa7,0xbc,0x91,0xa2,0x63,0xf6,0x81,0x0a,0x30,0x0c,0x06,0x03,
461c2c66affSColin Finck 0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x02,0x30,0x00,0x30,0x78,0x06,0x08,0x2b,
462c2c66affSColin Finck 0x06,0x01,0x05,0x05,0x07,0x01,0x01,0x04,0x6c,0x30,0x6a,0x30,0x2d,0x06,0x08,
463c2c66affSColin Finck 0x2b,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x86,0x21,0x68,0x74,0x74,0x70,0x3a,
464c2c66affSColin Finck 0x2f,0x2f,0x72,0x61,0x70,0x69,0x64,0x73,0x73,0x6c,0x2d,0x6f,0x63,0x73,0x70,
465c2c66affSColin Finck 0x2e,0x67,0x65,0x6f,0x74,0x72,0x75,0x73,0x74,0x2e,0x63,0x6f,0x6d,0x30,0x39,
466c2c66affSColin Finck 0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x30,0x02,0x86,0x2d,0x68,0x74,0x74,
467c2c66affSColin Finck 0x70,0x3a,0x2f,0x2f,0x72,0x61,0x70,0x69,0x64,0x73,0x73,0x6c,0x2d,0x61,0x69,
468c2c66affSColin Finck 0x61,0x2e,0x67,0x65,0x6f,0x74,0x72,0x75,0x73,0x74,0x2e,0x63,0x6f,0x6d,0x2f,
469c2c66affSColin Finck 0x72,0x61,0x70,0x69,0x64,0x73,0x73,0x6c,0x2e,0x63,0x72,0x74,0x30,0x4c,0x06,
470c2c66affSColin Finck 0x03,0x55,0x1d,0x20,0x04,0x45,0x30,0x43,0x30,0x41,0x06,0x0a,0x60,0x86,0x48,
471c2c66affSColin Finck 0x01,0x86,0xf8,0x45,0x01,0x07,0x36,0x30,0x33,0x30,0x31,0x06,0x08,0x2b,0x06,
472c2c66affSColin Finck 0x01,0x05,0x05,0x07,0x02,0x01,0x16,0x25,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,
473c2c66affSColin Finck 0x77,0x77,0x77,0x2e,0x67,0x65,0x6f,0x74,0x72,0x75,0x73,0x74,0x2e,0x63,0x6f,
474c2c66affSColin Finck 0x6d,0x2f,0x72,0x65,0x73,0x6f,0x75,0x72,0x63,0x65,0x73,0x2f,0x63,0x70,0x73,
475c2c66affSColin Finck 0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,
476c2c66affSColin Finck 0x03,0x82,0x01,0x01,0x00,0x1b,0xa8,0x34,0xc1,0xb7,0xf3,0xbe,0xb6,0xed,0x12,
477c2c66affSColin Finck 0x85,0x58,0xe1,0x69,0x35,0x0c,0xb8,0x7e,0x38,0x11,0xb3,0xd2,0xe2,0x2e,0x52,
478c2c66affSColin Finck 0xcf,0xa6,0x39,0xe1,0x25,0x73,0xf0,0x1d,0xc9,0x54,0xa1,0xc2,0x50,0x19,0xea,
479c2c66affSColin Finck 0x68,0xeb,0x1a,0x21,0xdb,0x86,0x14,0x55,0x73,0x02,0x28,0x56,0x14,0xf7,0xf1,
480c2c66affSColin Finck 0x48,0x43,0xfb,0xd7,0xbf,0xcf,0xbb,0x20,0xc4,0x1e,0x4e,0x9a,0x7c,0xf1,0xe8,
481c2c66affSColin Finck 0x28,0x76,0xce,0xf9,0xb3,0xf0,0x6f,0x93,0x70,0x51,0xcd,0xed,0x28,0x1b,0xdd,
482c2c66affSColin Finck 0x66,0x38,0x40,0x5e,0x0b,0x13,0xaf,0x21,0xff,0x23,0xf1,0x5b,0xcd,0x32,0x43,
483c2c66affSColin Finck 0x00,0x87,0x3d,0x10,0xc6,0x6e,0xe5,0x67,0xdc,0x9f,0x44,0x12,0x94,0xb4,0x76,
484c2c66affSColin Finck 0xbd,0xd9,0x4c,0x53,0x12,0x1c,0x2e,0x2c,0x09,0x66,0x41,0x83,0x6c,0xee,0x68,
485c2c66affSColin Finck 0x98,0x38,0xd2,0xc8,0x32,0xa3,0x42,0xcf,0x1c,0xfd,0x60,0x6c,0x5d,0x4b,0x4b,
486c2c66affSColin Finck 0x6c,0xb8,0xf3,0x7e,0xc8,0x93,0x0a,0x68,0x66,0x14,0x3b,0x39,0x73,0x82,0xfe,
487c2c66affSColin Finck 0x86,0x3c,0x3d,0xb3,0xb5,0x42,0xec,0x4c,0xc6,0xe6,0xdd,0x7e,0xd7,0xb4,0x5d,
488c2c66affSColin Finck 0xeb,0x6d,0x8c,0x9e,0x29,0x95,0x99,0xb6,0x95,0x5b,0xc0,0xdd,0x46,0xdf,0xdc,
489c2c66affSColin Finck 0xf2,0x1c,0x3d,0x80,0xeb,0x14,0x3d,0xd9,0x4a,0xb4,0x6f,0x3e,0x79,0xca,0x7f,
490c2c66affSColin Finck 0xbc,0x27,0x47,0x90,0x86,0x55,0xfa,0x27,0xf5,0x35,0x3d,0x1d,0xc4,0xa8,0x55,
491c2c66affSColin Finck 0x31,0x8f,0x3a,0x76,0x8d,0x98,0x50,0xa3,0x11,0x91,0x1c,0xb0,0xa8,0x06,0xf9,
492c2c66affSColin Finck 0x22,0xb1,0xca,0x20,0x49,0xaa,0xe1,0x4d,0x41,0xf1,0x21,0xcc,0x25,0x45,0x33,
493c2c66affSColin Finck 0x4f,0x2f,0x3a,0x48,0x70,0xbb };
494c2c66affSColin Finck /* Battle.Net's cert */
495c2c66affSColin Finck static const BYTE battlenet[] = {
496c2c66affSColin Finck 0x30,0x82,0x03,0xd8,0x30,0x82,0x02,0xc0,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,
497c2c66affSColin Finck 0x1e,0x4c,0xc1,0xf1,0xac,0xbd,0xf3,0xf5,0x96,0x05,0xbd,0x5f,0xbb,0x3f,0x75,
498c2c66affSColin Finck 0x6b,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,
499c2c66affSColin Finck 0x00,0x30,0x3c,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,
500c2c66affSColin Finck 0x53,0x31,0x15,0x30,0x13,0x06,0x03,0x55,0x04,0x0a,0x13,0x0c,0x54,0x68,0x61,
501c2c66affSColin Finck 0x77,0x74,0x65,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x16,0x30,0x14,0x06,0x03,
502c2c66affSColin Finck 0x55,0x04,0x03,0x13,0x0d,0x54,0x68,0x61,0x77,0x74,0x65,0x20,0x53,0x53,0x4c,
503c2c66affSColin Finck 0x20,0x43,0x41,0x30,0x1e,0x17,0x0d,0x31,0x30,0x30,0x38,0x32,0x36,0x30,0x30,
504c2c66affSColin Finck 0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x31,0x32,0x30,0x39,0x32,0x34,0x32,0x33,
505c2c66affSColin Finck 0x35,0x39,0x35,0x39,0x5a,0x30,0x71,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,
506c2c66affSColin Finck 0x06,0x13,0x02,0x55,0x53,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x08,0x0c,
507c2c66affSColin Finck 0x0a,0x43,0x61,0x6c,0x69,0x66,0x6f,0x72,0x6e,0x69,0x61,0x31,0x0f,0x30,0x0d,
508c2c66affSColin Finck 0x06,0x03,0x55,0x04,0x07,0x0c,0x06,0x49,0x72,0x76,0x69,0x6e,0x65,0x31,0x25,
509c2c66affSColin Finck 0x30,0x23,0x06,0x03,0x55,0x04,0x0a,0x0c,0x1c,0x42,0x6c,0x69,0x7a,0x7a,0x61,
510c2c66affSColin Finck 0x72,0x64,0x20,0x45,0x6e,0x74,0x65,0x72,0x74,0x61,0x69,0x6e,0x6d,0x65,0x6e,
511c2c66affSColin Finck 0x74,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x15,0x30,0x13,0x06,0x03,0x55,0x04,
512c2c66affSColin Finck 0x03,0x0c,0x0c,0x2a,0x2e,0x62,0x61,0x74,0x74,0x6c,0x65,0x2e,0x6e,0x65,0x74,
513c2c66affSColin Finck 0x30,0x82,0x01,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,
514c2c66affSColin Finck 0x01,0x01,0x05,0x00,0x03,0x82,0x01,0x0f,0x00,0x30,0x82,0x01,0x0a,0x02,0x82,
515c2c66affSColin Finck 0x01,0x01,0x00,0xa8,0x27,0x24,0x42,0x24,0xc8,0xe4,0x4e,0xfa,0x12,0x53,0x78,
516c2c66affSColin Finck 0x14,0xa9,0xec,0x20,0x2d,0x79,0x07,0x55,0x36,0xad,0x04,0x8b,0xbc,0xd9,0x3b,
517c2c66affSColin Finck 0xcc,0x3e,0xae,0xa0,0x3b,0xa1,0x79,0xf9,0x03,0x20,0x3e,0xa6,0x6a,0xeb,0x8c,
518c2c66affSColin Finck 0xb1,0x45,0xcb,0x00,0x43,0x76,0x35,0x1b,0x3d,0xc9,0x4b,0xa9,0xc0,0xb6,0x32,
519c2c66affSColin Finck 0x88,0xaa,0x4c,0x2c,0x53,0xf8,0xc4,0xcf,0xee,0xee,0xef,0x28,0xdf,0x44,0xfa,
520c2c66affSColin Finck 0xa9,0x26,0xf6,0x99,0x7b,0xa4,0x7f,0xe8,0x5c,0x7f,0x59,0x51,0xe1,0x2c,0x57,
521c2c66affSColin Finck 0x2f,0x8f,0xb3,0xad,0x7b,0x88,0x50,0xbc,0x76,0xfe,0x03,0xbd,0xfd,0x11,0x5d,
522c2c66affSColin Finck 0x6e,0xbc,0x13,0x5b,0xd9,0x2e,0x38,0xc7,0x56,0x89,0x93,0x08,0xa2,0x24,0xbd,
523c2c66affSColin Finck 0x1d,0x48,0xd9,0x48,0xce,0x6e,0x12,0x4f,0x10,0x60,0x94,0x54,0xb7,0x6b,0x51,
524c2c66affSColin Finck 0xd0,0xdf,0x04,0xa8,0x16,0x39,0xcb,0xa5,0xd9,0xe7,0xb5,0xa9,0x02,0xfa,0xd3,
525c2c66affSColin Finck 0xca,0x52,0xe7,0xc8,0x45,0xf8,0x4d,0xbb,0x70,0x1a,0xfd,0xb3,0x7d,0x9c,0x77,
526c2c66affSColin Finck 0x8b,0x34,0xbe,0xd2,0xad,0xe7,0x17,0xb0,0x55,0xfa,0x1b,0x3e,0x51,0xcf,0x37,
527c2c66affSColin Finck 0xbd,0x29,0x94,0x9f,0x56,0x28,0xd1,0x9d,0xe5,0x56,0xce,0x78,0x61,0x6e,0x8b,
528c2c66affSColin Finck 0xae,0x95,0x44,0x3c,0xc8,0x54,0x48,0x78,0x1e,0x4c,0x72,0xff,0x0e,0xb9,0x14,
529c2c66affSColin Finck 0x78,0xdc,0x7c,0x2e,0x50,0x05,0xd9,0xd0,0xa5,0x97,0xf7,0xb9,0x45,0x3f,0x7e,
530c2c66affSColin Finck 0xdc,0xc6,0x4e,0x64,0x93,0x82,0xb7,0x97,0xcf,0xb1,0x7a,0x04,0xc1,0x1d,0x70,
531c2c66affSColin Finck 0xf8,0x6b,0x43,0xc4,0xd0,0xa7,0x03,0x4e,0xc9,0x14,0x90,0x4f,0x05,0xb5,0x11,
532c2c66affSColin Finck 0x36,0xc0,0xc2,0xbb,0x02,0x03,0x01,0x00,0x01,0xa3,0x81,0xa0,0x30,0x81,0x9d,
533c2c66affSColin Finck 0x30,0x0c,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x02,0x30,0x00,0x30,
534c2c66affSColin Finck 0x3a,0x06,0x03,0x55,0x1d,0x1f,0x04,0x33,0x30,0x31,0x30,0x2f,0xa0,0x2d,0xa0,
535c2c66affSColin Finck 0x2b,0x86,0x29,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x73,0x76,0x72,0x2d,0x6f,
536c2c66affSColin Finck 0x76,0x2d,0x63,0x72,0x6c,0x2e,0x74,0x68,0x61,0x77,0x74,0x65,0x2e,0x63,0x6f,
537c2c66affSColin Finck 0x6d,0x2f,0x54,0x68,0x61,0x77,0x74,0x65,0x4f,0x56,0x2e,0x63,0x72,0x6c,0x30,
538c2c66affSColin Finck 0x1d,0x06,0x03,0x55,0x1d,0x25,0x04,0x16,0x30,0x14,0x06,0x08,0x2b,0x06,0x01,
539c2c66affSColin Finck 0x05,0x05,0x07,0x03,0x01,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x03,0x02,
540c2c66affSColin Finck 0x30,0x32,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x01,0x01,0x04,0x26,0x30,
541c2c66affSColin Finck 0x24,0x30,0x22,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x86,0x16,
542c2c66affSColin Finck 0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6f,0x63,0x73,0x70,0x2e,0x74,0x68,0x61,
543c2c66affSColin Finck 0x77,0x74,0x65,0x2e,0x63,0x6f,0x6d,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,
544c2c66affSColin Finck 0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x82,0x01,0x01,0x00,0x5c,0x44,0xe2,
545c2c66affSColin Finck 0x2f,0x50,0x41,0xc8,0x54,0x0a,0xdd,0x2a,0xa2,0xa7,0x62,0x2d,0xc9,0xe8,0xa8,
546c2c66affSColin Finck 0xf7,0x53,0x14,0xe1,0x88,0x89,0x81,0x22,0x1b,0x82,0xb5,0xa1,0x75,0xcc,0x91,
547c2c66affSColin Finck 0x76,0x30,0x71,0xae,0x56,0x68,0xa9,0x75,0x65,0x7f,0xd8,0xc7,0xae,0x3b,0x68,
548c2c66affSColin Finck 0x66,0xd6,0x2d,0x92,0xb7,0x9b,0x28,0x59,0x98,0x89,0x29,0xf9,0x69,0xff,0xff,
549c2c66affSColin Finck 0xfa,0x4f,0x04,0x6b,0x96,0x78,0x1d,0xfe,0x67,0x78,0x33,0xd3,0xd5,0x91,0xee,
550c2c66affSColin Finck 0xa7,0x36,0xcd,0x86,0x4c,0xc6,0x08,0xf4,0x12,0x4b,0x2b,0xd2,0x95,0x6a,0x87,
551c2c66affSColin Finck 0xcd,0xe6,0x2d,0xf3,0xe0,0x8d,0x0c,0x77,0x9d,0xa0,0x2e,0xdc,0xf2,0xc1,0x06,
552c2c66affSColin Finck 0xc5,0xb0,0xd5,0xa0,0x00,0xe5,0x0e,0x53,0xad,0x04,0xc4,0xf6,0x6e,0x6b,0x7e,
553c2c66affSColin Finck 0x04,0xc2,0xea,0xaa,0xdf,0xe1,0x26,0x4a,0x14,0x33,0x03,0x77,0x15,0x5b,0x3e,
554c2c66affSColin Finck 0x41,0x22,0x5d,0xb7,0xaf,0x65,0x2f,0x46,0xbc,0x24,0xd7,0x30,0xe6,0x82,0x7d,
555c2c66affSColin Finck 0x2a,0x3b,0x81,0x04,0xa7,0xd5,0x0b,0x61,0x57,0xe0,0x91,0x04,0x6c,0xc6,0x08,
556c2c66affSColin Finck 0xbc,0xc0,0x1b,0x26,0x7f,0x69,0x22,0x69,0xd3,0x41,0x4c,0x9d,0x61,0xe0,0xfe,
557c2c66affSColin Finck 0x2b,0xd8,0x2e,0xe9,0x2d,0x72,0x30,0x68,0x81,0xa1,0x37,0x06,0xb5,0xdc,0xd3,
558c2c66affSColin Finck 0x48,0x65,0x16,0x74,0xfb,0x3c,0xb2,0x70,0xef,0x3d,0xee,0x63,0xea,0x62,0xf5,
559c2c66affSColin Finck 0xd2,0xc7,0x48,0x6a,0xb8,0x53,0xcb,0xbe,0x9a,0xeb,0xc1,0x77,0xfb,0x9b,0xec,
560c2c66affSColin Finck 0xb8,0x06,0x04,0xaa,0x23,0x2c,0x6d,0x17,0x9e,0xb9,0x6e,0xc9,0xa4,0xde,0x7e,
561c2c66affSColin Finck 0x61,0xc4,0xa7,0x45,0x68,0xf6,0x2a,0x57,0xaa,0xad,0xca,0x84,0x03 };
562c2c66affSColin Finck static const BYTE thawte_primary_ca[] = {
563c2c66affSColin Finck 0x30,0x82,0x04,0x20,0x30,0x82,0x03,0x08,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,
564c2c66affSColin Finck 0x34,0x4e,0xd5,0x57,0x20,0xd5,0xed,0xec,0x49,0xf4,0x2f,0xce,0x37,0xdb,0x2b,
565c2c66affSColin Finck 0x6d,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,
566c2c66affSColin Finck 0x00,0x30,0x81,0xa9,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,
567c2c66affSColin Finck 0x55,0x53,0x31,0x15,0x30,0x13,0x06,0x03,0x55,0x04,0x0a,0x13,0x0c,0x74,0x68,
568c2c66affSColin Finck 0x61,0x77,0x74,0x65,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x28,0x30,0x26,0x06,
569c2c66affSColin Finck 0x03,0x55,0x04,0x0b,0x13,0x1f,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,
570c2c66affSColin Finck 0x74,0x69,0x6f,0x6e,0x20,0x53,0x65,0x72,0x76,0x69,0x63,0x65,0x73,0x20,0x44,
571c2c66affSColin Finck 0x69,0x76,0x69,0x73,0x69,0x6f,0x6e,0x31,0x38,0x30,0x36,0x06,0x03,0x55,0x04,
572c2c66affSColin Finck 0x0b,0x13,0x2f,0x28,0x63,0x29,0x20,0x32,0x30,0x30,0x36,0x20,0x74,0x68,0x61,
573c2c66affSColin Finck 0x77,0x74,0x65,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x20,0x2d,0x20,0x46,0x6f,0x72,
574c2c66affSColin Finck 0x20,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x7a,0x65,0x64,0x20,0x75,0x73,0x65,
575c2c66affSColin Finck 0x20,0x6f,0x6e,0x6c,0x79,0x31,0x1f,0x30,0x1d,0x06,0x03,0x55,0x04,0x03,0x13,
576c2c66affSColin Finck 0x16,0x74,0x68,0x61,0x77,0x74,0x65,0x20,0x50,0x72,0x69,0x6d,0x61,0x72,0x79,
577c2c66affSColin Finck 0x20,0x52,0x6f,0x6f,0x74,0x20,0x43,0x41,0x30,0x1e,0x17,0x0d,0x30,0x36,0x31,
578c2c66affSColin Finck 0x31,0x31,0x37,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x33,0x36,0x30,
579c2c66affSColin Finck 0x37,0x31,0x36,0x32,0x33,0x35,0x39,0x35,0x39,0x5a,0x30,0x81,0xa9,0x31,0x0b,
580c2c66affSColin Finck 0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x15,0x30,0x13,
581c2c66affSColin Finck 0x06,0x03,0x55,0x04,0x0a,0x13,0x0c,0x74,0x68,0x61,0x77,0x74,0x65,0x2c,0x20,
582c2c66affSColin Finck 0x49,0x6e,0x63,0x2e,0x31,0x28,0x30,0x26,0x06,0x03,0x55,0x04,0x0b,0x13,0x1f,
583c2c66affSColin Finck 0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x53,
584c2c66affSColin Finck 0x65,0x72,0x76,0x69,0x63,0x65,0x73,0x20,0x44,0x69,0x76,0x69,0x73,0x69,0x6f,
585c2c66affSColin Finck 0x6e,0x31,0x38,0x30,0x36,0x06,0x03,0x55,0x04,0x0b,0x13,0x2f,0x28,0x63,0x29,
586c2c66affSColin Finck 0x20,0x32,0x30,0x30,0x36,0x20,0x74,0x68,0x61,0x77,0x74,0x65,0x2c,0x20,0x49,
587c2c66affSColin Finck 0x6e,0x63,0x2e,0x20,0x2d,0x20,0x46,0x6f,0x72,0x20,0x61,0x75,0x74,0x68,0x6f,
588c2c66affSColin Finck 0x72,0x69,0x7a,0x65,0x64,0x20,0x75,0x73,0x65,0x20,0x6f,0x6e,0x6c,0x79,0x31,
589c2c66affSColin Finck 0x1f,0x30,0x1d,0x06,0x03,0x55,0x04,0x03,0x13,0x16,0x74,0x68,0x61,0x77,0x74,
590c2c66affSColin Finck 0x65,0x20,0x50,0x72,0x69,0x6d,0x61,0x72,0x79,0x20,0x52,0x6f,0x6f,0x74,0x20,
591c2c66affSColin Finck 0x43,0x41,0x30,0x82,0x01,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,
592c2c66affSColin Finck 0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x82,0x01,0x0f,0x00,0x30,0x82,0x01,0x0a,
593c2c66affSColin Finck 0x02,0x82,0x01,0x01,0x00,0xac,0xa0,0xf0,0xfb,0x80,0x59,0xd4,0x9c,0xc7,0xa4,
594c2c66affSColin Finck 0xcf,0x9d,0xa1,0x59,0x73,0x09,0x10,0x45,0x0c,0x0d,0x2c,0x6e,0x68,0xf1,0x6c,
595c2c66affSColin Finck 0x5b,0x48,0x68,0x49,0x59,0x37,0xfc,0x0b,0x33,0x19,0xc2,0x77,0x7f,0xcc,0x10,
596c2c66affSColin Finck 0x2d,0x95,0x34,0x1c,0xe6,0xeb,0x4d,0x09,0xa7,0x1c,0xd2,0xb8,0xc9,0x97,0x36,
597c2c66affSColin Finck 0x02,0xb7,0x89,0xd4,0x24,0x5f,0x06,0xc0,0xcc,0x44,0x94,0x94,0x8d,0x02,0x62,
598c2c66affSColin Finck 0x6f,0xeb,0x5a,0xdd,0x11,0x8d,0x28,0x9a,0x5c,0x84,0x90,0x10,0x7a,0x0d,0xbd,
599c2c66affSColin Finck 0x74,0x66,0x2f,0x6a,0x38,0xa0,0xe2,0xd5,0x54,0x44,0xeb,0x1d,0x07,0x9f,0x07,
600c2c66affSColin Finck 0xba,0x6f,0xee,0xe9,0xfd,0x4e,0x0b,0x29,0xf5,0x3e,0x84,0xa0,0x01,0xf1,0x9c,
601c2c66affSColin Finck 0xab,0xf8,0x1c,0x7e,0x89,0xa4,0xe8,0xa1,0xd8,0x71,0x65,0x0d,0xa3,0x51,0x7b,
602c2c66affSColin Finck 0xee,0xbc,0xd2,0x22,0x60,0x0d,0xb9,0x5b,0x9d,0xdf,0xba,0xfc,0x51,0x5b,0x0b,
603c2c66affSColin Finck 0xaf,0x98,0xb2,0xe9,0x2e,0xe9,0x04,0xe8,0x62,0x87,0xde,0x2b,0xc8,0xd7,0x4e,
604c2c66affSColin Finck 0xc1,0x4c,0x64,0x1e,0xdd,0xcf,0x87,0x58,0xba,0x4a,0x4f,0xca,0x68,0x07,0x1d,
605c2c66affSColin Finck 0x1c,0x9d,0x4a,0xc6,0xd5,0x2f,0x91,0xcc,0x7c,0x71,0x72,0x1c,0xc5,0xc0,0x67,
606c2c66affSColin Finck 0xeb,0x32,0xfd,0xc9,0x92,0x5c,0x94,0xda,0x85,0xc0,0x9b,0xbf,0x53,0x7d,0x2b,
607c2c66affSColin Finck 0x09,0xf4,0x8c,0x9d,0x91,0x1f,0x97,0x6a,0x52,0xcb,0xde,0x09,0x36,0xa4,0x77,
608c2c66affSColin Finck 0xd8,0x7b,0x87,0x50,0x44,0xd5,0x3e,0x6e,0x29,0x69,0xfb,0x39,0x49,0x26,0x1e,
609c2c66affSColin Finck 0x09,0xa5,0x80,0x7b,0x40,0x2d,0xeb,0xe8,0x27,0x85,0xc9,0xfe,0x61,0xfd,0x7e,
610c2c66affSColin Finck 0xe6,0x7c,0x97,0x1d,0xd5,0x9d,0x02,0x03,0x01,0x00,0x01,0xa3,0x42,0x30,0x40,
611c2c66affSColin Finck 0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x05,0x30,0x03,0x01,
612c2c66affSColin Finck 0x01,0xff,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,0xff,0x04,0x04,0x03,
613c2c66affSColin Finck 0x02,0x01,0x06,0x30,0x1d,0x06,0x03,0x55,0x1d,0x0e,0x04,0x16,0x04,0x14,0x7b,
614c2c66affSColin Finck 0x5b,0x45,0xcf,0xaf,0xce,0xcb,0x7a,0xfd,0x31,0x92,0x1a,0x6a,0xb6,0xf3,0x46,
615c2c66affSColin Finck 0xeb,0x57,0x48,0x50,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,
616c2c66affSColin Finck 0x01,0x05,0x05,0x00,0x03,0x82,0x01,0x01,0x00,0x79,0x11,0xc0,0x4b,0xb3,0x91,
617c2c66affSColin Finck 0xb6,0xfc,0xf0,0xe9,0x67,0xd4,0x0d,0x6e,0x45,0xbe,0x55,0xe8,0x93,0xd2,0xce,
618c2c66affSColin Finck 0x03,0x3f,0xed,0xda,0x25,0xb0,0x1d,0x57,0xcb,0x1e,0x3a,0x76,0xa0,0x4c,0xec,
619c2c66affSColin Finck 0x50,0x76,0xe8,0x64,0x72,0x0c,0xa4,0xa9,0xf1,0xb8,0x8b,0xd6,0xd6,0x87,0x84,
620c2c66affSColin Finck 0xbb,0x32,0xe5,0x41,0x11,0xc0,0x77,0xd9,0xb3,0x60,0x9d,0xeb,0x1b,0xd5,0xd1,
621c2c66affSColin Finck 0x6e,0x44,0x44,0xa9,0xa6,0x01,0xec,0x55,0x62,0x1d,0x77,0xb8,0x5c,0x8e,0x48,
622c2c66affSColin Finck 0x49,0x7c,0x9c,0x3b,0x57,0x11,0xac,0xad,0x73,0x37,0x8e,0x2f,0x78,0x5c,0x90,
623c2c66affSColin Finck 0x68,0x47,0xd9,0x60,0x60,0xe6,0xfc,0x07,0x3d,0x22,0x20,0x17,0xc4,0xf7,0x16,
624c2c66affSColin Finck 0xe9,0xc4,0xd8,0x72,0xf9,0xc8,0x73,0x7c,0xdf,0x16,0x2f,0x15,0xa9,0x3e,0xfd,
625c2c66affSColin Finck 0x6a,0x27,0xb6,0xa1,0xeb,0x5a,0xba,0x98,0x1f,0xd5,0xe3,0x4d,0x64,0x0a,0x9d,
626c2c66affSColin Finck 0x13,0xc8,0x61,0xba,0xf5,0x39,0x1c,0x87,0xba,0xb8,0xbd,0x7b,0x22,0x7f,0xf6,
627c2c66affSColin Finck 0xfe,0xac,0x40,0x79,0xe5,0xac,0x10,0x6f,0x3d,0x8f,0x1b,0x79,0x76,0x8b,0xc4,
628c2c66affSColin Finck 0x37,0xb3,0x21,0x18,0x84,0xe5,0x36,0x00,0xeb,0x63,0x20,0x99,0xb9,0xe9,0xfe,
629c2c66affSColin Finck 0x33,0x04,0xbb,0x41,0xc8,0xc1,0x02,0xf9,0x44,0x63,0x20,0x9e,0x81,0xce,0x42,
630c2c66affSColin Finck 0xd3,0xd6,0x3f,0x2c,0x76,0xd3,0x63,0x9c,0x59,0xdd,0x8f,0xa6,0xe1,0x0e,0xa0,
631c2c66affSColin Finck 0x2e,0x41,0xf7,0x2e,0x95,0x47,0xcf,0xbc,0xfd,0x33,0xf3,0xf6,0x0b,0x61,0x7e,
632c2c66affSColin Finck 0x7e,0x91,0x2b,0x81,0x47,0xc2,0x27,0x30,0xee,0xa7,0x10,0x5d,0x37,0x8f,0x5c,
633c2c66affSColin Finck 0x39,0x2b,0xe4,0x04,0xf0,0x7b,0x8d,0x56,0x8c,0x68 };
634c2c66affSColin Finck static const BYTE thawte_ssl_ca[] = {
635c2c66affSColin Finck 0x30,0x82,0x04,0x6c,0x30,0x82,0x03,0x54,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,
636c2c66affSColin Finck 0x4d,0x5f,0x2c,0x34,0x08,0xb2,0x4c,0x20,0xcd,0x6d,0x50,0x7e,0x24,0x4d,0xc9,
637c2c66affSColin Finck 0xec,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,
638c2c66affSColin Finck 0x00,0x30,0x81,0xa9,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,
639c2c66affSColin Finck 0x55,0x53,0x31,0x15,0x30,0x13,0x06,0x03,0x55,0x04,0x0a,0x13,0x0c,0x74,0x68,
640c2c66affSColin Finck 0x61,0x77,0x74,0x65,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x31,0x28,0x30,0x26,0x06,
641c2c66affSColin Finck 0x03,0x55,0x04,0x0b,0x13,0x1f,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,
642c2c66affSColin Finck 0x74,0x69,0x6f,0x6e,0x20,0x53,0x65,0x72,0x76,0x69,0x63,0x65,0x73,0x20,0x44,
643c2c66affSColin Finck 0x69,0x76,0x69,0x73,0x69,0x6f,0x6e,0x31,0x38,0x30,0x36,0x06,0x03,0x55,0x04,
644c2c66affSColin Finck 0x0b,0x13,0x2f,0x28,0x63,0x29,0x20,0x32,0x30,0x30,0x36,0x20,0x74,0x68,0x61,
645c2c66affSColin Finck 0x77,0x74,0x65,0x2c,0x20,0x49,0x6e,0x63,0x2e,0x20,0x2d,0x20,0x46,0x6f,0x72,
646c2c66affSColin Finck 0x20,0x61,0x75,0x74,0x68,0x6f,0x72,0x69,0x7a,0x65,0x64,0x20,0x75,0x73,0x65,
647c2c66affSColin Finck 0x20,0x6f,0x6e,0x6c,0x79,0x31,0x1f,0x30,0x1d,0x06,0x03,0x55,0x04,0x03,0x13,
648c2c66affSColin Finck 0x16,0x74,0x68,0x61,0x77,0x74,0x65,0x20,0x50,0x72,0x69,0x6d,0x61,0x72,0x79,
649c2c66affSColin Finck 0x20,0x52,0x6f,0x6f,0x74,0x20,0x43,0x41,0x30,0x1e,0x17,0x0d,0x31,0x30,0x30,
650c2c66affSColin Finck 0x32,0x30,0x38,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x32,0x30,0x30,
651c2c66affSColin Finck 0x32,0x30,0x37,0x32,0x33,0x35,0x39,0x35,0x39,0x5a,0x30,0x3c,0x31,0x0b,0x30,
652c2c66affSColin Finck 0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x15,0x30,0x13,0x06,
653c2c66affSColin Finck 0x03,0x55,0x04,0x0a,0x13,0x0c,0x54,0x68,0x61,0x77,0x74,0x65,0x2c,0x20,0x49,
654c2c66affSColin Finck 0x6e,0x63,0x2e,0x31,0x16,0x30,0x14,0x06,0x03,0x55,0x04,0x03,0x13,0x0d,0x54,
655c2c66affSColin Finck 0x68,0x61,0x77,0x74,0x65,0x20,0x53,0x53,0x4c,0x20,0x43,0x41,0x30,0x82,0x01,
656c2c66affSColin Finck 0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,
657c2c66affSColin Finck 0x00,0x03,0x82,0x01,0x0f,0x00,0x30,0x82,0x01,0x0a,0x02,0x82,0x01,0x01,0x00,
658c2c66affSColin Finck 0x99,0xe4,0x85,0x5b,0x76,0x49,0x7d,0x2f,0x05,0xd8,0xc5,0xac,0xc8,0xc8,0xa9,
659c2c66affSColin Finck 0xd3,0xdc,0x98,0xe6,0xd7,0x34,0xa6,0x2f,0x0c,0xf2,0x22,0x26,0xd8,0xa3,0xc9,
660c2c66affSColin Finck 0x14,0x4c,0x8f,0x05,0xa4,0x45,0xe8,0x14,0x0c,0x58,0x90,0x05,0x1a,0xb7,0xc5,
661c2c66affSColin Finck 0xc1,0x06,0xa5,0x80,0xaf,0xbb,0x1d,0x49,0x6b,0x52,0x34,0x88,0xc3,0x59,0xe7,
662c2c66affSColin Finck 0xef,0x6b,0xc4,0x27,0x41,0x8c,0x2b,0x66,0x1d,0xd0,0xe0,0xa3,0x97,0x98,0x19,
663c2c66affSColin Finck 0x34,0x4b,0x41,0xd5,0x98,0xd5,0xc7,0x05,0xad,0xa2,0xe4,0xd7,0xed,0x0c,0xad,
664c2c66affSColin Finck 0x4f,0xc1,0xb5,0xb0,0x21,0xfd,0x3e,0x50,0x53,0xb2,0xc4,0x90,0xd0,0xd4,0x30,
665c2c66affSColin Finck 0x67,0x6c,0x9a,0xf1,0x0e,0x74,0xc4,0xc2,0xdc,0x8a,0xe8,0x97,0xff,0xc9,0x92,
666c2c66affSColin Finck 0xae,0x01,0x8a,0x56,0x0a,0x98,0x32,0xb0,0x00,0x23,0xec,0x90,0x1a,0x60,0xc3,
667c2c66affSColin Finck 0xed,0xbb,0x3a,0xcb,0x0f,0x63,0x9f,0x0d,0x44,0xc9,0x52,0xe1,0x25,0x96,0xbf,
668c2c66affSColin Finck 0xed,0x50,0x95,0x89,0x7f,0x56,0x14,0xb1,0xb7,0x61,0x1d,0x1c,0x07,0x8c,0x3a,
669c2c66affSColin Finck 0x2c,0xf7,0xff,0x80,0xde,0x39,0x45,0xd5,0xaf,0x1a,0xd1,0x78,0xd8,0xc7,0x71,
670c2c66affSColin Finck 0x6a,0xa3,0x19,0xa7,0x32,0x50,0x21,0xe9,0xf2,0x0e,0xa1,0xc6,0x13,0x03,0x44,
671c2c66affSColin Finck 0x48,0xd1,0x66,0xa8,0x52,0x57,0xd7,0x11,0xb4,0x93,0x8b,0xe5,0x99,0x9f,0x5d,
672c2c66affSColin Finck 0xe7,0x78,0x51,0xe5,0x4d,0xf6,0xb7,0x59,0xb4,0x76,0xb5,0x09,0x37,0x4d,0x06,
673c2c66affSColin Finck 0x38,0x13,0x7a,0x1c,0x08,0x98,0x5c,0xc4,0x48,0x4a,0xcb,0x52,0xa0,0xa9,0xf8,
674c2c66affSColin Finck 0xb1,0x9d,0x8e,0x7b,0x79,0xb0,0x20,0x2f,0x3c,0x96,0xa8,0x11,0x62,0x47,0xbb,
675c2c66affSColin Finck 0x11,0x02,0x03,0x01,0x00,0x01,0xa3,0x81,0xfb,0x30,0x81,0xf8,0x30,0x32,0x06,
676c2c66affSColin Finck 0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x01,0x01,0x04,0x26,0x30,0x24,0x30,0x22,
677c2c66affSColin Finck 0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x86,0x16,0x68,0x74,0x74,
678c2c66affSColin Finck 0x70,0x3a,0x2f,0x2f,0x6f,0x63,0x73,0x70,0x2e,0x74,0x68,0x61,0x77,0x74,0x65,
679c2c66affSColin Finck 0x2e,0x63,0x6f,0x6d,0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,
680c2c66affSColin Finck 0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x00,0x30,0x34,0x06,0x03,0x55,0x1d,
681c2c66affSColin Finck 0x1f,0x04,0x2d,0x30,0x2b,0x30,0x29,0xa0,0x27,0xa0,0x25,0x86,0x23,0x68,0x74,
682c2c66affSColin Finck 0x74,0x70,0x3a,0x2f,0x2f,0x63,0x72,0x6c,0x2e,0x74,0x68,0x61,0x77,0x74,0x65,
683c2c66affSColin Finck 0x2e,0x63,0x6f,0x6d,0x2f,0x54,0x68,0x61,0x77,0x74,0x65,0x50,0x43,0x41,0x2e,
684c2c66affSColin Finck 0x63,0x72,0x6c,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,0xff,0x04,0x04,
685c2c66affSColin Finck 0x03,0x02,0x01,0x06,0x30,0x28,0x06,0x03,0x55,0x1d,0x11,0x04,0x21,0x30,0x1f,
686c2c66affSColin Finck 0xa4,0x1d,0x30,0x1b,0x31,0x19,0x30,0x17,0x06,0x03,0x55,0x04,0x03,0x13,0x10,
687c2c66affSColin Finck 0x56,0x65,0x72,0x69,0x53,0x69,0x67,0x6e,0x4d,0x50,0x4b,0x49,0x2d,0x32,0x2d,
688c2c66affSColin Finck 0x39,0x30,0x1d,0x06,0x03,0x55,0x1d,0x0e,0x04,0x16,0x04,0x14,0xa7,0xa2,0x83,
689c2c66affSColin Finck 0xbb,0x34,0x45,0x40,0x3d,0xfc,0xd5,0x30,0x4f,0x12,0xb9,0x3e,0xa1,0x01,0x9f,
690c2c66affSColin Finck 0xf6,0xdb,0x30,0x1f,0x06,0x03,0x55,0x1d,0x23,0x04,0x18,0x30,0x16,0x80,0x14,
691c2c66affSColin Finck 0x7b,0x5b,0x45,0xcf,0xaf,0xce,0xcb,0x7a,0xfd,0x31,0x92,0x1a,0x6a,0xb6,0xf3,
692c2c66affSColin Finck 0x46,0xeb,0x57,0x48,0x50,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,
693c2c66affSColin Finck 0x01,0x01,0x05,0x05,0x00,0x03,0x82,0x01,0x01,0x00,0x80,0x22,0x80,0xe0,0x6c,
694c2c66affSColin Finck 0xc8,0x95,0x16,0xd7,0x57,0x26,0x87,0xf3,0x72,0x34,0xdb,0xc6,0x72,0x56,0x27,
695c2c66affSColin Finck 0x3e,0xd3,0x96,0xf6,0x2e,0x25,0x91,0xa5,0x3e,0x33,0x97,0xa7,0x4b,0xe5,0x2f,
696c2c66affSColin Finck 0xfb,0x25,0x7d,0x2f,0x07,0x61,0xfa,0x6f,0x83,0x74,0x4c,0x4c,0x53,0x72,0x20,
697c2c66affSColin Finck 0xa4,0x7a,0xcf,0x51,0x51,0x56,0x81,0x88,0xb0,0x6d,0x1f,0x36,0x2c,0xc8,0x2b,
698c2c66affSColin Finck 0xb1,0x88,0x99,0xc1,0xfe,0x44,0xab,0x48,0x51,0x7c,0xd8,0xf2,0x44,0x64,0x2a,
699c2c66affSColin Finck 0xd8,0x71,0xa7,0xfb,0x1a,0x2f,0xf9,0x19,0x8d,0x34,0xb2,0x23,0xbf,0xc4,0x4c,
700c2c66affSColin Finck 0x55,0x1d,0x8e,0x44,0xe8,0xaa,0x5d,0x9a,0xdd,0x9f,0xfd,0x03,0xc7,0xba,0x24,
701c2c66affSColin Finck 0x43,0x8d,0x2d,0x47,0x44,0xdb,0xf6,0xd8,0x98,0xc8,0xb2,0xf9,0xda,0xef,0xed,
702c2c66affSColin Finck 0x29,0x5c,0x69,0x12,0xfa,0xd1,0x23,0x96,0x0f,0xbf,0x9c,0x0d,0xf2,0x79,0x45,
703c2c66affSColin Finck 0x53,0x37,0x9a,0x56,0x2f,0xe8,0x57,0x10,0x70,0xf6,0xee,0x89,0x0c,0x49,0x89,
704c2c66affSColin Finck 0x9a,0xc1,0x23,0xf5,0xc2,0x2a,0xcc,0x41,0xcf,0x22,0xab,0x65,0x6e,0xb7,0x94,
705c2c66affSColin Finck 0x82,0x6d,0x2f,0x40,0x5f,0x58,0xde,0xeb,0x95,0x2b,0xa6,0x72,0x68,0x52,0x19,
706c2c66affSColin Finck 0x91,0x2a,0xae,0x75,0x9d,0x4e,0x92,0xe6,0xca,0xde,0x54,0xea,0x18,0xab,0x25,
707c2c66affSColin Finck 0x3c,0xe6,0x64,0xa6,0x79,0x1f,0x26,0x7d,0x61,0xed,0x7d,0xd2,0xe5,0x71,0x55,
708c2c66affSColin Finck 0xd8,0x93,0x17,0x7c,0x14,0x38,0x30,0x3c,0xdf,0x86,0xe3,0x4c,0xad,0x49,0xe3,
709c2c66affSColin Finck 0x97,0x59,0xce,0x1b,0x9b,0x2b,0xce,0xdc,0x65,0xd4,0x0b,0x28,0x6b,0x4e,0x84,
710c2c66affSColin Finck 0x46,0x51,0x44,0xf7,0x33,0x08,0x2d,0x58,0x97,0x21,0xae };
711c2c66affSColin Finck /* global_sign_root -> global_sign_ca -> openssl_org:
712c2c66affSColin Finck  * "*.openssl.org"'s certificate
713c2c66affSColin Finck  */
714c2c66affSColin Finck static const BYTE global_sign_root[] = {
715c2c66affSColin Finck 0x30,0x82,0x04,0x6e,0x30,0x82,0x03,0x56,0xa0,0x03,0x02,0x01,0x02,0x02,0x0b,0x04,
716c2c66affSColin Finck 0x00,0x00,0x00,0x00,0x01,0x12,0x56,0xad,0x62,0x04,0x30,0x0d,0x06,0x09,0x2a,0x86,
717c2c66affSColin Finck 0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x30,0x57,0x31,0x0b,0x30,0x09,0x06,
718c2c66affSColin Finck 0x03,0x55,0x04,0x06,0x13,0x02,0x42,0x45,0x31,0x19,0x30,0x17,0x06,0x03,0x55,0x04,
719c2c66affSColin Finck 0x0a,0x13,0x10,0x47,0x6c,0x6f,0x62,0x61,0x6c,0x53,0x69,0x67,0x6e,0x20,0x6e,0x76,
720c2c66affSColin Finck 0x2d,0x73,0x61,0x31,0x10,0x30,0x0e,0x06,0x03,0x55,0x04,0x0b,0x13,0x07,0x52,0x6f,
721c2c66affSColin Finck 0x6f,0x74,0x20,0x43,0x41,0x31,0x1b,0x30,0x19,0x06,0x03,0x55,0x04,0x03,0x13,0x12,
722c2c66affSColin Finck 0x47,0x6c,0x6f,0x62,0x61,0x6c,0x53,0x69,0x67,0x6e,0x20,0x52,0x6f,0x6f,0x74,0x20,
723c2c66affSColin Finck 0x43,0x41,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x34,0x31,0x30,0x30,0x30,
724c2c66affSColin Finck 0x30,0x30,0x5a,0x17,0x0d,0x31,0x34,0x30,0x31,0x32,0x37,0x31,0x31,0x30,0x30,0x30,
725c2c66affSColin Finck 0x30,0x5a,0x30,0x71,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x42,
726c2c66affSColin Finck 0x45,0x31,0x1d,0x30,0x1b,0x06,0x03,0x55,0x04,0x0b,0x13,0x14,0x44,0x6f,0x6d,0x61,
727c2c66affSColin Finck 0x69,0x6e,0x20,0x56,0x61,0x6c,0x69,0x64,0x61,0x74,0x69,0x6f,0x6e,0x20,0x43,0x41,
728c2c66affSColin Finck 0x31,0x19,0x30,0x17,0x06,0x03,0x55,0x04,0x0a,0x13,0x10,0x47,0x6c,0x6f,0x62,0x61,
729c2c66affSColin Finck 0x6c,0x53,0x69,0x67,0x6e,0x20,0x6e,0x76,0x2d,0x73,0x61,0x31,0x28,0x30,0x26,0x06,
730c2c66affSColin Finck 0x03,0x55,0x04,0x03,0x13,0x1f,0x47,0x6c,0x6f,0x62,0x61,0x6c,0x53,0x69,0x67,0x6e,
731c2c66affSColin Finck 0x20,0x44,0x6f,0x6d,0x61,0x69,0x6e,0x20,0x56,0x61,0x6c,0x69,0x64,0x61,0x74,0x69,
732c2c66affSColin Finck 0x6f,0x6e,0x20,0x43,0x41,0x30,0x82,0x01,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,
733c2c66affSColin Finck 0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x82,0x01,0x0f,0x00,0x30,0x82,0x01,
734c2c66affSColin Finck 0x0a,0x02,0x82,0x01,0x01,0x00,0xb4,0x9f,0x49,0xe6,0xb3,0x9f,0x01,0x55,0x36,0xd0,
735c2c66affSColin Finck 0x36,0x95,0x6c,0xcb,0x16,0x5a,0x6c,0x72,0xb5,0xe2,0x9d,0xe2,0xfa,0x39,0xe9,0x0a,
736c2c66affSColin Finck 0xdc,0x73,0x5c,0xa0,0x3b,0x76,0x6d,0x05,0x28,0x93,0x0d,0xa5,0x42,0xf3,0xe8,0xcb,
737c2c66affSColin Finck 0xee,0xd3,0x33,0x1a,0x13,0x27,0x0a,0xdf,0x5c,0xd1,0x54,0x62,0x6a,0x9a,0x17,0x36,
738c2c66affSColin Finck 0xd6,0x3c,0x58,0x87,0x1e,0xb2,0x66,0x1f,0x55,0x69,0x2b,0x89,0x56,0x47,0xb4,0xc2,
739c2c66affSColin Finck 0x50,0x0c,0xe5,0x5d,0xc1,0xfd,0x29,0x1b,0x66,0x73,0x43,0xf4,0x6f,0xd1,0x14,0x4f,
740c2c66affSColin Finck 0x2a,0x6d,0x48,0x52,0x3a,0xf5,0xe4,0x90,0x3f,0xde,0xb2,0xf4,0x10,0xd5,0xf9,0xfa,
741c2c66affSColin Finck 0xac,0x96,0x0d,0x10,0x32,0x23,0xd2,0xd3,0x51,0xa7,0x95,0x85,0x50,0xfa,0x0f,0x29,
742c2c66affSColin Finck 0x9d,0xa7,0x88,0x4e,0x0d,0x31,0x9b,0x44,0x41,0x8e,0x41,0x2f,0x6e,0x9a,0x1a,0xb4,
743c2c66affSColin Finck 0xb6,0xa5,0x59,0xf1,0x49,0x59,0x09,0x7e,0x7e,0x49,0xd3,0x69,0x33,0x4b,0x00,0x92,
744c2c66affSColin Finck 0xc5,0x1b,0x42,0x20,0x69,0xf8,0x64,0xdf,0xd8,0xa7,0x44,0xd1,0x90,0x5e,0xfd,0x39,
745c2c66affSColin Finck 0xad,0x6b,0x7d,0xfe,0xd5,0x8b,0xa4,0x01,0x64,0xf6,0xa7,0xb4,0x20,0x84,0xcc,0x05,
746c2c66affSColin Finck 0x2f,0x27,0xee,0x1e,0xd5,0x24,0x96,0xae,0x84,0x43,0xa4,0x3e,0x43,0xf3,0x3b,0x99,
747c2c66affSColin Finck 0xd7,0xf9,0xf2,0xde,0x3d,0x19,0xed,0xd0,0x65,0xf1,0x49,0xca,0x48,0xd2,0x38,0x7d,
748c2c66affSColin Finck 0xc6,0x48,0xd7,0x72,0x61,0xb8,0xc6,0xc2,0x67,0x0a,0xd8,0x65,0x5a,0xfd,0x5b,0xf3,
749c2c66affSColin Finck 0xc5,0xfd,0xbe,0x8c,0x69,0xcf,0x99,0x20,0xb6,0xea,0xec,0x39,0x80,0xe9,0x66,0xa8,
750c2c66affSColin Finck 0xee,0x3d,0x9d,0x46,0x7b,0x87,0x02,0x03,0x01,0x00,0x01,0xa3,0x82,0x01,0x1f,0x30,
751c2c66affSColin Finck 0x82,0x01,0x1b,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,0xff,0x04,0x04,0x03,
752c2c66affSColin Finck 0x02,0x01,0x06,0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,
753c2c66affSColin Finck 0x06,0x01,0x01,0xff,0x02,0x01,0x00,0x30,0x4b,0x06,0x03,0x55,0x1d,0x20,0x04,0x44,
754c2c66affSColin Finck 0x30,0x42,0x30,0x40,0x06,0x09,0x2b,0x06,0x01,0x04,0x01,0xa0,0x32,0x01,0x0a,0x30,
755c2c66affSColin Finck 0x33,0x30,0x31,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x02,0x01,0x16,0x25,0x68,
756c2c66affSColin Finck 0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x67,0x6c,0x6f,0x62,0x61,0x6c,
757c2c66affSColin Finck 0x73,0x69,0x67,0x6e,0x2e,0x6e,0x65,0x74,0x2f,0x72,0x65,0x70,0x6f,0x73,0x69,0x74,
758c2c66affSColin Finck 0x6f,0x72,0x79,0x2f,0x30,0x1d,0x06,0x03,0x55,0x1d,0x0e,0x04,0x16,0x04,0x14,0x36,
759c2c66affSColin Finck 0x12,0x4e,0x9e,0x71,0xc4,0x26,0x41,0xf1,0xfa,0xf1,0x29,0x4c,0xbf,0x17,0xa4,0x53,
760c2c66affSColin Finck 0x28,0xb6,0xeb,0x30,0x33,0x06,0x03,0x55,0x1d,0x1f,0x04,0x2c,0x30,0x2a,0x30,0x28,
761c2c66affSColin Finck 0xa0,0x26,0xa0,0x24,0x86,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x63,0x72,0x6c,
762c2c66affSColin Finck 0x2e,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x73,0x69,0x67,0x6e,0x2e,0x6e,0x65,0x74,0x2f,
763c2c66affSColin Finck 0x72,0x6f,0x6f,0x74,0x2e,0x63,0x72,0x6c,0x30,0x11,0x06,0x09,0x60,0x86,0x48,0x01,
764c2c66affSColin Finck 0x86,0xf8,0x42,0x01,0x01,0x04,0x04,0x03,0x02,0x02,0x04,0x30,0x20,0x06,0x03,0x55,
765c2c66affSColin Finck 0x1d,0x25,0x04,0x19,0x30,0x17,0x06,0x0a,0x2b,0x06,0x01,0x04,0x01,0x82,0x37,0x0a,
766c2c66affSColin Finck 0x03,0x03,0x06,0x09,0x60,0x86,0x48,0x01,0x86,0xf8,0x42,0x04,0x01,0x30,0x1f,0x06,
767c2c66affSColin Finck 0x03,0x55,0x1d,0x23,0x04,0x18,0x30,0x16,0x80,0x14,0x60,0x7b,0x66,0x1a,0x45,0x0d,
768c2c66affSColin Finck 0x97,0xca,0x89,0x50,0x2f,0x7d,0x04,0xcd,0x34,0xa8,0xff,0xfc,0xfd,0x4b,0x30,0x0d,
769c2c66affSColin Finck 0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x82,0x01,
770c2c66affSColin Finck 0x01,0x00,0xc3,0x25,0x79,0x4a,0xfa,0xcd,0x26,0x6f,0x40,0x6a,0xb8,0x94,0x1b,0xe6,
771c2c66affSColin Finck 0xa0,0xe1,0x6b,0xd2,0x31,0x9a,0x3f,0x89,0xfb,0xc5,0x0a,0x22,0x75,0x7a,0xfd,0xbb,
772c2c66affSColin Finck 0x40,0x34,0x9c,0xbc,0x9e,0x85,0x49,0x59,0x7a,0x95,0xcc,0x0d,0x2d,0x44,0x0b,0xc7,
773c2c66affSColin Finck 0xcb,0x15,0x10,0x1e,0xd2,0xdc,0xe3,0x78,0xea,0x5f,0xf5,0x35,0x51,0xa6,0xc8,0x3f,
774c2c66affSColin Finck 0x39,0x90,0x15,0x9e,0x5f,0x15,0xc9,0xb7,0x8f,0x5d,0x6b,0x63,0x99,0x68,0xe1,0x6e,
775c2c66affSColin Finck 0x5c,0xfc,0x9d,0x37,0x33,0x0a,0xae,0x87,0x70,0x4a,0xa2,0xe3,0xab,0x26,0x7d,0x73,
776c2c66affSColin Finck 0x07,0xe4,0xf7,0x0a,0xaa,0x75,0x8f,0xa6,0xee,0x9b,0x04,0xd1,0x05,0x43,0x74,0x1a,
777c2c66affSColin Finck 0xba,0xd4,0xc2,0x9d,0x7f,0xb7,0xa0,0x6c,0xed,0x16,0x9a,0x67,0x40,0x56,0xab,0x83,
778c2c66affSColin Finck 0x9f,0x4c,0x9c,0xeb,0x28,0x34,0x1f,0x8d,0xe6,0x5a,0x0f,0x69,0x40,0xd9,0xa9,0x9e,
779c2c66affSColin Finck 0x6a,0xf9,0x89,0x7f,0xd0,0xf8,0x8c,0xb3,0x48,0x2e,0x0b,0x4f,0xf1,0xf9,0xcf,0xf5,
780c2c66affSColin Finck 0x0e,0x11,0x02,0x0c,0x89,0x16,0x73,0x53,0x5d,0x2c,0xd3,0xef,0xde,0x5f,0x0b,0x25,
781c2c66affSColin Finck 0xba,0xd5,0x4e,0x8f,0x85,0x90,0x3f,0x88,0x93,0x79,0xa5,0x20,0xac,0xff,0xb0,0x8a,
782c2c66affSColin Finck 0xcb,0xcb,0xa5,0x55,0x78,0x83,0x39,0x41,0x32,0xaa,0x5d,0x25,0x93,0xa7,0xea,0xee,
783c2c66affSColin Finck 0x18,0x72,0xb5,0xe2,0x1d,0x7f,0x08,0x74,0x11,0xb6,0x01,0x27,0x4e,0x96,0xcf,0xa8,
784c2c66affSColin Finck 0xf0,0x2a,0xf9,0x52,0xac,0x24,0x1a,0x19,0x9e,0x9f,0x6c,0x52,0x7c,0x8b,0x3a,0xa6,
785c2c66affSColin Finck 0x54,0xde,0xc1,0xc7,0x21,0x7d,0x3a,0xd3,0xbc,0x1a,0xa8,0x6d,0xf2,0xbf,0xdf,0x76,
786c2c66affSColin Finck 0xca,0x03
787c2c66affSColin Finck };
788c2c66affSColin Finck static const BYTE global_sign_ca[] = {
789c2c66affSColin Finck 0x30,0x82,0x04,0x6e,0x30,0x82,0x03,0x56,0xa0,0x03,0x02,0x01,0x02,0x02,0x0b,0x04,
790c2c66affSColin Finck 0x00,0x00,0x00,0x00,0x01,0x12,0x56,0xad,0x62,0x04,0x30,0x0d,0x06,0x09,0x2a,0x86,
791c2c66affSColin Finck 0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x30,0x57,0x31,0x0b,0x30,0x09,0x06,
792c2c66affSColin Finck 0x03,0x55,0x04,0x06,0x13,0x02,0x42,0x45,0x31,0x19,0x30,0x17,0x06,0x03,0x55,0x04,
793c2c66affSColin Finck 0x0a,0x13,0x10,0x47,0x6c,0x6f,0x62,0x61,0x6c,0x53,0x69,0x67,0x6e,0x20,0x6e,0x76,
794c2c66affSColin Finck 0x2d,0x73,0x61,0x31,0x10,0x30,0x0e,0x06,0x03,0x55,0x04,0x0b,0x13,0x07,0x52,0x6f,
795c2c66affSColin Finck 0x6f,0x74,0x20,0x43,0x41,0x31,0x1b,0x30,0x19,0x06,0x03,0x55,0x04,0x03,0x13,0x12,
796c2c66affSColin Finck 0x47,0x6c,0x6f,0x62,0x61,0x6c,0x53,0x69,0x67,0x6e,0x20,0x52,0x6f,0x6f,0x74,0x20,
797c2c66affSColin Finck 0x43,0x41,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x34,0x31,0x30,0x30,0x30,
798c2c66affSColin Finck 0x30,0x30,0x5a,0x17,0x0d,0x31,0x34,0x30,0x31,0x32,0x37,0x31,0x31,0x30,0x30,0x30,
799c2c66affSColin Finck 0x30,0x5a,0x30,0x71,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x42,
800c2c66affSColin Finck 0x45,0x31,0x1d,0x30,0x1b,0x06,0x03,0x55,0x04,0x0b,0x13,0x14,0x44,0x6f,0x6d,0x61,
801c2c66affSColin Finck 0x69,0x6e,0x20,0x56,0x61,0x6c,0x69,0x64,0x61,0x74,0x69,0x6f,0x6e,0x20,0x43,0x41,
802c2c66affSColin Finck 0x31,0x19,0x30,0x17,0x06,0x03,0x55,0x04,0x0a,0x13,0x10,0x47,0x6c,0x6f,0x62,0x61,
803c2c66affSColin Finck 0x6c,0x53,0x69,0x67,0x6e,0x20,0x6e,0x76,0x2d,0x73,0x61,0x31,0x28,0x30,0x26,0x06,
804c2c66affSColin Finck 0x03,0x55,0x04,0x03,0x13,0x1f,0x47,0x6c,0x6f,0x62,0x61,0x6c,0x53,0x69,0x67,0x6e,
805c2c66affSColin Finck 0x20,0x44,0x6f,0x6d,0x61,0x69,0x6e,0x20,0x56,0x61,0x6c,0x69,0x64,0x61,0x74,0x69,
806c2c66affSColin Finck 0x6f,0x6e,0x20,0x43,0x41,0x30,0x82,0x01,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,
807c2c66affSColin Finck 0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x82,0x01,0x0f,0x00,0x30,0x82,0x01,
808c2c66affSColin Finck 0x0a,0x02,0x82,0x01,0x01,0x00,0xb4,0x9f,0x49,0xe6,0xb3,0x9f,0x01,0x55,0x36,0xd0,
809c2c66affSColin Finck 0x36,0x95,0x6c,0xcb,0x16,0x5a,0x6c,0x72,0xb5,0xe2,0x9d,0xe2,0xfa,0x39,0xe9,0x0a,
810c2c66affSColin Finck 0xdc,0x73,0x5c,0xa0,0x3b,0x76,0x6d,0x05,0x28,0x93,0x0d,0xa5,0x42,0xf3,0xe8,0xcb,
811c2c66affSColin Finck 0xee,0xd3,0x33,0x1a,0x13,0x27,0x0a,0xdf,0x5c,0xd1,0x54,0x62,0x6a,0x9a,0x17,0x36,
812c2c66affSColin Finck 0xd6,0x3c,0x58,0x87,0x1e,0xb2,0x66,0x1f,0x55,0x69,0x2b,0x89,0x56,0x47,0xb4,0xc2,
813c2c66affSColin Finck 0x50,0x0c,0xe5,0x5d,0xc1,0xfd,0x29,0x1b,0x66,0x73,0x43,0xf4,0x6f,0xd1,0x14,0x4f,
814c2c66affSColin Finck 0x2a,0x6d,0x48,0x52,0x3a,0xf5,0xe4,0x90,0x3f,0xde,0xb2,0xf4,0x10,0xd5,0xf9,0xfa,
815c2c66affSColin Finck 0xac,0x96,0x0d,0x10,0x32,0x23,0xd2,0xd3,0x51,0xa7,0x95,0x85,0x50,0xfa,0x0f,0x29,
816c2c66affSColin Finck 0x9d,0xa7,0x88,0x4e,0x0d,0x31,0x9b,0x44,0x41,0x8e,0x41,0x2f,0x6e,0x9a,0x1a,0xb4,
817c2c66affSColin Finck 0xb6,0xa5,0x59,0xf1,0x49,0x59,0x09,0x7e,0x7e,0x49,0xd3,0x69,0x33,0x4b,0x00,0x92,
818c2c66affSColin Finck 0xc5,0x1b,0x42,0x20,0x69,0xf8,0x64,0xdf,0xd8,0xa7,0x44,0xd1,0x90,0x5e,0xfd,0x39,
819c2c66affSColin Finck 0xad,0x6b,0x7d,0xfe,0xd5,0x8b,0xa4,0x01,0x64,0xf6,0xa7,0xb4,0x20,0x84,0xcc,0x05,
820c2c66affSColin Finck 0x2f,0x27,0xee,0x1e,0xd5,0x24,0x96,0xae,0x84,0x43,0xa4,0x3e,0x43,0xf3,0x3b,0x99,
821c2c66affSColin Finck 0xd7,0xf9,0xf2,0xde,0x3d,0x19,0xed,0xd0,0x65,0xf1,0x49,0xca,0x48,0xd2,0x38,0x7d,
822c2c66affSColin Finck 0xc6,0x48,0xd7,0x72,0x61,0xb8,0xc6,0xc2,0x67,0x0a,0xd8,0x65,0x5a,0xfd,0x5b,0xf3,
823c2c66affSColin Finck 0xc5,0xfd,0xbe,0x8c,0x69,0xcf,0x99,0x20,0xb6,0xea,0xec,0x39,0x80,0xe9,0x66,0xa8,
824c2c66affSColin Finck 0xee,0x3d,0x9d,0x46,0x7b,0x87,0x02,0x03,0x01,0x00,0x01,0xa3,0x82,0x01,0x1f,0x30,
825c2c66affSColin Finck 0x82,0x01,0x1b,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,0xff,0x04,0x04,0x03,
826c2c66affSColin Finck 0x02,0x01,0x06,0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,
827c2c66affSColin Finck 0x06,0x01,0x01,0xff,0x02,0x01,0x00,0x30,0x4b,0x06,0x03,0x55,0x1d,0x20,0x04,0x44,
828c2c66affSColin Finck 0x30,0x42,0x30,0x40,0x06,0x09,0x2b,0x06,0x01,0x04,0x01,0xa0,0x32,0x01,0x0a,0x30,
829c2c66affSColin Finck 0x33,0x30,0x31,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x02,0x01,0x16,0x25,0x68,
830c2c66affSColin Finck 0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x67,0x6c,0x6f,0x62,0x61,0x6c,
831c2c66affSColin Finck 0x73,0x69,0x67,0x6e,0x2e,0x6e,0x65,0x74,0x2f,0x72,0x65,0x70,0x6f,0x73,0x69,0x74,
832c2c66affSColin Finck 0x6f,0x72,0x79,0x2f,0x30,0x1d,0x06,0x03,0x55,0x1d,0x0e,0x04,0x16,0x04,0x14,0x36,
833c2c66affSColin Finck 0x12,0x4e,0x9e,0x71,0xc4,0x26,0x41,0xf1,0xfa,0xf1,0x29,0x4c,0xbf,0x17,0xa4,0x53,
834c2c66affSColin Finck 0x28,0xb6,0xeb,0x30,0x33,0x06,0x03,0x55,0x1d,0x1f,0x04,0x2c,0x30,0x2a,0x30,0x28,
835c2c66affSColin Finck 0xa0,0x26,0xa0,0x24,0x86,0x22,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x63,0x72,0x6c,
836c2c66affSColin Finck 0x2e,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x73,0x69,0x67,0x6e,0x2e,0x6e,0x65,0x74,0x2f,
837c2c66affSColin Finck 0x72,0x6f,0x6f,0x74,0x2e,0x63,0x72,0x6c,0x30,0x11,0x06,0x09,0x60,0x86,0x48,0x01,
838c2c66affSColin Finck 0x86,0xf8,0x42,0x01,0x01,0x04,0x04,0x03,0x02,0x02,0x04,0x30,0x20,0x06,0x03,0x55,
839c2c66affSColin Finck 0x1d,0x25,0x04,0x19,0x30,0x17,0x06,0x0a,0x2b,0x06,0x01,0x04,0x01,0x82,0x37,0x0a,
840c2c66affSColin Finck 0x03,0x03,0x06,0x09,0x60,0x86,0x48,0x01,0x86,0xf8,0x42,0x04,0x01,0x30,0x1f,0x06,
841c2c66affSColin Finck 0x03,0x55,0x1d,0x23,0x04,0x18,0x30,0x16,0x80,0x14,0x60,0x7b,0x66,0x1a,0x45,0x0d,
842c2c66affSColin Finck 0x97,0xca,0x89,0x50,0x2f,0x7d,0x04,0xcd,0x34,0xa8,0xff,0xfc,0xfd,0x4b,0x30,0x0d,
843c2c66affSColin Finck 0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x82,0x01,
844c2c66affSColin Finck 0x01,0x00,0xc3,0x25,0x79,0x4a,0xfa,0xcd,0x26,0x6f,0x40,0x6a,0xb8,0x94,0x1b,0xe6,
845c2c66affSColin Finck 0xa0,0xe1,0x6b,0xd2,0x31,0x9a,0x3f,0x89,0xfb,0xc5,0x0a,0x22,0x75,0x7a,0xfd,0xbb,
846c2c66affSColin Finck 0x40,0x34,0x9c,0xbc,0x9e,0x85,0x49,0x59,0x7a,0x95,0xcc,0x0d,0x2d,0x44,0x0b,0xc7,
847c2c66affSColin Finck 0xcb,0x15,0x10,0x1e,0xd2,0xdc,0xe3,0x78,0xea,0x5f,0xf5,0x35,0x51,0xa6,0xc8,0x3f,
848c2c66affSColin Finck 0x39,0x90,0x15,0x9e,0x5f,0x15,0xc9,0xb7,0x8f,0x5d,0x6b,0x63,0x99,0x68,0xe1,0x6e,
849c2c66affSColin Finck 0x5c,0xfc,0x9d,0x37,0x33,0x0a,0xae,0x87,0x70,0x4a,0xa2,0xe3,0xab,0x26,0x7d,0x73,
850c2c66affSColin Finck 0x07,0xe4,0xf7,0x0a,0xaa,0x75,0x8f,0xa6,0xee,0x9b,0x04,0xd1,0x05,0x43,0x74,0x1a,
851c2c66affSColin Finck 0xba,0xd4,0xc2,0x9d,0x7f,0xb7,0xa0,0x6c,0xed,0x16,0x9a,0x67,0x40,0x56,0xab,0x83,
852c2c66affSColin Finck 0x9f,0x4c,0x9c,0xeb,0x28,0x34,0x1f,0x8d,0xe6,0x5a,0x0f,0x69,0x40,0xd9,0xa9,0x9e,
853c2c66affSColin Finck 0x6a,0xf9,0x89,0x7f,0xd0,0xf8,0x8c,0xb3,0x48,0x2e,0x0b,0x4f,0xf1,0xf9,0xcf,0xf5,
854c2c66affSColin Finck 0x0e,0x11,0x02,0x0c,0x89,0x16,0x73,0x53,0x5d,0x2c,0xd3,0xef,0xde,0x5f,0x0b,0x25,
855c2c66affSColin Finck 0xba,0xd5,0x4e,0x8f,0x85,0x90,0x3f,0x88,0x93,0x79,0xa5,0x20,0xac,0xff,0xb0,0x8a,
856c2c66affSColin Finck 0xcb,0xcb,0xa5,0x55,0x78,0x83,0x39,0x41,0x32,0xaa,0x5d,0x25,0x93,0xa7,0xea,0xee,
857c2c66affSColin Finck 0x18,0x72,0xb5,0xe2,0x1d,0x7f,0x08,0x74,0x11,0xb6,0x01,0x27,0x4e,0x96,0xcf,0xa8,
858c2c66affSColin Finck 0xf0,0x2a,0xf9,0x52,0xac,0x24,0x1a,0x19,0x9e,0x9f,0x6c,0x52,0x7c,0x8b,0x3a,0xa6,
859c2c66affSColin Finck 0x54,0xde,0xc1,0xc7,0x21,0x7d,0x3a,0xd3,0xbc,0x1a,0xa8,0x6d,0xf2,0xbf,0xdf,0x76,
860c2c66affSColin Finck 0xca,0x03
861c2c66affSColin Finck };
862c2c66affSColin Finck static const BYTE openssl_org[] = {
863c2c66affSColin Finck 0x30,0x82,0x04,0xc8,0x30,0x82,0x03,0xb0,0xa0,0x03,0x02,0x01,0x02,0x02,0x0b,0x01,
864c2c66affSColin Finck 0x00,0x00,0x00,0x00,0x01,0x1c,0x57,0x8e,0x3a,0xeb,0x30,0x0d,0x06,0x09,0x2a,0x86,
865c2c66affSColin Finck 0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x30,0x71,0x31,0x0b,0x30,0x09,0x06,
866c2c66affSColin Finck 0x03,0x55,0x04,0x06,0x13,0x02,0x42,0x45,0x31,0x1d,0x30,0x1b,0x06,0x03,0x55,0x04,
867c2c66affSColin Finck 0x0b,0x13,0x14,0x44,0x6f,0x6d,0x61,0x69,0x6e,0x20,0x56,0x61,0x6c,0x69,0x64,0x61,
868c2c66affSColin Finck 0x74,0x69,0x6f,0x6e,0x20,0x43,0x41,0x31,0x19,0x30,0x17,0x06,0x03,0x55,0x04,0x0a,
869c2c66affSColin Finck 0x13,0x10,0x47,0x6c,0x6f,0x62,0x61,0x6c,0x53,0x69,0x67,0x6e,0x20,0x6e,0x76,0x2d,
870c2c66affSColin Finck 0x73,0x61,0x31,0x28,0x30,0x26,0x06,0x03,0x55,0x04,0x03,0x13,0x1f,0x47,0x6c,0x6f,
871c2c66affSColin Finck 0x62,0x61,0x6c,0x53,0x69,0x67,0x6e,0x20,0x44,0x6f,0x6d,0x61,0x69,0x6e,0x20,0x56,
872c2c66affSColin Finck 0x61,0x6c,0x69,0x64,0x61,0x74,0x69,0x6f,0x6e,0x20,0x43,0x41,0x30,0x1e,0x17,0x0d,
873c2c66affSColin Finck 0x30,0x38,0x30,0x39,0x31,0x32,0x31,0x37,0x31,0x34,0x31,0x31,0x5a,0x17,0x0d,0x31,
874c2c66affSColin Finck 0x31,0x30,0x39,0x31,0x33,0x31,0x37,0x31,0x34,0x30,0x36,0x5a,0x30,0x60,0x31,0x0b,
875c2c66affSColin Finck 0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x47,0x42,0x31,0x21,0x30,0x1f,0x06,
876c2c66affSColin Finck 0x03,0x55,0x04,0x0b,0x13,0x18,0x44,0x6f,0x6d,0x61,0x69,0x6e,0x20,0x43,0x6f,0x6e,
877c2c66affSColin Finck 0x74,0x72,0x6f,0x6c,0x20,0x56,0x61,0x6c,0x69,0x64,0x61,0x74,0x65,0x64,0x31,0x16,
878c2c66affSColin Finck 0x30,0x14,0x06,0x03,0x55,0x04,0x0a,0x14,0x0d,0x2a,0x2e,0x6f,0x70,0x65,0x6e,0x73,
879c2c66affSColin Finck 0x73,0x6c,0x2e,0x6f,0x72,0x67,0x31,0x16,0x30,0x14,0x06,0x03,0x55,0x04,0x03,0x14,
880c2c66affSColin Finck 0x0d,0x2a,0x2e,0x6f,0x70,0x65,0x6e,0x73,0x73,0x6c,0x2e,0x6f,0x72,0x67,0x30,0x82,
881c2c66affSColin Finck 0x01,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,
882c2c66affSColin Finck 0x00,0x03,0x82,0x01,0x0f,0x00,0x30,0x82,0x01,0x0a,0x02,0x82,0x01,0x01,0x00,0xb9,
883c2c66affSColin Finck 0x23,0x4e,0x1d,0xb5,0xef,0x87,0xb2,0xce,0x43,0x75,0x6a,0xc3,0x11,0x1c,0xd2,0xf7,
884c2c66affSColin Finck 0x32,0xf3,0xf7,0x92,0x9b,0xed,0xe6,0x86,0xc3,0xb7,0x93,0x93,0x5e,0x7d,0x32,0x6a,
885c2c66affSColin Finck 0x2b,0x03,0xb7,0x2a,0xc8,0x80,0x98,0x91,0x41,0x40,0x08,0xac,0xde,0xa6,0x7a,0x7c,
886c2c66affSColin Finck 0x4f,0x44,0x8b,0x9c,0xd8,0xd3,0x87,0x71,0xf2,0x4e,0x3e,0x54,0xd7,0xa4,0x11,0x81,
887c2c66affSColin Finck 0xb7,0x71,0x68,0x87,0xc1,0xc9,0xaf,0x2a,0xfa,0xb2,0x74,0xa3,0x70,0xa1,0x4d,0x19,
888c2c66affSColin Finck 0x06,0x8d,0x1c,0x95,0x04,0x14,0x9c,0x8f,0x1f,0xf0,0x98,0xc1,0xc0,0x70,0xfa,0xb1,
889c2c66affSColin Finck 0x10,0x1d,0x77,0xda,0x80,0x14,0x53,0xa5,0x5c,0xbe,0x05,0x9a,0x43,0xf4,0x54,0xf3,
890c2c66affSColin Finck 0x70,0xf4,0x71,0x39,0xea,0x50,0x9c,0xe6,0xa8,0xd0,0x78,0xa6,0x30,0x1e,0x6d,0x4d,
891c2c66affSColin Finck 0x22,0x10,0xdd,0x15,0x2d,0x50,0x00,0x5d,0xd9,0xc9,0xd2,0xa6,0xb9,0xdb,0x7f,0xad,
892c2c66affSColin Finck 0xd8,0xeb,0xef,0x65,0x1f,0xce,0xbb,0x8d,0x4e,0x51,0x95,0x84,0x6e,0x95,0x16,0xef,
893c2c66affSColin Finck 0x0b,0xf0,0x7b,0xff,0x2d,0x6c,0x1b,0x81,0x6c,0xca,0xe0,0x25,0x3d,0x2a,0x5c,0x6f,
894c2c66affSColin Finck 0xad,0xce,0x4b,0x5c,0x46,0x7c,0xb1,0xa9,0xf4,0xea,0x72,0x02,0xa1,0xcc,0x87,0x63,
895c2c66affSColin Finck 0x85,0x19,0x52,0x01,0x23,0x04,0x8e,0x2a,0xb4,0x94,0xde,0x6d,0x69,0x13,0x65,0x0b,
896c2c66affSColin Finck 0x70,0x5f,0x92,0x1a,0x44,0x68,0x41,0xcd,0x80,0xef,0xc9,0xe9,0x83,0xd8,0x1e,0x95,
897c2c66affSColin Finck 0x86,0xc7,0x1a,0x51,0xaf,0x3d,0xaa,0xca,0x97,0x19,0xe0,0xb4,0x69,0x87,0x75,0xe1,
898c2c66affSColin Finck 0x09,0x9a,0x53,0xcd,0xf5,0x43,0xcf,0x2b,0x1d,0xe7,0x81,0x20,0x1e,0x97,0x25,0x02,
899c2c66affSColin Finck 0x03,0x01,0x00,0x01,0xa3,0x82,0x01,0x70,0x30,0x82,0x01,0x6c,0x30,0x1f,0x06,0x03,
900c2c66affSColin Finck 0x55,0x1d,0x23,0x04,0x18,0x30,0x16,0x80,0x14,0x36,0x12,0x4e,0x9e,0x71,0xc4,0x26,
901c2c66affSColin Finck 0x41,0xf1,0xfa,0xf1,0x29,0x4c,0xbf,0x17,0xa4,0x53,0x28,0xb6,0xeb,0x30,0x49,0x06,
902c2c66affSColin Finck 0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x01,0x01,0x04,0x3d,0x30,0x3b,0x30,0x39,0x06,
903c2c66affSColin Finck 0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x30,0x02,0x86,0x2d,0x68,0x74,0x74,0x70,0x3a,
904c2c66affSColin Finck 0x2f,0x2f,0x73,0x65,0x63,0x75,0x72,0x65,0x2e,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x73,
905c2c66affSColin Finck 0x69,0x67,0x6e,0x2e,0x6e,0x65,0x74,0x2f,0x63,0x61,0x63,0x65,0x72,0x74,0x2f,0x64,
906c2c66affSColin Finck 0x76,0x68,0x65,0x31,0x2e,0x63,0x72,0x74,0x30,0x39,0x06,0x03,0x55,0x1d,0x1f,0x04,
907c2c66affSColin Finck 0x32,0x30,0x30,0x30,0x2e,0xa0,0x2c,0xa0,0x2a,0x86,0x28,0x68,0x74,0x74,0x70,0x3a,
908c2c66affSColin Finck 0x2f,0x2f,0x63,0x72,0x6c,0x2e,0x67,0x6c,0x6f,0x62,0x61,0x6c,0x73,0x69,0x67,0x6e,
909c2c66affSColin Finck 0x2e,0x6e,0x65,0x74,0x2f,0x44,0x6f,0x6d,0x61,0x69,0x6e,0x56,0x61,0x6c,0x31,0x2e,
910c2c66affSColin Finck 0x63,0x72,0x6c,0x30,0x1d,0x06,0x03,0x55,0x1d,0x0e,0x04,0x16,0x04,0x14,0xec,0x81,
911c2c66affSColin Finck 0x7d,0x47,0xa8,0xc0,0x19,0xa7,0xbc,0x6b,0x52,0x5e,0xb6,0x90,0xfb,0x17,0xae,0x7f,
912c2c66affSColin Finck 0x41,0x8f,0x30,0x09,0x06,0x03,0x55,0x1d,0x13,0x04,0x02,0x30,0x00,0x30,0x0e,0x06,
913c2c66affSColin Finck 0x03,0x55,0x1d,0x0f,0x01,0x01,0xff,0x04,0x04,0x03,0x02,0x04,0xf0,0x30,0x29,0x06,
914c2c66affSColin Finck 0x03,0x55,0x1d,0x25,0x04,0x22,0x30,0x20,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,
915c2c66affSColin Finck 0x03,0x01,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x03,0x02,0x06,0x0a,0x2b,0x06,
916c2c66affSColin Finck 0x01,0x04,0x01,0x82,0x37,0x0a,0x03,0x03,0x30,0x4b,0x06,0x03,0x55,0x1d,0x20,0x04,
917c2c66affSColin Finck 0x44,0x30,0x42,0x30,0x40,0x06,0x09,0x2b,0x06,0x01,0x04,0x01,0xa0,0x32,0x01,0x0a,
918c2c66affSColin Finck 0x30,0x33,0x30,0x31,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x02,0x01,0x16,0x25,
919c2c66affSColin Finck 0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x67,0x6c,0x6f,0x62,0x61,
920c2c66affSColin Finck 0x6c,0x73,0x69,0x67,0x6e,0x2e,0x6e,0x65,0x74,0x2f,0x72,0x65,0x70,0x6f,0x73,0x69,
921c2c66affSColin Finck 0x74,0x6f,0x72,0x79,0x2f,0x30,0x11,0x06,0x09,0x60,0x86,0x48,0x01,0x86,0xf8,0x42,
922c2c66affSColin Finck 0x01,0x01,0x04,0x04,0x03,0x02,0x06,0xc0,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,
923c2c66affSColin Finck 0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x82,0x01,0x01,0x00,0x2b,0x22,0xdd,0xa3,
924c2c66affSColin Finck 0x1a,0xf9,0x12,0xee,0x77,0xbf,0x34,0xdd,0xbf,0x57,0x98,0x72,0xb3,0x05,0x8d,0x49,
925c2c66affSColin Finck 0xa4,0x5d,0x55,0xec,0x08,0xf4,0x70,0xb9,0x83,0xaf,0x57,0xb2,0x0f,0x54,0x12,0xc5,
926c2c66affSColin Finck 0xf4,0x0e,0x6e,0xd9,0xe4,0xd4,0x7c,0x6a,0x11,0x4a,0xd7,0xc3,0x46,0x42,0x7e,0x13,
927c2c66affSColin Finck 0x4c,0x39,0x1b,0xe3,0x53,0xb1,0x8b,0x8a,0xd7,0xa2,0x74,0xcb,0x18,0x0a,0x40,0x50,
928c2c66affSColin Finck 0xbe,0xbe,0x86,0x81,0xa9,0x8e,0x23,0x0b,0xa0,0x38,0x02,0x1c,0x55,0x57,0xfd,0xf7,
929c2c66affSColin Finck 0x98,0x43,0x7f,0x6e,0xe9,0x26,0xc5,0x64,0x7d,0x8a,0x42,0xfb,0x67,0xbd,0x93,0x39,
930c2c66affSColin Finck 0x75,0x49,0xcd,0x26,0x20,0x71,0xb4,0x65,0xca,0x04,0x15,0xfb,0x1a,0xcb,0x80,0x2e,
931c2c66affSColin Finck 0x20,0x43,0x81,0x3e,0x58,0x7f,0x3f,0x2c,0x93,0x92,0x06,0x96,0x69,0xb0,0x49,0x4c,
932c2c66affSColin Finck 0xd1,0xa8,0x53,0x9b,0x41,0x55,0x13,0x75,0xc3,0x51,0xe8,0x16,0x3d,0x3e,0x6f,0xbd,
933c2c66affSColin Finck 0xb7,0x0c,0x49,0x48,0x64,0x97,0xb4,0x14,0x89,0x57,0x62,0x75,0x32,0x31,0xda,0x94,
934c2c66affSColin Finck 0x82,0xf8,0xb3,0xc6,0x02,0x20,0x5e,0x0e,0x00,0x87,0x9c,0x0f,0x34,0x65,0xda,0xf2,
935c2c66affSColin Finck 0x47,0x78,0x18,0xf5,0xd5,0xea,0xf3,0x93,0x4e,0x60,0xd6,0x6b,0x7a,0xe8,0x88,0xd7,
936c2c66affSColin Finck 0x69,0x41,0xaa,0x10,0x56,0xd7,0x16,0x14,0xde,0xc9,0x1c,0xb6,0xb6,0x10,0xab,0x6b,
937c2c66affSColin Finck 0x97,0xbd,0x6a,0xa9,0xb7,0x67,0xd7,0x96,0xeb,0x52,0x12,0x9e,0x9a,0x69,0xaf,0x38,
938c2c66affSColin Finck 0x53,0x4d,0x99,0xd8,0x84,0xea,0x54,0xba,0x89,0x67,0xff,0x40,0x66,0x0d,0x53,0x99,
939c2c66affSColin Finck 0xb6,0x65,0xba,0xf3,0x8a,0x01,0x3d,0xd0,0xf1,0x21,0x5f,0xdd
940c2c66affSColin Finck };
941c2c66affSColin Finck 
942c2c66affSColin Finck /* USERTrust -> InCommon RSA CA -> cs.stanford.edu
943c2c66affSColin Finck  * cs.stanford.edu's chain, also valid for www.cs.stanford.edu
944c2c66affSColin Finck  */
945c2c66affSColin Finck static const BYTE usertrust_ca[] = {
946c2c66affSColin Finck 0x30,0x82,0x05,0xde,0x30,0x82,0x03,0xc6,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,0x01,
947c2c66affSColin Finck 0xfd,0x6d,0x30,0xfc,0xa3,0xca,0x51,0xa8,0x1b,0xbc,0x64,0x0e,0x35,0x03,0x2d,0x30,
948c2c66affSColin Finck 0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x0c,0x05,0x00,0x30,0x81,
949c2c66affSColin Finck 0x88,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x13,
950c2c66affSColin Finck 0x30,0x11,0x06,0x03,0x55,0x04,0x08,0x13,0x0a,0x4e,0x65,0x77,0x20,0x4a,0x65,0x72,
951c2c66affSColin Finck 0x73,0x65,0x79,0x31,0x14,0x30,0x12,0x06,0x03,0x55,0x04,0x07,0x13,0x0b,0x4a,0x65,
952c2c66affSColin Finck 0x72,0x73,0x65,0x79,0x20,0x43,0x69,0x74,0x79,0x31,0x1e,0x30,0x1c,0x06,0x03,0x55,
953c2c66affSColin Finck 0x04,0x0a,0x13,0x15,0x54,0x68,0x65,0x20,0x55,0x53,0x45,0x52,0x54,0x52,0x55,0x53,
954c2c66affSColin Finck 0x54,0x20,0x4e,0x65,0x74,0x77,0x6f,0x72,0x6b,0x31,0x2e,0x30,0x2c,0x06,0x03,0x55,
955c2c66affSColin Finck 0x04,0x03,0x13,0x25,0x55,0x53,0x45,0x52,0x54,0x72,0x75,0x73,0x74,0x20,0x52,0x53,
956c2c66affSColin Finck 0x41,0x20,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,
957c2c66affSColin Finck 0x41,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x30,0x1e,0x17,0x0d,0x31,0x30,0x30,
958c2c66affSColin Finck 0x32,0x30,0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x33,0x38,0x30,0x31,
959c2c66affSColin Finck 0x31,0x38,0x32,0x33,0x35,0x39,0x35,0x39,0x5a,0x30,0x81,0x88,0x31,0x0b,0x30,0x09,
960c2c66affSColin Finck 0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x13,0x30,0x11,0x06,0x03,0x55,
961c2c66affSColin Finck 0x04,0x08,0x13,0x0a,0x4e,0x65,0x77,0x20,0x4a,0x65,0x72,0x73,0x65,0x79,0x31,0x14,
962c2c66affSColin Finck 0x30,0x12,0x06,0x03,0x55,0x04,0x07,0x13,0x0b,0x4a,0x65,0x72,0x73,0x65,0x79,0x20,
963c2c66affSColin Finck 0x43,0x69,0x74,0x79,0x31,0x1e,0x30,0x1c,0x06,0x03,0x55,0x04,0x0a,0x13,0x15,0x54,
964c2c66affSColin Finck 0x68,0x65,0x20,0x55,0x53,0x45,0x52,0x54,0x52,0x55,0x53,0x54,0x20,0x4e,0x65,0x74,
965c2c66affSColin Finck 0x77,0x6f,0x72,0x6b,0x31,0x2e,0x30,0x2c,0x06,0x03,0x55,0x04,0x03,0x13,0x25,0x55,
966c2c66affSColin Finck 0x53,0x45,0x52,0x54,0x72,0x75,0x73,0x74,0x20,0x52,0x53,0x41,0x20,0x43,0x65,0x72,
967c2c66affSColin Finck 0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,0x41,0x75,0x74,0x68,0x6f,
968c2c66affSColin Finck 0x72,0x69,0x74,0x79,0x30,0x82,0x02,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,
969c2c66affSColin Finck 0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x82,0x02,0x0f,0x00,0x30,0x82,0x02,0x0a,
970c2c66affSColin Finck 0x02,0x82,0x02,0x01,0x00,0x80,0x12,0x65,0x17,0x36,0x0e,0xc3,0xdb,0x08,0xb3,0xd0,
971c2c66affSColin Finck 0xac,0x57,0x0d,0x76,0xed,0xcd,0x27,0xd3,0x4c,0xad,0x50,0x83,0x61,0xe2,0xaa,0x20,
972c2c66affSColin Finck 0x4d,0x09,0x2d,0x64,0x09,0xdc,0xce,0x89,0x9f,0xcc,0x3d,0xa9,0xec,0xf6,0xcf,0xc1,
973c2c66affSColin Finck 0xdc,0xf1,0xd3,0xb1,0xd6,0x7b,0x37,0x28,0x11,0x2b,0x47,0xda,0x39,0xc6,0xbc,0x3a,
974c2c66affSColin Finck 0x19,0xb4,0x5f,0xa6,0xbd,0x7d,0x9d,0xa3,0x63,0x42,0xb6,0x76,0xf2,0xa9,0x3b,0x2b,
975c2c66affSColin Finck 0x91,0xf8,0xe2,0x6f,0xd0,0xec,0x16,0x20,0x90,0x09,0x3e,0xe2,0xe8,0x74,0xc9,0x18,
976c2c66affSColin Finck 0xb4,0x91,0xd4,0x62,0x64,0xdb,0x7f,0xa3,0x06,0xf1,0x88,0x18,0x6a,0x90,0x22,0x3c,
977c2c66affSColin Finck 0xbc,0xfe,0x13,0xf0,0x87,0x14,0x7b,0xf6,0xe4,0x1f,0x8e,0xd4,0xe4,0x51,0xc6,0x11,
978c2c66affSColin Finck 0x67,0x46,0x08,0x51,0xcb,0x86,0x14,0x54,0x3f,0xbc,0x33,0xfe,0x7e,0x6c,0x9c,0xff,
979c2c66affSColin Finck 0x16,0x9d,0x18,0xbd,0x51,0x8e,0x35,0xa6,0xa7,0x66,0xc8,0x72,0x67,0xdb,0x21,0x66,
980c2c66affSColin Finck 0xb1,0xd4,0x9b,0x78,0x03,0xc0,0x50,0x3a,0xe8,0xcc,0xf0,0xdc,0xbc,0x9e,0x4c,0xfe,
981c2c66affSColin Finck 0xaf,0x05,0x96,0x35,0x1f,0x57,0x5a,0xb7,0xff,0xce,0xf9,0x3d,0xb7,0x2c,0xb6,0xf6,
982c2c66affSColin Finck 0x54,0xdd,0xc8,0xe7,0x12,0x3a,0x4d,0xae,0x4c,0x8a,0xb7,0x5c,0x9a,0xb4,0xb7,0x20,
983c2c66affSColin Finck 0x3d,0xca,0x7f,0x22,0x34,0xae,0x7e,0x3b,0x68,0x66,0x01,0x44,0xe7,0x01,0x4e,0x46,
984c2c66affSColin Finck 0x53,0x9b,0x33,0x60,0xf7,0x94,0xbe,0x53,0x37,0x90,0x73,0x43,0xf3,0x32,0xc3,0x53,
985c2c66affSColin Finck 0xef,0xdb,0xaa,0xfe,0x74,0x4e,0x69,0xc7,0x6b,0x8c,0x60,0x93,0xde,0xc4,0xc7,0x0c,
986c2c66affSColin Finck 0xdf,0xe1,0x32,0xae,0xcc,0x93,0x3b,0x51,0x78,0x95,0x67,0x8b,0xee,0x3d,0x56,0xfe,
987c2c66affSColin Finck 0x0c,0xd0,0x69,0x0f,0x1b,0x0f,0xf3,0x25,0x26,0x6b,0x33,0x6d,0xf7,0x6e,0x47,0xfa,
988c2c66affSColin Finck 0x73,0x43,0xe5,0x7e,0x0e,0xa5,0x66,0xb1,0x29,0x7c,0x32,0x84,0x63,0x55,0x89,0xc4,
989c2c66affSColin Finck 0x0d,0xc1,0x93,0x54,0x30,0x19,0x13,0xac,0xd3,0x7d,0x37,0xa7,0xeb,0x5d,0x3a,0x6c,
990c2c66affSColin Finck 0x35,0x5c,0xdb,0x41,0xd7,0x12,0xda,0xa9,0x49,0x0b,0xdf,0xd8,0x80,0x8a,0x09,0x93,
991c2c66affSColin Finck 0x62,0x8e,0xb5,0x66,0xcf,0x25,0x88,0xcd,0x84,0xb8,0xb1,0x3f,0xa4,0x39,0x0f,0xd9,
992c2c66affSColin Finck 0x02,0x9e,0xeb,0x12,0x4c,0x95,0x7c,0xf3,0x6b,0x05,0xa9,0x5e,0x16,0x83,0xcc,0xb8,
993c2c66affSColin Finck 0x67,0xe2,0xe8,0x13,0x9d,0xcc,0x5b,0x82,0xd3,0x4c,0xb3,0xed,0x5b,0xff,0xde,0xe5,
994c2c66affSColin Finck 0x73,0xac,0x23,0x3b,0x2d,0x00,0xbf,0x35,0x55,0x74,0x09,0x49,0xd8,0x49,0x58,0x1a,
995c2c66affSColin Finck 0x7f,0x92,0x36,0xe6,0x51,0x92,0x0e,0xf3,0x26,0x7d,0x1c,0x4d,0x17,0xbc,0xc9,0xec,
996c2c66affSColin Finck 0x43,0x26,0xd0,0xbf,0x41,0x5f,0x40,0xa9,0x44,0x44,0xf4,0x99,0xe7,0x57,0x87,0x9e,
997c2c66affSColin Finck 0x50,0x1f,0x57,0x54,0xa8,0x3e,0xfd,0x74,0x63,0x2f,0xb1,0x50,0x65,0x09,0xe6,0x58,
998c2c66affSColin Finck 0x42,0x2e,0x43,0x1a,0x4c,0xb4,0xf0,0x25,0x47,0x59,0xfa,0x04,0x1e,0x93,0xd4,0x26,
999c2c66affSColin Finck 0x46,0x4a,0x50,0x81,0xb2,0xde,0xbe,0x78,0xb7,0xfc,0x67,0x15,0xe1,0xc9,0x57,0x84,
1000c2c66affSColin Finck 0x1e,0x0f,0x63,0xd6,0xe9,0x62,0xba,0xd6,0x5f,0x55,0x2e,0xea,0x5c,0xc6,0x28,0x08,
1001c2c66affSColin Finck 0x04,0x25,0x39,0xb8,0x0e,0x2b,0xa9,0xf2,0x4c,0x97,0x1c,0x07,0x3f,0x0d,0x52,0xf5,
1002c2c66affSColin Finck 0xed,0xef,0x2f,0x82,0x0f,0x02,0x03,0x01,0x00,0x01,0xa3,0x42,0x30,0x40,0x30,0x1d,
1003c2c66affSColin Finck 0x06,0x03,0x55,0x1d,0x0e,0x04,0x16,0x04,0x14,0x53,0x79,0xbf,0x5a,0xaa,0x2b,0x4a,
1004c2c66affSColin Finck 0xcf,0x54,0x80,0xe1,0xd8,0x9b,0xc0,0x9d,0xf2,0xb2,0x03,0x66,0xcb,0x30,0x0e,0x06,
1005c2c66affSColin Finck 0x03,0x55,0x1d,0x0f,0x01,0x01,0xff,0x04,0x04,0x03,0x02,0x01,0x06,0x30,0x0f,0x06,
1006c2c66affSColin Finck 0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x0d,
1007c2c66affSColin Finck 0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x0c,0x05,0x00,0x03,0x82,0x02,
1008c2c66affSColin Finck 0x01,0x00,0x5c,0xd4,0x7c,0x0d,0xcf,0xf7,0x01,0x7d,0x41,0x99,0x65,0x0c,0x73,0xc5,
1009c2c66affSColin Finck 0x52,0x9f,0xcb,0xf8,0xcf,0x99,0x06,0x7f,0x1b,0xda,0x43,0x15,0x9f,0x9e,0x02,0x55,
1010c2c66affSColin Finck 0x57,0x96,0x14,0xf1,0x52,0x3c,0x27,0x87,0x94,0x28,0xed,0x1f,0x3a,0x01,0x37,0xa2,
1011c2c66affSColin Finck 0x76,0xfc,0x53,0x50,0xc0,0x84,0x9b,0xc6,0x6b,0x4e,0xba,0x8c,0x21,0x4f,0xa2,0x8e,
1012c2c66affSColin Finck 0x55,0x62,0x91,0xf3,0x69,0x15,0xd8,0xbc,0x88,0xe3,0xc4,0xaa,0x0b,0xfd,0xef,0xa8,
1013c2c66affSColin Finck 0xe9,0x4b,0x55,0x2a,0x06,0x20,0x6d,0x55,0x78,0x29,0x19,0xee,0x5f,0x30,0x5c,0x4b,
1014c2c66affSColin Finck 0x24,0x11,0x55,0xff,0x24,0x9a,0x6e,0x5e,0x2a,0x2b,0xee,0x0b,0x4d,0x9f,0x7f,0xf7,
1015c2c66affSColin Finck 0x01,0x38,0x94,0x14,0x95,0x43,0x07,0x09,0xfb,0x60,0xa9,0xee,0x1c,0xab,0x12,0x8c,
1016c2c66affSColin Finck 0xa0,0x9a,0x5e,0xa7,0x98,0x6a,0x59,0x6d,0x8b,0x3f,0x08,0xfb,0xc8,0xd1,0x45,0xaf,
1017c2c66affSColin Finck 0x18,0x15,0x64,0x90,0x12,0x0f,0x73,0x28,0x2e,0xc5,0xe2,0x24,0x4e,0xfc,0x58,0xec,
1018c2c66affSColin Finck 0xf0,0xf4,0x45,0xfe,0x22,0xb3,0xeb,0x2f,0x8e,0xd2,0xd9,0x45,0x61,0x05,0xc1,0x97,
1019c2c66affSColin Finck 0x6f,0xa8,0x76,0x72,0x8f,0x8b,0x8c,0x36,0xaf,0xbf,0x0d,0x05,0xce,0x71,0x8d,0xe6,
1020c2c66affSColin Finck 0xa6,0x6f,0x1f,0x6c,0xa6,0x71,0x62,0xc5,0xd8,0xd0,0x83,0x72,0x0c,0xf1,0x67,0x11,
1021c2c66affSColin Finck 0x89,0x0c,0x9c,0x13,0x4c,0x72,0x34,0xdf,0xbc,0xd5,0x71,0xdf,0xaa,0x71,0xdd,0xe1,
1022c2c66affSColin Finck 0xb9,0x6c,0x8c,0x3c,0x12,0x5d,0x65,0xda,0xbd,0x57,0x12,0xb6,0x43,0x6b,0xff,0xe5,
1023c2c66affSColin Finck 0xde,0x4d,0x66,0x11,0x51,0xcf,0x99,0xae,0xec,0x17,0xb6,0xe8,0x71,0x91,0x8c,0xde,
1024c2c66affSColin Finck 0x49,0xfe,0xdd,0x35,0x71,0xa2,0x15,0x27,0x94,0x1c,0xcf,0x61,0xe3,0x26,0xbb,0x6f,
1025c2c66affSColin Finck 0xa3,0x67,0x25,0x21,0x5d,0xe6,0xdd,0x1d,0x0b,0x2e,0x68,0x1b,0x3b,0x82,0xaf,0xec,
1026c2c66affSColin Finck 0x83,0x67,0x85,0xd4,0x98,0x51,0x74,0xb1,0xb9,0x99,0x80,0x89,0xff,0x7f,0x78,0x19,
1027c2c66affSColin Finck 0x5c,0x79,0x4a,0x60,0x2e,0x92,0x40,0xae,0x4c,0x37,0x2a,0x2c,0xc9,0xc7,0x62,0xc8,
1028c2c66affSColin Finck 0x0e,0x5d,0xf7,0x36,0x5b,0xca,0xe0,0x25,0x25,0x01,0xb4,0xdd,0x1a,0x07,0x9c,0x77,
1029c2c66affSColin Finck 0x00,0x3f,0xd0,0xdc,0xd5,0xec,0x3d,0xd4,0xfa,0xbb,0x3f,0xcc,0x85,0xd6,0x6f,0x7f,
1030c2c66affSColin Finck 0xa9,0x2d,0xdf,0xb9,0x02,0xf7,0xf5,0x97,0x9a,0xb5,0x35,0xda,0xc3,0x67,0xb0,0x87,
1031c2c66affSColin Finck 0x4a,0xa9,0x28,0x9e,0x23,0x8e,0xff,0x5c,0x27,0x6b,0xe1,0xb0,0x4f,0xf3,0x07,0xee,
1032c2c66affSColin Finck 0x00,0x2e,0xd4,0x59,0x87,0xcb,0x52,0x41,0x95,0xea,0xf4,0x47,0xd7,0xee,0x64,0x41,
1033c2c66affSColin Finck 0x55,0x7c,0x8d,0x59,0x02,0x95,0xdd,0x62,0x9d,0xc2,0xb9,0xee,0x5a,0x28,0x74,0x84,
1034c2c66affSColin Finck 0xa5,0x9b,0xb7,0x90,0xc7,0x0c,0x07,0xdf,0xf5,0x89,0x36,0x74,0x32,0xd6,0x28,0xc1,
1035c2c66affSColin Finck 0xb0,0xb0,0x0b,0xe0,0x9c,0x4c,0xc3,0x1c,0xd6,0xfc,0xe3,0x69,0xb5,0x47,0x46,0x81,
1036c2c66affSColin Finck 0x2f,0xa2,0x82,0xab,0xd3,0x63,0x44,0x70,0xc4,0x8d,0xff,0x2d,0x33,0xba,0xad,0x8f,
1037c2c66affSColin Finck 0x7b,0xb5,0x70,0x88,0xae,0x3e,0x19,0xcf,0x40,0x28,0xd8,0xfc,0xc8,0x90,0xbb,0x5d,
1038c2c66affSColin Finck 0x99,0x22,0xf5,0x52,0xe6,0x58,0xc5,0x1f,0x88,0x31,0x43,0xee,0x88,0x1d,0xd7,0xc6,
1039c2c66affSColin Finck 0x8e,0x3c,0x43,0x6a,0x1d,0xa7,0x18,0xde,0x7d,0x3d,0x16,0xf1,0x62,0xf9,0xca,0x90,
1040c2c66affSColin Finck 0xa8,0xfd
1041c2c66affSColin Finck };
1042c2c66affSColin Finck static const BYTE incommon_rsa_ca[] = {
1043c2c66affSColin Finck 0x30,0x82,0x05,0xf9,0x30,0x82,0x03,0xe1,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,0x47,
1044c2c66affSColin Finck 0x20,0xd0,0xfa,0x85,0x46,0x1a,0x7e,0x17,0xa1,0x64,0x02,0x91,0x84,0x63,0x74,0x30,
1045c2c66affSColin Finck 0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x0c,0x05,0x00,0x30,0x81,
1046c2c66affSColin Finck 0x88,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x13,
1047c2c66affSColin Finck 0x30,0x11,0x06,0x03,0x55,0x04,0x08,0x13,0x0a,0x4e,0x65,0x77,0x20,0x4a,0x65,0x72,
1048c2c66affSColin Finck 0x73,0x65,0x79,0x31,0x14,0x30,0x12,0x06,0x03,0x55,0x04,0x07,0x13,0x0b,0x4a,0x65,
1049c2c66affSColin Finck 0x72,0x73,0x65,0x79,0x20,0x43,0x69,0x74,0x79,0x31,0x1e,0x30,0x1c,0x06,0x03,0x55,
1050c2c66affSColin Finck 0x04,0x0a,0x13,0x15,0x54,0x68,0x65,0x20,0x55,0x53,0x45,0x52,0x54,0x52,0x55,0x53,
1051c2c66affSColin Finck 0x54,0x20,0x4e,0x65,0x74,0x77,0x6f,0x72,0x6b,0x31,0x2e,0x30,0x2c,0x06,0x03,0x55,
1052c2c66affSColin Finck 0x04,0x03,0x13,0x25,0x55,0x53,0x45,0x52,0x54,0x72,0x75,0x73,0x74,0x20,0x52,0x53,
1053c2c66affSColin Finck 0x41,0x20,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6f,0x6e,0x20,
1054c2c66affSColin Finck 0x41,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x30,0x1e,0x17,0x0d,0x31,0x34,0x31,
1055c2c66affSColin Finck 0x30,0x30,0x36,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x32,0x34,0x31,0x30,
1056c2c66affSColin Finck 0x30,0x35,0x32,0x33,0x35,0x39,0x35,0x39,0x5a,0x30,0x76,0x31,0x0b,0x30,0x09,0x06,
1057c2c66affSColin Finck 0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,
1058c2c66affSColin Finck 0x08,0x13,0x02,0x4d,0x49,0x31,0x12,0x30,0x10,0x06,0x03,0x55,0x04,0x07,0x13,0x09,
1059c2c66affSColin Finck 0x41,0x6e,0x6e,0x20,0x41,0x72,0x62,0x6f,0x72,0x31,0x12,0x30,0x10,0x06,0x03,0x55,
1060c2c66affSColin Finck 0x04,0x0a,0x13,0x09,0x49,0x6e,0x74,0x65,0x72,0x6e,0x65,0x74,0x32,0x31,0x11,0x30,
1061c2c66affSColin Finck 0x0f,0x06,0x03,0x55,0x04,0x0b,0x13,0x08,0x49,0x6e,0x43,0x6f,0x6d,0x6d,0x6f,0x6e,
1062c2c66affSColin Finck 0x31,0x1f,0x30,0x1d,0x06,0x03,0x55,0x04,0x03,0x13,0x16,0x49,0x6e,0x43,0x6f,0x6d,
1063c2c66affSColin Finck 0x6d,0x6f,0x6e,0x20,0x52,0x53,0x41,0x20,0x53,0x65,0x72,0x76,0x65,0x72,0x20,0x43,
1064c2c66affSColin Finck 0x41,0x30,0x82,0x01,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,
1065c2c66affSColin Finck 0x01,0x01,0x05,0x00,0x03,0x82,0x01,0x0f,0x00,0x30,0x82,0x01,0x0a,0x02,0x82,0x01,
1066c2c66affSColin Finck 0x01,0x00,0x9c,0x1b,0xf1,0xbb,0x2f,0x7f,0x63,0x18,0x15,0x51,0x51,0x54,0x0f,0x9e,
1067c2c66affSColin Finck 0xc5,0x4e,0x4d,0x10,0x58,0xfa,0x30,0x9b,0x17,0x29,0x90,0xe6,0x33,0x0c,0xac,0x13,
1068c2c66affSColin Finck 0x53,0x7c,0x54,0x91,0xb4,0xea,0xd8,0x6e,0x9b,0x89,0x6d,0xbb,0x33,0x3e,0x8f,0xd2,
1069c2c66affSColin Finck 0x0d,0xa6,0xe9,0xf9,0xba,0xe9,0x0d,0x0c,0x1a,0x9e,0xb2,0x8e,0xc9,0x70,0x2e,0xef,
1070c2c66affSColin Finck 0x1e,0x05,0x7d,0x95,0xeb,0x2d,0x8d,0xa2,0xa9,0x4d,0xb3,0x9c,0xe7,0xf3,0x19,0x36,
1071c2c66affSColin Finck 0xbb,0xa7,0xf1,0x7c,0xe6,0x08,0x1e,0x61,0x27,0x44,0x7a,0x96,0xf4,0xa8,0x34,0xdb,
1072c2c66affSColin Finck 0xe2,0x42,0xc8,0xa5,0xdb,0x37,0xd5,0xb5,0xe7,0xe4,0x42,0x72,0x3f,0xb4,0x13,0xcf,
1073c2c66affSColin Finck 0x8b,0x07,0x24,0x45,0x1e,0x8c,0x91,0x83,0x46,0xb9,0x09,0xa6,0xfc,0x18,0xa3,0x06,
1074c2c66affSColin Finck 0x02,0xec,0x34,0x8d,0x32,0x66,0x95,0x27,0xea,0xe1,0x97,0xe8,0xdb,0x35,0xa3,0x2b,
1075c2c66affSColin Finck 0x56,0xeb,0x57,0xe8,0xf0,0x10,0x59,0xdf,0x6d,0x70,0x0c,0x66,0x6a,0xd0,0x64,0xe5,
1076c2c66affSColin Finck 0xa8,0xa3,0x98,0x31,0xad,0x1d,0x62,0xd5,0xfa,0x92,0xe3,0x9a,0x43,0xcd,0x2d,0x35,
1077c2c66affSColin Finck 0xfb,0xd9,0x9e,0x33,0x5b,0x45,0x7d,0xc4,0x86,0x28,0x2c,0x66,0x12,0xc8,0xdb,0x0f,
1078c2c66affSColin Finck 0x19,0x30,0x0d,0x3f,0xe9,0xf0,0xea,0x4a,0x5e,0x40,0x07,0xc7,0xf6,0x20,0x7a,0x53,
1079c2c66affSColin Finck 0x78,0x81,0x64,0x7a,0x7e,0x45,0x6a,0x16,0x6f,0xf4,0x93,0x58,0xc9,0x62,0xfb,0x29,
1080c2c66affSColin Finck 0x27,0x7d,0xa1,0x7f,0x21,0xce,0xe7,0x4f,0x47,0xd6,0x8a,0x56,0xe0,0xe3,0x66,0xf8,
1081c2c66affSColin Finck 0xec,0xdd,0x89,0xdc,0x26,0x8c,0x19,0x68,0x3b,0x8d,0x8b,0xe2,0xfb,0x47,0x23,0x0b,
1082c2c66affSColin Finck 0x7f,0x37,0x02,0x03,0x01,0x00,0x01,0xa3,0x82,0x01,0x6e,0x30,0x82,0x01,0x6a,0x30,
1083c2c66affSColin Finck 0x1f,0x06,0x03,0x55,0x1d,0x23,0x04,0x18,0x30,0x16,0x80,0x14,0x53,0x79,0xbf,0x5a,
1084c2c66affSColin Finck 0xaa,0x2b,0x4a,0xcf,0x54,0x80,0xe1,0xd8,0x9b,0xc0,0x9d,0xf2,0xb2,0x03,0x66,0xcb,
1085c2c66affSColin Finck 0x30,0x1d,0x06,0x03,0x55,0x1d,0x0e,0x04,0x16,0x04,0x14,0x1e,0x05,0xa3,0x77,0x8f,
1086c2c66affSColin Finck 0x6c,0x96,0xe2,0x5b,0x87,0x4b,0xa6,0xb4,0x86,0xac,0x71,0x00,0x0c,0xe7,0x38,0x30,
1087c2c66affSColin Finck 0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,0xff,0x04,0x04,0x03,0x02,0x01,0x86,0x30,
1088c2c66affSColin Finck 0x12,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x08,0x30,0x06,0x01,0x01,0xff,
1089c2c66affSColin Finck 0x02,0x01,0x00,0x30,0x1d,0x06,0x03,0x55,0x1d,0x25,0x04,0x16,0x30,0x14,0x06,0x08,
1090c2c66affSColin Finck 0x2b,0x06,0x01,0x05,0x05,0x07,0x03,0x01,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,
1091c2c66affSColin Finck 0x03,0x02,0x30,0x1b,0x06,0x03,0x55,0x1d,0x20,0x04,0x14,0x30,0x12,0x30,0x06,0x06,
1092c2c66affSColin Finck 0x04,0x55,0x1d,0x20,0x00,0x30,0x08,0x06,0x06,0x67,0x81,0x0c,0x01,0x02,0x02,0x30,
1093c2c66affSColin Finck 0x50,0x06,0x03,0x55,0x1d,0x1f,0x04,0x49,0x30,0x47,0x30,0x45,0xa0,0x43,0xa0,0x41,
1094c2c66affSColin Finck 0x86,0x3f,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x63,0x72,0x6c,0x2e,0x75,0x73,0x65,
1095c2c66affSColin Finck 0x72,0x74,0x72,0x75,0x73,0x74,0x2e,0x63,0x6f,0x6d,0x2f,0x55,0x53,0x45,0x52,0x54,
1096c2c66affSColin Finck 0x72,0x75,0x73,0x74,0x52,0x53,0x41,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,
1097c2c66affSColin Finck 0x74,0x69,0x6f,0x6e,0x41,0x75,0x74,0x68,0x6f,0x72,0x69,0x74,0x79,0x2e,0x63,0x72,
1098c2c66affSColin Finck 0x6c,0x30,0x76,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x01,0x01,0x04,0x6a,0x30,
1099c2c66affSColin Finck 0x68,0x30,0x3f,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x30,0x02,0x86,0x33,0x68,
1100c2c66affSColin Finck 0x74,0x74,0x70,0x3a,0x2f,0x2f,0x63,0x72,0x74,0x2e,0x75,0x73,0x65,0x72,0x74,0x72,
1101c2c66affSColin Finck 0x75,0x73,0x74,0x2e,0x63,0x6f,0x6d,0x2f,0x55,0x53,0x45,0x52,0x54,0x72,0x75,0x73,
1102c2c66affSColin Finck 0x74,0x52,0x53,0x41,0x41,0x64,0x64,0x54,0x72,0x75,0x73,0x74,0x43,0x41,0x2e,0x63,
1103c2c66affSColin Finck 0x72,0x74,0x30,0x25,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x86,0x19,
1104c2c66affSColin Finck 0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6f,0x63,0x73,0x70,0x2e,0x75,0x73,0x65,0x72,
1105c2c66affSColin Finck 0x74,0x72,0x75,0x73,0x74,0x2e,0x63,0x6f,0x6d,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,
1106c2c66affSColin Finck 0x86,0xf7,0x0d,0x01,0x01,0x0c,0x05,0x00,0x03,0x82,0x02,0x01,0x00,0x2d,0x11,0x06,
1107c2c66affSColin Finck 0x38,0xd6,0xdb,0xd7,0x58,0x68,0xaf,0xaa,0x38,0x67,0x17,0x8d,0xe2,0x13,0xd7,0xa3,
1108c2c66affSColin Finck 0x14,0x24,0xd9,0x06,0x13,0xeb,0xeb,0x91,0x2f,0xdf,0x4f,0x67,0x2d,0xc8,0xd3,0x14,
1109c2c66affSColin Finck 0xd7,0x56,0x65,0x52,0x9e,0x6e,0x1f,0x98,0x08,0x8e,0x9a,0x48,0x1b,0xc1,0x8b,0x59,
1110c2c66affSColin Finck 0x9a,0xa3,0x57,0x9b,0xdb,0x86,0xf8,0x59,0x40,0xfc,0x19,0xb0,0x75,0x11,0x2a,0xc2,
1111c2c66affSColin Finck 0x12,0x36,0xba,0x8e,0x72,0x8a,0x06,0x4e,0x27,0xb7,0x8d,0x58,0x14,0xd1,0x6f,0xb4,
1112c2c66affSColin Finck 0xf9,0x68,0xfc,0x98,0xdd,0xa4,0x9c,0x25,0x40,0x36,0xde,0xbd,0x17,0x66,0x2b,0x03,
1113c2c66affSColin Finck 0x7f,0x78,0x81,0xb1,0x80,0x74,0x9e,0x5f,0x3a,0xb4,0x26,0x2f,0x6a,0x48,0x84,0x36,
1114c2c66affSColin Finck 0x34,0x8e,0xa7,0x28,0xef,0x87,0xf3,0x61,0xe7,0xdb,0x67,0xf5,0x52,0xdb,0xd7,0xd1,
1115c2c66affSColin Finck 0xe6,0x30,0x71,0xbb,0x8b,0xa3,0xd4,0xff,0xb9,0x64,0x89,0x9e,0x9b,0x81,0x9b,0x8f,
1116c2c66affSColin Finck 0x57,0xb8,0x64,0x4c,0xd5,0x06,0x19,0x8e,0xe7,0x91,0x85,0x7c,0x18,0xd1,0x89,0xd8,
1117c2c66affSColin Finck 0xf6,0xea,0x1d,0x68,0x14,0x11,0xd9,0xee,0x17,0x83,0x1f,0x50,0x63,0xcf,0x0e,0xf6,
1118c2c66affSColin Finck 0x86,0x2a,0x6e,0xe3,0xb1,0xa4,0xc9,0xfa,0xf6,0x34,0x4c,0x77,0x2a,0x80,0x86,0x30,
1119c2c66affSColin Finck 0xb0,0xa3,0xdc,0x1b,0x71,0xec,0x04,0xa7,0xe4,0x98,0xbc,0x16,0x85,0x3e,0x84,0x26,
1120c2c66affSColin Finck 0xb3,0xc0,0xe5,0x35,0x55,0x7e,0x79,0x98,0xa3,0xd4,0xd4,0x8d,0xb6,0xe7,0x42,0xe8,
1121c2c66affSColin Finck 0x44,0x20,0x12,0x37,0x5f,0x09,0xc9,0xfb,0x03,0xe4,0xf5,0x65,0x74,0x96,0xed,0xca,
1122c2c66affSColin Finck 0xb9,0xb3,0xf6,0x09,0xff,0x4c,0xa6,0xd1,0x5d,0x3a,0xfc,0xd1,0x4d,0xaa,0xe4,0x98,
1123c2c66affSColin Finck 0x72,0xbe,0x38,0x4b,0x7f,0x89,0x4e,0x26,0x8f,0xd4,0xcc,0xbe,0x56,0x09,0x71,0x03,
1124c2c66affSColin Finck 0x4a,0x6c,0xa3,0xe2,0x35,0x86,0xdd,0x1e,0xd9,0xf1,0x31,0x03,0xf7,0x13,0x4d,0x0b,
1125c2c66affSColin Finck 0x11,0x81,0x31,0x79,0xcc,0x7a,0xd7,0xbe,0xdc,0xfb,0xf3,0x76,0x1b,0x2c,0xbd,0xb3,
1126c2c66affSColin Finck 0x91,0x0f,0x00,0x59,0x07,0x2a,0x20,0x43,0xdc,0x4b,0xd8,0xb5,0x19,0x14,0x8f,0xe2,
1127c2c66affSColin Finck 0x7a,0x84,0x29,0xd1,0x43,0x3f,0x2f,0xcc,0xdf,0x3f,0x9d,0xbb,0xbd,0x68,0xc4,0xce,
1128c2c66affSColin Finck 0xe0,0xcd,0xe7,0x1c,0x31,0x32,0x78,0x62,0xfa,0xf0,0x93,0xa2,0x1e,0xc9,0xd7,0x9f,
1129c2c66affSColin Finck 0x68,0xe5,0xa8,0x76,0xf6,0x63,0xfe,0x68,0x99,0xef,0xba,0x36,0xd7,0x12,0x71,0x9a,
1130c2c66affSColin Finck 0x9e,0xb3,0x71,0x1f,0x3b,0xbe,0x00,0x63,0x9e,0x3d,0x5f,0x21,0xc2,0xb1,0x86,0x1b,
1131c2c66affSColin Finck 0xb8,0x4e,0x21,0xc3,0xc3,0x43,0x09,0x2e,0x63,0x0c,0xcd,0xff,0x14,0xf6,0xf6,0x22,
1132c2c66affSColin Finck 0xe9,0xfd,0xca,0x9f,0xf5,0x98,0x44,0xb6,0x41,0x9c,0x41,0xc2,0x08,0x98,0x7d,0xdb,
1133c2c66affSColin Finck 0xa0,0x9f,0x22,0x7e,0xc0,0xa7,0x49,0xbb,0xb4,0x18,0x1f,0x4b,0xd3,0xa6,0x2a,0x87,
1134c2c66affSColin Finck 0xb9,0x5c,0xca,0xf2,0x83,0x4c,0x40,0x03,0xb2,0x52,0x1a,0x79,0x21,0x08,0x37,0x18,
1135c2c66affSColin Finck 0x4e,0xd9,0x8d,0x5f,0x99,0xc6,0x05,0x5f,0xf1,0x6a,0xae,0xba,0x75,0x5a,0x78,0x47,
1136c2c66affSColin Finck 0x3a,0x3a,0x65,0x5e,0xe5,0xc4,0xd0,0xe3,0xda,0xd2,0xeb,0x5a,0x28,0x2d,0xb9,0x02,
1137c2c66affSColin Finck 0x99,0x60,0xa2,0x6f,0x3c,0x2f,0x66,0x7c,0x98,0x45,0x9c,0xc9,0xfa,0x01,0xef,0x32,
1138c2c66affSColin Finck 0x8e,0x7c,0x3e,0xf9,0xf4,0x03,0x7b,0x24,0xa6,0x56,0x09,0x8c,0x24
1139c2c66affSColin Finck };
1140c2c66affSColin Finck static const BYTE cs_stanford_edu[] = {
1141c2c66affSColin Finck 0x30,0x82,0x05,0xa5,0x30,0x82,0x04,0x8d,0xa0,0x03,0x02,0x01,0x02,0x02,0x11,0x00,
1142c2c66affSColin Finck 0xf1,0x06,0x35,0xc6,0xee,0x01,0x95,0x98,0x11,0xab,0x60,0x00,0x75,0x72,0x30,0xb3,
1143c2c66affSColin Finck 0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x0b,0x05,0x00,0x30,
1144c2c66affSColin Finck 0x76,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x0b,
1145c2c66affSColin Finck 0x30,0x09,0x06,0x03,0x55,0x04,0x08,0x13,0x02,0x4d,0x49,0x31,0x12,0x30,0x10,0x06,
1146c2c66affSColin Finck 0x03,0x55,0x04,0x07,0x13,0x09,0x41,0x6e,0x6e,0x20,0x41,0x72,0x62,0x6f,0x72,0x31,
1147c2c66affSColin Finck 0x12,0x30,0x10,0x06,0x03,0x55,0x04,0x0a,0x13,0x09,0x49,0x6e,0x74,0x65,0x72,0x6e,
1148c2c66affSColin Finck 0x65,0x74,0x32,0x31,0x11,0x30,0x0f,0x06,0x03,0x55,0x04,0x0b,0x13,0x08,0x49,0x6e,
1149c2c66affSColin Finck 0x43,0x6f,0x6d,0x6d,0x6f,0x6e,0x31,0x1f,0x30,0x1d,0x06,0x03,0x55,0x04,0x03,0x13,
1150c2c66affSColin Finck 0x16,0x49,0x6e,0x43,0x6f,0x6d,0x6d,0x6f,0x6e,0x20,0x52,0x53,0x41,0x20,0x53,0x65,
1151c2c66affSColin Finck 0x72,0x76,0x65,0x72,0x20,0x43,0x41,0x30,0x1e,0x17,0x0d,0x31,0x36,0x31,0x30,0x32,
1152c2c66affSColin Finck 0x31,0x30,0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x31,0x39,0x31,0x30,0x32,0x31,
1153c2c66affSColin Finck 0x32,0x33,0x35,0x39,0x35,0x39,0x5a,0x30,0x81,0xb4,0x31,0x0b,0x30,0x09,0x06,0x03,
1154c2c66affSColin Finck 0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x11,
1155c2c66affSColin Finck 0x13,0x05,0x39,0x34,0x33,0x30,0x35,0x31,0x0b,0x30,0x09,0x06,0x03,0x55,0x04,0x08,
1156c2c66affSColin Finck 0x13,0x02,0x43,0x41,0x31,0x11,0x30,0x0f,0x06,0x03,0x55,0x04,0x07,0x13,0x08,0x53,
1157c2c66affSColin Finck 0x74,0x61,0x6e,0x66,0x6f,0x72,0x64,0x31,0x17,0x30,0x15,0x06,0x03,0x55,0x04,0x09,
1158c2c66affSColin Finck 0x13,0x0e,0x34,0x35,0x30,0x20,0x53,0x65,0x72,0x72,0x61,0x20,0x4d,0x61,0x6c,0x6c,
1159c2c66affSColin Finck 0x31,0x1c,0x30,0x1a,0x06,0x03,0x55,0x04,0x0a,0x13,0x13,0x53,0x74,0x61,0x6e,0x66,
1160c2c66affSColin Finck 0x6f,0x72,0x64,0x20,0x55,0x6e,0x69,0x76,0x65,0x72,0x73,0x69,0x74,0x79,0x31,0x24,
1161c2c66affSColin Finck 0x30,0x22,0x06,0x03,0x55,0x04,0x0b,0x13,0x1b,0x43,0x6f,0x6d,0x70,0x75,0x74,0x65,
1162c2c66affSColin Finck 0x72,0x20,0x53,0x63,0x69,0x65,0x6e,0x63,0x65,0x20,0x44,0x65,0x70,0x61,0x72,0x74,
1163c2c66affSColin Finck 0x6d,0x65,0x6e,0x74,0x31,0x18,0x30,0x16,0x06,0x03,0x55,0x04,0x03,0x13,0x0f,0x63,
1164c2c66affSColin Finck 0x73,0x2e,0x73,0x74,0x61,0x6e,0x66,0x6f,0x72,0x64,0x2e,0x65,0x64,0x75,0x30,0x82,
1165c2c66affSColin Finck 0x01,0x22,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,
1166c2c66affSColin Finck 0x00,0x03,0x82,0x01,0x0f,0x00,0x30,0x82,0x01,0x0a,0x02,0x82,0x01,0x01,0x00,0xb5,
1167c2c66affSColin Finck 0x8c,0x69,0x22,0xf1,0xd4,0x39,0x0a,0x45,0x7b,0x5f,0x1e,0x15,0x00,0xae,0x9a,0x0f,
1168c2c66affSColin Finck 0x79,0x5c,0x08,0xea,0x52,0x0e,0x74,0x6d,0xcf,0x0b,0x1a,0x92,0x88,0x57,0xe4,0x8c,
1169c2c66affSColin Finck 0x9e,0xbc,0xc6,0xd9,0x29,0x8f,0xe1,0x5f,0x52,0x11,0x59,0xf8,0x12,0x78,0xfa,0xdf,
1170c2c66affSColin Finck 0xac,0xe6,0xdf,0xfb,0x3f,0x10,0xf3,0x93,0x23,0xdd,0xea,0x6c,0x0b,0xf6,0xda,0x99,
1171c2c66affSColin Finck 0xbc,0x15,0x51,0xf9,0x8d,0x03,0x9e,0x79,0x28,0xf9,0x44,0x5d,0x06,0xac,0x95,0x61,
1172c2c66affSColin Finck 0xc6,0x81,0xe4,0x6e,0x49,0x1a,0x8f,0xe9,0xea,0x1c,0x7d,0x05,0x53,0x20,0xfc,0xea,
1173c2c66affSColin Finck 0x14,0xc4,0x2f,0x11,0x57,0x86,0x3a,0x53,0xc1,0x17,0x6b,0xb1,0xe6,0x77,0x4c,0x21,
1174c2c66affSColin Finck 0x0d,0xe0,0x68,0x6c,0xac,0xc9,0xcb,0xe9,0xc2,0x5a,0x91,0xcb,0x51,0x1a,0xb8,0x53,
1175c2c66affSColin Finck 0x13,0x75,0x13,0xef,0xfd,0x50,0x0b,0xd7,0x84,0xb0,0xb8,0x29,0x2c,0x64,0x00,0xd9,
1176c2c66affSColin Finck 0x11,0xe5,0xef,0x9d,0x9d,0xb3,0xae,0x5f,0xa2,0x78,0x24,0x18,0xc3,0x68,0x13,0x86,
1177c2c66affSColin Finck 0x0d,0x86,0xf8,0x2d,0xfe,0x47,0xba,0xae,0xe8,0xc2,0x6c,0xf3,0x80,0xc9,0x96,0x33,
1178c2c66affSColin Finck 0xc2,0x08,0xa3,0x01,0xc9,0x70,0x04,0x25,0x2a,0x32,0x0e,0xd5,0x84,0xe3,0x91,0x57,
1179c2c66affSColin Finck 0xb3,0x9c,0xbf,0x9f,0x37,0x71,0xbb,0x0a,0x21,0x22,0x09,0x01,0xfc,0x10,0x75,0x14,
1180c2c66affSColin Finck 0x0c,0x53,0x3f,0xbe,0x6d,0x1f,0x96,0x4d,0xb5,0x3c,0xcd,0x2f,0xd9,0x9d,0xe7,0xb8,
1181c2c66affSColin Finck 0x52,0x8b,0xac,0x24,0x8a,0x95,0xf4,0xd3,0x44,0xc3,0xe0,0x9f,0x85,0x86,0x3f,0x2e,
1182c2c66affSColin Finck 0xf0,0xbe,0x73,0x8e,0x82,0x01,0x46,0x59,0x8d,0xd7,0x90,0x64,0x4a,0x2d,0x4d,0x02,
1183c2c66affSColin Finck 0x03,0x01,0x00,0x01,0xa3,0x82,0x01,0xed,0x30,0x82,0x01,0xe9,0x30,0x1f,0x06,0x03,
1184c2c66affSColin Finck 0x55,0x1d,0x23,0x04,0x18,0x30,0x16,0x80,0x14,0x1e,0x05,0xa3,0x77,0x8f,0x6c,0x96,
1185c2c66affSColin Finck 0xe2,0x5b,0x87,0x4b,0xa6,0xb4,0x86,0xac,0x71,0x00,0x0c,0xe7,0x38,0x30,0x1d,0x06,
1186c2c66affSColin Finck 0x03,0x55,0x1d,0x0e,0x04,0x16,0x04,0x14,0x48,0xf2,0x68,0xbb,0xd9,0xab,0xe3,0x04,
1187c2c66affSColin Finck 0xba,0x2f,0x9d,0x7d,0x94,0xca,0xcf,0x77,0xd7,0xb1,0x0b,0x23,0x30,0x0e,0x06,0x03,
1188c2c66affSColin Finck 0x55,0x1d,0x0f,0x01,0x01,0xff,0x04,0x04,0x03,0x02,0x05,0xa0,0x30,0x0c,0x06,0x03,
1189c2c66affSColin Finck 0x55,0x1d,0x13,0x01,0x01,0xff,0x04,0x02,0x30,0x00,0x30,0x1d,0x06,0x03,0x55,0x1d,
1190c2c66affSColin Finck 0x25,0x04,0x16,0x30,0x14,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x03,0x01,0x06,
1191c2c66affSColin Finck 0x08,0x2b,0x06,0x01,0x05,0x05,0x07,0x03,0x02,0x30,0x67,0x06,0x03,0x55,0x1d,0x20,
1192c2c66affSColin Finck 0x04,0x60,0x30,0x5e,0x30,0x52,0x06,0x0c,0x2b,0x06,0x01,0x04,0x01,0xae,0x23,0x01,
1193c2c66affSColin Finck 0x04,0x03,0x01,0x01,0x30,0x42,0x30,0x40,0x06,0x08,0x2b,0x06,0x01,0x05,0x05,0x07,
1194c2c66affSColin Finck 0x02,0x01,0x16,0x34,0x68,0x74,0x74,0x70,0x73,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,
1195c2c66affSColin Finck 0x69,0x6e,0x63,0x6f,0x6d,0x6d,0x6f,0x6e,0x2e,0x6f,0x72,0x67,0x2f,0x63,0x65,0x72,
1196c2c66affSColin Finck 0x74,0x2f,0x72,0x65,0x70,0x6f,0x73,0x69,0x74,0x6f,0x72,0x79,0x2f,0x63,0x70,0x73,
1197c2c66affSColin Finck 0x5f,0x73,0x73,0x6c,0x2e,0x70,0x64,0x66,0x30,0x08,0x06,0x06,0x67,0x81,0x0c,0x01,
1198c2c66affSColin Finck 0x02,0x02,0x30,0x44,0x06,0x03,0x55,0x1d,0x1f,0x04,0x3d,0x30,0x3b,0x30,0x39,0xa0,
1199c2c66affSColin Finck 0x37,0xa0,0x35,0x86,0x33,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x63,0x72,0x6c,0x2e,
1200c2c66affSColin Finck 0x69,0x6e,0x63,0x6f,0x6d,0x6d,0x6f,0x6e,0x2d,0x72,0x73,0x61,0x2e,0x6f,0x72,0x67,
1201c2c66affSColin Finck 0x2f,0x49,0x6e,0x43,0x6f,0x6d,0x6d,0x6f,0x6e,0x52,0x53,0x41,0x53,0x65,0x72,0x76,
1202c2c66affSColin Finck 0x65,0x72,0x43,0x41,0x2e,0x63,0x72,0x6c,0x30,0x75,0x06,0x08,0x2b,0x06,0x01,0x05,
1203c2c66affSColin Finck 0x05,0x07,0x01,0x01,0x04,0x69,0x30,0x67,0x30,0x3e,0x06,0x08,0x2b,0x06,0x01,0x05,
1204c2c66affSColin Finck 0x05,0x07,0x30,0x02,0x86,0x32,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x63,0x72,0x74,
1205c2c66affSColin Finck 0x2e,0x75,0x73,0x65,0x72,0x74,0x72,0x75,0x73,0x74,0x2e,0x63,0x6f,0x6d,0x2f,0x49,
1206c2c66affSColin Finck 0x6e,0x43,0x6f,0x6d,0x6d,0x6f,0x6e,0x52,0x53,0x41,0x53,0x65,0x72,0x76,0x65,0x72,
1207c2c66affSColin Finck 0x43,0x41,0x5f,0x32,0x2e,0x63,0x72,0x74,0x30,0x25,0x06,0x08,0x2b,0x06,0x01,0x05,
1208c2c66affSColin Finck 0x05,0x07,0x30,0x01,0x86,0x19,0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x6f,0x63,0x73,
1209c2c66affSColin Finck 0x70,0x2e,0x75,0x73,0x65,0x72,0x74,0x72,0x75,0x73,0x74,0x2e,0x63,0x6f,0x6d,0x30,
1210c2c66affSColin Finck 0x44,0x06,0x03,0x55,0x1d,0x11,0x04,0x3d,0x30,0x3b,0x82,0x0f,0x63,0x73,0x2e,0x73,
1211c2c66affSColin Finck 0x74,0x61,0x6e,0x66,0x6f,0x72,0x64,0x2e,0x65,0x64,0x75,0x82,0x13,0x77,0x77,0x77,
1212c2c66affSColin Finck 0x2d,0x63,0x73,0x2e,0x73,0x74,0x61,0x6e,0x66,0x6f,0x72,0x64,0x2e,0x65,0x64,0x75,
1213c2c66affSColin Finck 0x82,0x13,0x77,0x77,0x77,0x2e,0x63,0x73,0x2e,0x73,0x74,0x61,0x6e,0x66,0x6f,0x72,
1214c2c66affSColin Finck 0x64,0x2e,0x65,0x64,0x75,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,
1215c2c66affSColin Finck 0x01,0x0b,0x05,0x00,0x03,0x82,0x01,0x01,0x00,0x7e,0xad,0x31,0x04,0x9a,0xe0,0xc2,
1216c2c66affSColin Finck 0x42,0x8a,0x3b,0x5a,0x8a,0x5f,0xe9,0x50,0x33,0xd7,0xf9,0x18,0xd3,0x96,0x05,0x15,
1217c2c66affSColin Finck 0xe5,0xcf,0x61,0x99,0x0d,0x97,0xda,0xf4,0xdd,0x6e,0x45,0xfb,0xe4,0x0e,0x4d,0x23,
1218c2c66affSColin Finck 0xcd,0xe1,0xe0,0x46,0x8f,0x96,0x35,0xa7,0x04,0xe5,0x78,0xfe,0x78,0xed,0xf9,0x33,
1219c2c66affSColin Finck 0xeb,0xde,0x0b,0x9f,0xf4,0x79,0xba,0x2a,0x04,0xea,0xdb,0x63,0xd4,0x8c,0x82,0x12,
1220c2c66affSColin Finck 0x0e,0xdd,0xf1,0xa5,0xa4,0x36,0x86,0x43,0x75,0x1f,0x2e,0x84,0xcd,0xbf,0x7a,0x80,
1221c2c66affSColin Finck 0x9f,0x96,0x89,0x58,0x69,0xe1,0x31,0x17,0xb1,0x16,0x34,0x53,0xb6,0xf0,0x31,0xfd,
1222c2c66affSColin Finck 0xc1,0x1e,0x9e,0x40,0x9f,0xa7,0x56,0x26,0xb0,0xa4,0x15,0x19,0x70,0x1c,0xb3,0x47,
1223c2c66affSColin Finck 0x2b,0x8e,0x90,0x43,0x37,0xd7,0xb5,0xba,0x54,0xe5,0xa4,0xda,0x69,0xae,0xb8,0x73,
1224c2c66affSColin Finck 0x35,0x47,0x01,0xac,0xd9,0x21,0xff,0x18,0x88,0x0b,0xda,0x4a,0xff,0x26,0x2f,0xef,
1225c2c66affSColin Finck 0x15,0xcd,0x6f,0x79,0xf3,0xcb,0x0a,0xaf,0x11,0x3b,0x7e,0xc0,0x11,0xbb,0xeb,0x13,
1226c2c66affSColin Finck 0xe7,0xb2,0x28,0x62,0x92,0x90,0x63,0x50,0xf2,0x6f,0x93,0x92,0x67,0xc0,0xde,0x22,
1227c2c66affSColin Finck 0x3f,0x6e,0x25,0x00,0x60,0x42,0xfe,0x29,0x8d,0x7b,0x5c,0xc1,0xa9,0x09,0xb4,0xc6,
1228c2c66affSColin Finck 0x18,0x56,0x5b,0xb6,0xd0,0xd2,0xdd,0x1b,0x51,0xcb,0x97,0xe7,0x20,0x94,0x97,0xb1,
1229c2c66affSColin Finck 0x40,0xff,0x05,0xec,0x10,0xd6,0xa3,0x4d,0xc8,0x32,0x99,0xf0,0xab,0x51,0xda,0x5b,
1230c2c66affSColin Finck 0x12,0x70,0x63,0x8a,0x5b,0x63,0x6d,0xc8,0x31,0x76,0x70,0xe3,0x02,0x18,0x4e,0x0e,
1231c2c66affSColin Finck 0x9c,0xea,0xab,0x78,0xfa,0x07,0x48,0x59,0xc6
1232c2c66affSColin Finck };
1233c2c66affSColin Finck 
1234c2c66affSColin Finck /* chain0_0 -> chain0_1:
1235c2c66affSColin Finck  * A simple, valid chain
1236c2c66affSColin Finck  */
1237c2c66affSColin Finck static const BYTE chain0_0[] = {
1238c2c66affSColin Finck 0x30,0x82,0x01,0xc2,0x30,0x82,0x01,0x2d,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,
1239c2c66affSColin Finck 0x73,0x87,0xdb,0x32,0x3a,0x6c,0x89,0x74,0x0f,0xda,0x07,0xd4,0x6a,0x2c,0x81,
1240c2c66affSColin Finck 0x59,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30,
1241c2c66affSColin Finck 0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,
1242c2c66affSColin Finck 0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,
1243c2c66affSColin Finck 0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,
1244c2c66affSColin Finck 0x39,0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,
1245c2c66affSColin Finck 0x13,0x05,0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a,
1246c2c66affSColin Finck 0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,
1247c2c66affSColin Finck 0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82,
1248c2c66affSColin Finck 0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34,
1249c2c66affSColin Finck 0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7,
1250c2c66affSColin Finck 0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91,
1251c2c66affSColin Finck 0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5,
1252c2c66affSColin Finck 0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd,
1253c2c66affSColin Finck 0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c,
1254c2c66affSColin Finck 0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35,
1255c2c66affSColin Finck 0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01,
1256c2c66affSColin Finck 0x00,0x01,0xa3,0x23,0x30,0x21,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,
1257c2c66affSColin Finck 0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01,
1258c2c66affSColin Finck 0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x0b,0x06,0x09,0x2a,0x86,
1259c2c66affSColin Finck 0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x03,0x81,0x81,0x00,0x82,0xcd,0x5c,0x0a,
1260c2c66affSColin Finck 0x9d,0x0d,0x3f,0xd1,0xd8,0x74,0xfc,0x52,0x65,0x11,0x76,0x10,0x62,0xb0,0x9a,
1261c2c66affSColin Finck 0xc5,0x54,0x66,0xae,0xfa,0xd5,0x66,0x36,0xcb,0x1e,0xe7,0xad,0xb9,0xfa,0x2e,
1262c2c66affSColin Finck 0xbb,0xb9,0x0b,0x4b,0xbf,0xe7,0x26,0x75,0x2c,0xae,0x2d,0x14,0x84,0x92,0xae,
1263c2c66affSColin Finck 0x56,0xdf,0x55,0x56,0xf3,0xa6,0xc5,0x21,0xa8,0x5e,0xce,0x7a,0x9d,0xff,0x7f,
1264c2c66affSColin Finck 0x10,0xd9,0xc3,0x05,0x52,0x86,0xdc,0x9b,0x46,0xe7,0x69,0xfb,0x1e,0xf0,0x68,
1265c2c66affSColin Finck 0x7d,0x34,0xd7,0xf3,0x56,0xe3,0x0a,0xf3,0xe4,0xdc,0x0f,0xd6,0x4d,0xa8,0xc5,
1266c2c66affSColin Finck 0xb5,0x5b,0xbf,0x0b,0x5d,0xe7,0x76,0xa1,0x56,0xc1,0xa7,0x55,0xa0,0x88,0x7f,
1267c2c66affSColin Finck 0x57,0x8e,0x64,0xda,0x6f,0xaa,0x9c,0xca,0x47,0xf3,0x37,0x08,0x4b,0x9a,0xdc,
1268c2c66affSColin Finck 0xbc,0x65,0x4d,0x9a };
1269c2c66affSColin Finck static const BYTE chain0_1[] = {
1270c2c66affSColin Finck 0x30,0x82,0x01,0x98,0x30,0x82,0x01,0x01,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,
1271c2c66affSColin Finck 0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,
1272c2c66affSColin Finck 0x00,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,
1273c2c66affSColin Finck 0x65,0x72,0x74,0x31,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x31,0x31,0x32,
1274c2c66affSColin Finck 0x32,0x31,0x38,0x35,0x32,0x30,0x37,0x5a,0x18,0x0f,0x31,0x36,0x32,0x38,0x30,
1275c2c66affSColin Finck 0x38,0x32,0x36,0x30,0x35,0x32,0x30,0x35,0x37,0x5a,0x30,0x10,0x31,0x0e,0x30,
1276c2c66affSColin Finck 0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,
1277c2c66affSColin Finck 0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,
1278c2c66affSColin Finck 0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,
1279c2c66affSColin Finck 0xc5,0x4b,0x3f,0xe5,0x33,0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,
1280c2c66affSColin Finck 0xba,0xff,0xb4,0xc6,0xdc,0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,
1281c2c66affSColin Finck 0xce,0x30,0xc5,0xa7,0x48,0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,
1282c2c66affSColin Finck 0x16,0xde,0xc6,0x8b,0x47,0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,
1283c2c66affSColin Finck 0x3b,0xb9,0xcf,0x6b,0x05,0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,
1284c2c66affSColin Finck 0xb7,0x82,0x40,0xfc,0x6a,0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,
1285c2c66affSColin Finck 0xcb,0x53,0xac,0x85,0x85,0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,
1286c2c66affSColin Finck 0x8b,0xa2,0x23,0xb2,0xd3,0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,
1287c2c66affSColin Finck 0xcf,0x49,0x98,0x72,0xa3,0x02,0x03,0x01,0x00,0x01,0x30,0x0d,0x06,0x09,0x2a,
1288c2c66affSColin Finck 0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0x3c,
1289c2c66affSColin Finck 0x90,0x45,0x5b,0x81,0x25,0x9d,0x7a,0x10,0x9f,0x15,0x25,0x03,0x52,0x78,0x09,
1290c2c66affSColin Finck 0x6f,0x62,0x66,0x78,0x01,0x69,0x6a,0x7f,0x19,0x02,0x18,0xd8,0xc0,0x89,0x2f,
1291c2c66affSColin Finck 0x0f,0x47,0xa7,0x17,0xc2,0xd7,0xe2,0x81,0x7e,0xea,0x54,0xd4,0xe6,0xcc,0x8f,
1292c2c66affSColin Finck 0x88,0x1a,0xee,0x28,0x42,0x6c,0x77,0xf5,0xec,0x8c,0x05,0xa5,0x7f,0xee,0x2e,
1293c2c66affSColin Finck 0x0b,0xbc,0xde,0xb0,0x71,0x2c,0x83,0x32,0xcb,0x49,0x00,0x46,0x03,0x95,0x58,
1294c2c66affSColin Finck 0x6c,0x57,0x0c,0x5a,0x69,0x3c,0xfa,0xbf,0x46,0x7a,0x4d,0xd0,0x23,0x77,0x23,
1295c2c66affSColin Finck 0xac,0x1d,0x33,0xb7,0x87,0xb4,0xc6,0x6b,0x52,0xa1,0xed,0x9a,0xb8,0x8e,0x1a,
1296c2c66affSColin Finck 0xcb,0xc3,0xd3,0x50,0xe0,0x0d,0x12,0x5d,0x0e,0x84,0x52,0xa5,0x12,0x76,0x6b,
1297c2c66affSColin Finck 0xbf,0xb8,0xbe,0x51,0xc0,0xa6,0xae };
1298c2c66affSColin Finck /* chain0_0 -> chain1_1:
1299c2c66affSColin Finck  * A chain whose signature is bad
1300c2c66affSColin Finck  */
1301c2c66affSColin Finck static const BYTE chain1_1[] = {
1302c2c66affSColin Finck 0x30,0x82,0x01,0x98,0x30,0x82,0x01,0x01,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,
1303c2c66affSColin Finck 0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,
1304c2c66affSColin Finck 0x00,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,
1305c2c66affSColin Finck 0x65,0x72,0x74,0x31,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x31,0x31,0x32,
1306c2c66affSColin Finck 0x32,0x31,0x38,0x35,0x32,0x30,0x37,0x5a,0x18,0x0f,0x31,0x36,0x32,0x38,0x30,
1307c2c66affSColin Finck 0x38,0x32,0x36,0x30,0x35,0x32,0x30,0x35,0x37,0x5a,0x30,0x10,0x31,0x0e,0x30,
1308c2c66affSColin Finck 0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,
1309c2c66affSColin Finck 0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,
1310c2c66affSColin Finck 0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xad,0x7e,0xca,
1311c2c66affSColin Finck 0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82,0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,
1312c2c66affSColin Finck 0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34,0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,
1313c2c66affSColin Finck 0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7,0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,
1314c2c66affSColin Finck 0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91,0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,
1315c2c66affSColin Finck 0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5,0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,
1316c2c66affSColin Finck 0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd,0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,
1317c2c66affSColin Finck 0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c,0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,
1318c2c66affSColin Finck 0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35,0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,
1319c2c66affSColin Finck 0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01,0x00,0x01,0x30,0x0d,0x06,0x09,0x2a,
1320c2c66affSColin Finck 0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0xad,
1321c2c66affSColin Finck 0x16,0xaa,0x77,0xab,0xd5,0x1a,0x6c,0x90,0x5d,0x4e,0x61,0x49,0x89,0x6e,0x9f,
1322c2c66affSColin Finck 0x03,0x7b,0x4a,0x49,0xb1,0x46,0x75,0xf3,0x69,0xeb,0x96,0x13,0x3c,0x35,0xb5,
1323c2c66affSColin Finck 0x37,0x3b,0xc2,0x84,0x5c,0xe5,0x7c,0x46,0xf6,0x6b,0xc7,0x4e,0x72,0x91,0xf4,
1324c2c66affSColin Finck 0xde,0xc5,0x66,0x0f,0x2d,0x39,0xc6,0x9e,0x8e,0x25,0x4d,0x3f,0x7b,0x45,0xe1,
1325c2c66affSColin Finck 0xc6,0x1a,0x7e,0x28,0x83,0xf8,0x87,0x30,0x4e,0xa5,0xfd,0x32,0x7a,0xed,0x53,
1326c2c66affSColin Finck 0x10,0x3b,0x14,0xe5,0xf1,0x32,0x77,0xf1,0x29,0x72,0x98,0x2b,0xa3,0x17,0xd6,
1327c2c66affSColin Finck 0x8c,0x65,0xaa,0x3b,0x6d,0xab,0xb3,0xbe,0xfa,0x72,0x38,0xf7,0xd0,0xb6,0x0f,
1328c2c66affSColin Finck 0x5c,0x0d,0xec,0x17,0x43,0x2a,0xfd,0xc1,0x01,0x43,0x98,0xd3,0x1b,0x84,0x3e,
1329c2c66affSColin Finck 0x32,0xcf,0xda,0x1d,0xc2,0xc9,0x61 };
1330c2c66affSColin Finck /* chain2_0 -> chain0_1:
1331c2c66affSColin Finck  * A chain whose time nesting is invalid.
1332c2c66affSColin Finck  */
1333c2c66affSColin Finck static const BYTE chain2_0[] = {
1334c2c66affSColin Finck 0x30,0x82,0x01,0xc2,0x30,0x82,0x01,0x2d,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,
1335c2c66affSColin Finck 0x11,0x58,0x73,0x34,0x62,0x2b,0xa5,0xa5,0x54,0x4a,0x14,0x48,0x3c,0x90,0x4e,
1336c2c66affSColin Finck 0x86,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30,
1337c2c66affSColin Finck 0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,
1338c2c66affSColin Finck 0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x36,0x30,0x31,0x30,0x31,0x30,0x30,0x30,
1339c2c66affSColin Finck 0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x36,0x31,0x32,0x33,0x31,0x32,0x33,0x35,
1340c2c66affSColin Finck 0x39,0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,
1341c2c66affSColin Finck 0x13,0x05,0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a,
1342c2c66affSColin Finck 0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,
1343c2c66affSColin Finck 0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82,
1344c2c66affSColin Finck 0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34,
1345c2c66affSColin Finck 0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7,
1346c2c66affSColin Finck 0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91,
1347c2c66affSColin Finck 0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5,
1348c2c66affSColin Finck 0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd,
1349c2c66affSColin Finck 0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c,
1350c2c66affSColin Finck 0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35,
1351c2c66affSColin Finck 0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01,
1352c2c66affSColin Finck 0x00,0x01,0xa3,0x23,0x30,0x21,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,
1353c2c66affSColin Finck 0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01,
1354c2c66affSColin Finck 0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x0b,0x06,0x09,0x2a,0x86,
1355c2c66affSColin Finck 0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x03,0x81,0x81,0x00,0x88,0x44,0x83,0xfc,
1356c2c66affSColin Finck 0x38,0xa4,0x6e,0x53,0x24,0x8f,0xac,0xcf,0xc0,0xb9,0xaa,0xdc,0x5f,0x30,0xf3,
1357c2c66affSColin Finck 0xc3,0x5c,0xd5,0x10,0x4e,0xb7,0x30,0x24,0x80,0xb3,0x5e,0xcb,0x6a,0xec,0x88,
1358c2c66affSColin Finck 0xa6,0x02,0xbd,0x37,0x97,0xcc,0x60,0x04,0x03,0xdd,0xfa,0xb0,0x4e,0xd6,0x00,
1359c2c66affSColin Finck 0x22,0x41,0xaa,0x2b,0x3c,0x3e,0x1f,0xcd,0xe3,0xf0,0x88,0x84,0x1c,0x00,0xc4,
1360c2c66affSColin Finck 0x97,0x69,0x3d,0x40,0x6d,0x33,0x8c,0xb7,0xb4,0x41,0xf3,0x28,0x00,0xa8,0xa1,
1361c2c66affSColin Finck 0x81,0x76,0x50,0x69,0xb2,0x2c,0xc4,0x56,0xab,0x2b,0x4a,0x77,0x41,0x3e,0x6c,
1362c2c66affSColin Finck 0x78,0x0b,0xf9,0x6c,0x86,0x84,0x1a,0x5a,0x0e,0x8c,0x12,0x59,0xbd,0x74,0xf3,
1363c2c66affSColin Finck 0xb9,0x91,0xa1,0x70,0x91,0xf3,0xe8,0x8d,0x78,0x42,0xc3,0x4f,0xfa,0xef,0xe7,
1364c2c66affSColin Finck 0xca,0x09,0x5c,0x18 };
1365c2c66affSColin Finck /* chain3_0 -> chain0_1:
1366c2c66affSColin Finck  * A chain whose root cannot be a CA.
1367c2c66affSColin Finck  */
1368c2c66affSColin Finck static const BYTE chain3_0[] = {
1369c2c66affSColin Finck 0x30,0x82,0x01,0xad,0x30,0x82,0x01,0x1a,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,
1370c2c66affSColin Finck 0x63,0x73,0xee,0x45,0x59,0x76,0x1a,0x9e,0x47,0xf1,0xfb,0xf0,0x42,0x44,0x26,
1371c2c66affSColin Finck 0xeb,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x10,0x31,
1372c2c66affSColin Finck 0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31,
1373c2c66affSColin Finck 0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,
1374c2c66affSColin Finck 0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35,
1375c2c66affSColin Finck 0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,
1376c2c66affSColin Finck 0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,
1377c2c66affSColin Finck 0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,
1378c2c66affSColin Finck 0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82,
1379c2c66affSColin Finck 0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34,
1380c2c66affSColin Finck 0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7,
1381c2c66affSColin Finck 0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91,
1382c2c66affSColin Finck 0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5,
1383c2c66affSColin Finck 0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd,
1384c2c66affSColin Finck 0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c,
1385c2c66affSColin Finck 0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35,
1386c2c66affSColin Finck 0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01,
1387c2c66affSColin Finck 0x00,0x01,0xa3,0x10,0x30,0x0e,0x30,0x0c,0x06,0x03,0x55,0x1d,0x13,0x01,0x01,
1388c2c66affSColin Finck 0xff,0x04,0x02,0x30,0x00,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,
1389c2c66affSColin Finck 0x00,0x03,0x81,0x81,0x00,0x53,0xb7,0xa9,0x90,0xe0,0x88,0x36,0xc0,0x2d,0xb1,
1390c2c66affSColin Finck 0xa3,0x97,0xff,0x16,0x62,0x29,0xa2,0xfd,0x92,0x90,0xb7,0x8d,0xd9,0xdf,0x57,
1391c2c66affSColin Finck 0x94,0x5a,0xce,0x36,0x5c,0x95,0x24,0xab,0x4f,0x63,0x55,0xa7,0xea,0x8b,0xaf,
1392c2c66affSColin Finck 0xd9,0x41,0x6a,0x2f,0xd8,0x9e,0x1c,0x2d,0xc0,0x11,0x52,0x09,0x4b,0x31,0x1f,
1393c2c66affSColin Finck 0x5e,0x8f,0x4b,0xbf,0x20,0x73,0x2d,0x04,0x11,0x56,0x6d,0xb1,0xbe,0xb4,0x5d,
1394c2c66affSColin Finck 0x70,0x6b,0xb2,0xd0,0xd3,0xf5,0x5d,0x60,0x08,0x65,0x2c,0xe3,0x78,0x5a,0x05,
1395c2c66affSColin Finck 0x36,0xe1,0xf1,0x67,0x3a,0x25,0xf3,0x47,0x83,0xce,0x4f,0xb0,0x74,0x7a,0x35,
1396c2c66affSColin Finck 0xa0,0x7f,0x70,0x64,0x8a,0x14,0x66,0x03,0xf6,0xae,0xdf,0x1b,0xf5,0x80,0x87,
1397c2c66affSColin Finck 0x06,0x39,0x76,0x70,0x7b,0xd2,0x83,0xe9,0xce,0x1f,0xf8,0x66,0xc1 };
1398c2c66affSColin Finck /* chain4_0 -> chain4_1 -> chain4_2:
1399c2c66affSColin Finck  * A chain whose path length constraint is violated.
1400c2c66affSColin Finck  */
1401c2c66affSColin Finck static const BYTE chain4_0[] = {
1402c2c66affSColin Finck 0x30,0x82,0x01,0xc5,0x30,0x82,0x01,0x30,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,
1403c2c66affSColin Finck 0x01,0xcd,0x67,0x9e,0xec,0xae,0x1e,0x69,0x16,0x3f,0x92,0x8a,0xed,0x6d,0x57,
1404c2c66affSColin Finck 0xac,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30,
1405c2c66affSColin Finck 0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,
1406c2c66affSColin Finck 0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,
1407c2c66affSColin Finck 0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,
1408c2c66affSColin Finck 0x39,0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,
1409c2c66affSColin Finck 0x13,0x05,0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a,
1410c2c66affSColin Finck 0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,
1411c2c66affSColin Finck 0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82,
1412c2c66affSColin Finck 0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34,
1413c2c66affSColin Finck 0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7,
1414c2c66affSColin Finck 0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91,
1415c2c66affSColin Finck 0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5,
1416c2c66affSColin Finck 0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd,
1417c2c66affSColin Finck 0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c,
1418c2c66affSColin Finck 0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35,
1419c2c66affSColin Finck 0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01,
1420c2c66affSColin Finck 0x00,0x01,0xa3,0x26,0x30,0x24,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,
1421c2c66affSColin Finck 0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x12,0x06,0x03,0x55,0x1d,0x13,0x01,
1422c2c66affSColin Finck 0x01,0xff,0x04,0x08,0x30,0x06,0x01,0x01,0xff,0x02,0x01,0x00,0x30,0x0b,0x06,
1423c2c66affSColin Finck 0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x03,0x81,0x81,0x00,0x70,
1424c2c66affSColin Finck 0x60,0x8d,0x5f,0x29,0x8e,0x6b,0x48,0x79,0xaa,0xd1,0x7a,0xbb,0x6c,0x7c,0x54,
1425c2c66affSColin Finck 0x11,0x55,0x08,0xb9,0x2e,0x5e,0x53,0xd6,0x9b,0xb9,0xe4,0xc8,0x0e,0x48,0xe7,
1426c2c66affSColin Finck 0x20,0x9e,0xbd,0x7c,0x55,0xb8,0xf1,0x69,0x0c,0x08,0xd6,0x32,0x32,0xd9,0x05,
1427c2c66affSColin Finck 0x81,0x8a,0x33,0x4c,0x57,0x20,0xae,0xe8,0xde,0x61,0x63,0x85,0xc8,0xe1,0x1d,
1428c2c66affSColin Finck 0xef,0x4b,0xa4,0x42,0x4e,0x0a,0x25,0x48,0x2b,0xc2,0x06,0x79,0x90,0x45,0x90,
1429c2c66affSColin Finck 0x94,0x3d,0xb0,0x36,0xe6,0x60,0xe6,0xd2,0x1a,0x11,0x01,0x4b,0xaf,0x23,0x4d,
1430c2c66affSColin Finck 0x62,0x6b,0xdc,0x3a,0xae,0x61,0x93,0xce,0x7b,0xae,0x21,0xfe,0x42,0xd8,0x86,
1431c2c66affSColin Finck 0x36,0x19,0x00,0x18,0x13,0x4d,0xf9,0xd1,0x94,0xa2,0xb7,0xbd,0xb0,0x5c,0x9b,
1432c2c66affSColin Finck 0x5c,0x03,0xf5,0x86,0x85,0x07,0x1c };
1433c2c66affSColin Finck static const BYTE chain4_1[] = {
1434c2c66affSColin Finck 0x30,0x82,0x01,0xb3,0x30,0x82,0x01,0x1e,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,
1435c2c66affSColin Finck 0x01,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30,
1436c2c66affSColin Finck 0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,
1437c2c66affSColin Finck 0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,
1438c2c66affSColin Finck 0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,
1439c2c66affSColin Finck 0x39,0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,
1440c2c66affSColin Finck 0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a,
1441c2c66affSColin Finck 0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,
1442c2c66affSColin Finck 0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5,0x33,0x0e,0x67,0x5f,
1443c2c66affSColin Finck 0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6,0xdc,0xb6,0x17,0x8e,
1444c2c66affSColin Finck 0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7,0x48,0x9f,0x6e,0xfe,
1445c2c66affSColin Finck 0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b,0x47,0xd1,0x57,0x71,
1446c2c66affSColin Finck 0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b,0x05,0x72,0xa7,0x87,
1447c2c66affSColin Finck 0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc,0x6a,0x80,0x83,0x68,
1448c2c66affSColin Finck 0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85,0x85,0xb5,0x46,0x36,
1449c2c66affSColin Finck 0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2,0xd3,0x51,0x9a,0x22,
1450c2c66affSColin Finck 0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72,0xa3,0x02,0x03,0x01,
1451c2c66affSColin Finck 0x00,0x01,0xa3,0x23,0x30,0x21,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,
1452c2c66affSColin Finck 0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01,
1453c2c66affSColin Finck 0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x0b,0x06,0x09,0x2a,0x86,
1454c2c66affSColin Finck 0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x03,0x81,0x81,0x00,0x26,0x56,0x31,0x53,
1455c2c66affSColin Finck 0x65,0xe3,0xd8,0x59,0xc8,0x6f,0xa3,0x5b,0x8a,0x11,0x53,0xde,0x8d,0x6f,0x6d,
1456c2c66affSColin Finck 0x8c,0xe1,0x79,0x25,0xb2,0xbf,0xc6,0x3b,0xa1,0x8b,0x6b,0xcd,0x99,0xcf,0x0c,
1457c2c66affSColin Finck 0x6f,0xaa,0xbc,0xd0,0x3d,0xb2,0xf8,0x1c,0x6f,0xb0,0x84,0x7b,0xb1,0x88,0xec,
1458c2c66affSColin Finck 0xd6,0x77,0xbe,0xb1,0x0b,0x8c,0x18,0x85,0xb7,0x38,0x81,0x12,0xc9,0xc7,0x4a,
1459c2c66affSColin Finck 0xf6,0x83,0xc4,0xd9,0xae,0xb6,0x1d,0xbb,0xd2,0x08,0x01,0x4a,0xe1,0xdc,0x8f,
1460c2c66affSColin Finck 0x67,0xa9,0xed,0xe2,0x3f,0x96,0xf6,0x72,0x7e,0x4a,0x63,0x46,0xc4,0x82,0x89,
1461c2c66affSColin Finck 0x0a,0x81,0xc8,0x3a,0x9c,0xe7,0x23,0x5f,0x8d,0xd9,0x6c,0xb2,0x5d,0x9a,0x40,
1462c2c66affSColin Finck 0x04,0x04,0xd5,0x4a,0x29,0x57,0xbd,0x18,0xd8,0xca,0x1f,0xf7,0xf8,0x23,0x07,
1463c2c66affSColin Finck 0x4b,0x03,0xa3,0xd9 };
1464c2c66affSColin Finck static const BYTE chain4_2[] = {
1465c2c66affSColin Finck 0x30,0x82,0x01,0x98,0x30,0x82,0x01,0x01,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,
1466c2c66affSColin Finck 0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,
1467c2c66affSColin Finck 0x00,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,
1468c2c66affSColin Finck 0x65,0x72,0x74,0x32,0x30,0x22,0x18,0x0f,0x31,0x36,0x30,0x31,0x31,0x31,0x32,
1469c2c66affSColin Finck 0x32,0x31,0x38,0x35,0x32,0x30,0x37,0x5a,0x18,0x0f,0x31,0x36,0x32,0x38,0x30,
1470c2c66affSColin Finck 0x38,0x32,0x36,0x30,0x35,0x32,0x30,0x35,0x37,0x5a,0x30,0x10,0x31,0x0e,0x30,
1471c2c66affSColin Finck 0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x33,0x30,0x81,
1472c2c66affSColin Finck 0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,
1473c2c66affSColin Finck 0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xc3,0x31,0x35,
1474c2c66affSColin Finck 0xc3,0x9d,0x8a,0x87,0x20,0xc6,0x32,0xe9,0xb1,0xf6,0x8f,0xf9,0x05,0x73,0x1d,
1475c2c66affSColin Finck 0xa7,0xde,0xab,0x15,0x8a,0x9c,0x7f,0x11,0x7e,0x77,0xa0,0x42,0x80,0xf4,0x79,
1476c2c66affSColin Finck 0xda,0x98,0x7b,0x00,0xfa,0x8f,0x0c,0xd0,0xeb,0x8a,0x80,0xed,0x07,0xfc,0x64,
1477c2c66affSColin Finck 0x71,0x03,0xc1,0xd6,0x2f,0x9b,0xde,0x42,0x63,0xd9,0x79,0xea,0xdd,0x10,0xe8,
1478c2c66affSColin Finck 0x68,0xc8,0x69,0x4f,0x4a,0x39,0x23,0x87,0xca,0xd1,0xc9,0x77,0x14,0x30,0x85,
1479c2c66affSColin Finck 0x9e,0xf7,0x79,0xf9,0x07,0xb7,0x7c,0x55,0xcb,0xa7,0xd5,0xb8,0x44,0xb5,0x20,
1480c2c66affSColin Finck 0xb5,0x01,0x5c,0xa2,0xd1,0xd5,0xad,0x0f,0x87,0xaf,0x37,0xd1,0x39,0x0c,0x0d,
1481c2c66affSColin Finck 0xd5,0xde,0x26,0x7a,0xed,0xf9,0x2a,0xb1,0x60,0x65,0x2d,0x08,0x24,0x51,0x1d,
1482c2c66affSColin Finck 0xb0,0x0a,0xb5,0x13,0xc7,0x02,0x03,0x01,0x00,0x01,0x30,0x0d,0x06,0x09,0x2a,
1483c2c66affSColin Finck 0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0xaa,
1484c2c66affSColin Finck 0x0e,0x17,0x8d,0x5b,0xca,0x11,0xda,0x5a,0xb5,0xd4,0xe8,0x63,0xce,0xa5,0x67,
1485c2c66affSColin Finck 0x11,0x2f,0xf8,0xb8,0x9f,0x89,0x46,0x7d,0x20,0x94,0x5f,0x0d,0x02,0x7e,0x5e,
1486c2c66affSColin Finck 0x8c,0x33,0xfc,0x24,0x56,0x08,0xe6,0xf1,0x4d,0x29,0xd5,0xef,0x03,0xe3,0x9a,
1487c2c66affSColin Finck 0xc6,0xcd,0x6e,0xe3,0xe6,0x45,0xaa,0xce,0x5a,0x2f,0x37,0x6c,0x07,0xd2,0x28,
1488c2c66affSColin Finck 0x63,0x8e,0x55,0x8a,0xad,0xe3,0x8a,0x58,0x3d,0x24,0x09,0x1e,0x9a,0x7d,0x5f,
1489c2c66affSColin Finck 0x05,0xc4,0x51,0x18,0x17,0x46,0x33,0x4d,0x72,0x05,0xc2,0x02,0xb6,0x05,0x22,
1490c2c66affSColin Finck 0x23,0xcc,0xf9,0x1f,0x87,0x6c,0x4a,0x3d,0x6f,0xdb,0x59,0xf6,0x79,0x81,0x02,
1491c2c66affSColin Finck 0x45,0x9f,0xc8,0xc3,0xf0,0x90,0x82,0xaf,0x58,0x80,0x18,0xea,0x73,0x50,0x29,
1492c2c66affSColin Finck 0x71,0x8d,0xc1,0x9e,0x53,0x19,0x5a };
1493c2c66affSColin Finck /* chain5_0 -> chain5_1:
1494c2c66affSColin Finck  * A chain whose name constraints aren't met.
1495c2c66affSColin Finck  */
1496c2c66affSColin Finck static const BYTE chain5_0[] = {
1497c2c66affSColin Finck 0x30,0x82,0x01,0xe0,0x30,0x82,0x01,0x4b,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,
1498c2c66affSColin Finck 0xed,0xb8,0x3b,0xf2,0x95,0xe6,0x8e,0xdf,0x75,0x6a,0x22,0xbc,0xca,0x51,0xb6,
1499c2c66affSColin Finck 0x83,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30,
1500c2c66affSColin Finck 0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,
1501c2c66affSColin Finck 0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,
1502c2c66affSColin Finck 0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,
1503c2c66affSColin Finck 0x39,0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,
1504c2c66affSColin Finck 0x13,0x05,0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a,
1505c2c66affSColin Finck 0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,
1506c2c66affSColin Finck 0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82,
1507c2c66affSColin Finck 0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34,
1508c2c66affSColin Finck 0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7,
1509c2c66affSColin Finck 0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91,
1510c2c66affSColin Finck 0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5,
1511c2c66affSColin Finck 0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd,
1512c2c66affSColin Finck 0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c,
1513c2c66affSColin Finck 0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35,
1514c2c66affSColin Finck 0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01,
1515c2c66affSColin Finck 0x00,0x01,0xa3,0x41,0x30,0x3f,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,
1516c2c66affSColin Finck 0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01,
1517c2c66affSColin Finck 0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x1c,0x06,0x03,0x55,0x1d,
1518c2c66affSColin Finck 0x1e,0x01,0x01,0xff,0x04,0x12,0x30,0x10,0xa0,0x0e,0x30,0x0c,0x82,0x0a,0x77,
1519c2c66affSColin Finck 0x69,0x6e,0x65,0x68,0x71,0x2e,0x6f,0x72,0x67,0x30,0x0b,0x06,0x09,0x2a,0x86,
1520c2c66affSColin Finck 0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x03,0x81,0x81,0x00,0x7f,0x98,0xd1,0x58,
1521c2c66affSColin Finck 0x70,0x36,0x2c,0x08,0x63,0x2c,0xf9,0xe0,0x16,0xda,0x59,0xd9,0x1b,0xa5,0xba,
1522c2c66affSColin Finck 0xe0,0xec,0xd9,0x0a,0x1b,0x78,0xd0,0xea,0x49,0xc7,0x01,0x06,0x78,0xe5,0xb3,
1523c2c66affSColin Finck 0x81,0x5a,0x53,0x3d,0x9b,0x0d,0xaf,0xc8,0x04,0x57,0x15,0xee,0xfd,0x05,0x80,
1524c2c66affSColin Finck 0x72,0x8a,0x54,0x51,0x6a,0x15,0xdc,0xbf,0xfc,0xe3,0x04,0xe4,0x6f,0x20,0xb2,
1525c2c66affSColin Finck 0xfd,0xa6,0x32,0x4c,0xbc,0x1b,0x60,0xf7,0xc3,0x9c,0x5f,0x17,0x94,0xc7,0xdf,
1526c2c66affSColin Finck 0x9f,0xae,0xdb,0x72,0x8a,0x98,0x28,0x9d,0x26,0x1f,0x14,0x76,0xb1,0x8e,0x26,
1527c2c66affSColin Finck 0xf6,0x97,0x96,0x57,0x14,0x9e,0x44,0x13,0xef,0x85,0xc1,0x6f,0x38,0xda,0xf2,
1528c2c66affSColin Finck 0x3a,0xf6,0xad,0x0b,0x35,0xcf,0xea,0xb0,0x5a,0x9c,0x36,0x80,0x45,0x1f,0x88,
1529c2c66affSColin Finck 0x2f,0xff,0xb4,0xb5 };
1530c2c66affSColin Finck static const BYTE chain5_1[] = {
1531c2c66affSColin Finck 0x30,0x82,0x01,0xb2,0x30,0x82,0x01,0x1b,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,
1532c2c66affSColin Finck 0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,
1533c2c66affSColin Finck 0x00,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,
1534c2c66affSColin Finck 0x65,0x72,0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,
1535c2c66affSColin Finck 0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,
1536c2c66affSColin Finck 0x33,0x35,0x39,0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,
1537c2c66affSColin Finck 0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9f,0x30,0x0d,0x06,
1538c2c66affSColin Finck 0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,
1539c2c66affSColin Finck 0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5,
1540c2c66affSColin Finck 0x33,0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6,
1541c2c66affSColin Finck 0xdc,0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7,
1542c2c66affSColin Finck 0x48,0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b,
1543c2c66affSColin Finck 0x47,0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b,
1544c2c66affSColin Finck 0x05,0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc,
1545c2c66affSColin Finck 0x6a,0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85,
1546c2c66affSColin Finck 0x85,0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2,
1547c2c66affSColin Finck 0xd3,0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72,
1548c2c66affSColin Finck 0xa3,0x02,0x03,0x01,0x00,0x01,0xa3,0x1c,0x30,0x1a,0x30,0x18,0x06,0x03,0x55,
1549c2c66affSColin Finck 0x1d,0x07,0x01,0x01,0xff,0x04,0x0e,0x30,0x0c,0x82,0x0a,0x77,0x69,0x6e,0x65,
1550c2c66affSColin Finck 0x68,0x71,0x2e,0x63,0x6f,0x6d,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,
1551c2c66affSColin Finck 0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0x08,0x08,0xf5,0x1c,0xca,
1552c2c66affSColin Finck 0x3b,0x5a,0xd7,0x45,0xac,0x29,0x5c,0x10,0x9d,0xb0,0x4a,0xdb,0x36,0x0b,0x39,
1553c2c66affSColin Finck 0x14,0x87,0x3d,0x06,0xe8,0x0d,0x54,0xa7,0xb9,0x50,0x14,0x29,0x05,0xd2,0x75,
1554c2c66affSColin Finck 0xe4,0x88,0xd8,0x8e,0x7e,0xab,0x61,0xba,0x3c,0xb2,0x4f,0x8f,0xfd,0x00,0x6b,
1555c2c66affSColin Finck 0x94,0x69,0xf0,0x13,0x40,0x7d,0x4e,0x7c,0xac,0xf0,0x1b,0x07,0x2c,0x96,0x46,
1556c2c66affSColin Finck 0xf6,0x38,0x38,0xc6,0x65,0x2c,0x02,0x28,0x62,0x6f,0x7d,0xf9,0x4d,0xff,0xb1,
1557c2c66affSColin Finck 0x38,0x0e,0xce,0x89,0x0e,0xdd,0x22,0x51,0xd2,0x6b,0x0e,0x80,0x3c,0xa6,0x0c,
1558c2c66affSColin Finck 0xe7,0x8b,0x3b,0x2a,0x2f,0x46,0xed,0xda,0x96,0x1a,0xc1,0x5c,0xfe,0xe0,0xef,
1559c2c66affSColin Finck 0xdb,0xe0,0x11,0xc4,0x56,0x12,0xe2,0x4b,0x84,0xde,0xaf,0x7f,0x3c,0x9f,0xcb,
1560c2c66affSColin Finck 0xb6,0xac,0x92 };
1561c2c66affSColin Finck /* chain0_0 -> chain4_1:
1562c2c66affSColin Finck  * A chain whose end certificate is a CA.
1563c2c66affSColin Finck  */
1564c2c66affSColin Finck /* chain0_0 -> chain 7_1:
1565c2c66affSColin Finck  * A chain whose end cert has a bad critical extension.
1566c2c66affSColin Finck  */
1567c2c66affSColin Finck static const BYTE chain7_1[] = {
1568c2c66affSColin Finck 0x30,0x82,0x01,0x93,0x30,0x81,0xfd,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,0x01,
1569c2c66affSColin Finck 0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,
1570c2c66affSColin Finck 0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,
1571c2c66affSColin Finck 0x72,0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,
1572c2c66affSColin Finck 0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,
1573c2c66affSColin Finck 0x35,0x39,0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,
1574c2c66affSColin Finck 0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,
1575c2c66affSColin Finck 0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,
1576c2c66affSColin Finck 0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5,0x33,
1577c2c66affSColin Finck 0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6,0xdc,
1578c2c66affSColin Finck 0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7,0x48,
1579c2c66affSColin Finck 0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b,0x47,
1580c2c66affSColin Finck 0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b,0x05,
1581c2c66affSColin Finck 0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc,0x6a,
1582c2c66affSColin Finck 0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85,0x85,
1583c2c66affSColin Finck 0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2,0xd3,
1584c2c66affSColin Finck 0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72,0xa3,
1585c2c66affSColin Finck 0x02,0x03,0x01,0x00,0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,
1586c2c66affSColin Finck 0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0x9f,0x69,0xfd,0x26,0xd5,0x4b,
1587c2c66affSColin Finck 0xe0,0xab,0x12,0x21,0xb9,0xfc,0xf7,0xe0,0x0c,0x09,0x94,0xad,0x27,0xd7,0x9d,
1588c2c66affSColin Finck 0xa3,0xcc,0x46,0x2a,0x25,0x9a,0x24,0xa7,0x31,0x58,0x78,0xf5,0xfc,0x30,0xe1,
1589c2c66affSColin Finck 0x6d,0xfd,0x59,0xab,0xbe,0x69,0xa0,0xea,0xe3,0x7d,0x7a,0x7b,0xe5,0x85,0xeb,
1590c2c66affSColin Finck 0x86,0x6a,0x84,0x3c,0x96,0x01,0x1a,0x70,0xa7,0xb8,0xcb,0xf2,0x11,0xe7,0x52,
1591c2c66affSColin Finck 0x9c,0x58,0x2d,0xac,0x63,0xce,0x72,0x4b,0xad,0x62,0xa8,0x1d,0x75,0x96,0xe2,
1592c2c66affSColin Finck 0x27,0xf5,0x6f,0xba,0x91,0xf8,0xf1,0xb0,0xbf,0x90,0x24,0x6d,0xba,0x5d,0xd7,
1593c2c66affSColin Finck 0x39,0x63,0x3b,0x7c,0x04,0x5d,0x89,0x9d,0x1c,0xf2,0xf7,0xcc,0xdf,0x6e,0x8a,
1594c2c66affSColin Finck 0x43,0xa9,0xdd,0x86,0x05,0xa2,0xf3,0x22,0x2d,0x1e,0x70,0xa1,0x59,0xd7,0xa5,
1595c2c66affSColin Finck 0x94,0x7d };
1596c2c66affSColin Finck /* chain8_0 -> chain8_1 -> chain8_2:
1597c2c66affSColin Finck  * A chain whose root cert validity time doesn't overlap the end cert's
1598c2c66affSColin Finck  * validity time.
1599c2c66affSColin Finck  */
1600c2c66affSColin Finck static const BYTE chain8_0[] = {
1601c2c66affSColin Finck 0x30,0x82,0x01,0xc2,0x30,0x82,0x01,0x2d,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,
1602c2c66affSColin Finck 0x76,0x09,0xeb,0xc1,0x06,0x61,0x69,0x50,0x0e,0x0c,0xaf,0xc9,0x0a,0x6b,0x93,
1603c2c66affSColin Finck 0x50,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30,
1604c2c66affSColin Finck 0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,
1605c2c66affSColin Finck 0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,
1606c2c66affSColin Finck 0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x30,0x36,0x30,0x31,0x30,0x30,0x30,
1607c2c66affSColin Finck 0x30,0x30,0x30,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,
1608c2c66affSColin Finck 0x13,0x05,0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a,
1609c2c66affSColin Finck 0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,
1610c2c66affSColin Finck 0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82,
1611c2c66affSColin Finck 0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34,
1612c2c66affSColin Finck 0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7,
1613c2c66affSColin Finck 0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91,
1614c2c66affSColin Finck 0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5,
1615c2c66affSColin Finck 0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd,
1616c2c66affSColin Finck 0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c,
1617c2c66affSColin Finck 0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35,
1618c2c66affSColin Finck 0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01,
1619c2c66affSColin Finck 0x00,0x01,0xa3,0x23,0x30,0x21,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,
1620c2c66affSColin Finck 0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01,
1621c2c66affSColin Finck 0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x0b,0x06,0x09,0x2a,0x86,
1622c2c66affSColin Finck 0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x03,0x81,0x81,0x00,0x87,0x74,0x4a,0xb7,
1623c2c66affSColin Finck 0xbe,0xd4,0x21,0xa5,0x5f,0x51,0xd6,0xea,0x89,0x4c,0x68,0x16,0x38,0x09,0x49,
1624c2c66affSColin Finck 0xf5,0xef,0xac,0x0c,0x59,0x27,0xa3,0x0f,0x8f,0xb9,0x21,0x35,0x91,0xef,0x15,
1625c2c66affSColin Finck 0x91,0xe2,0xac,0xf2,0xad,0xfe,0x05,0x9a,0x9f,0x24,0x81,0x75,0x69,0x57,0x51,
1626c2c66affSColin Finck 0xe3,0x2f,0x29,0xad,0x55,0x8b,0xc7,0x25,0xbe,0xcd,0x38,0xa7,0xff,0xdb,0xb0,
1627c2c66affSColin Finck 0x85,0x4e,0x8d,0x56,0x5a,0x79,0xf7,0x7a,0xfb,0x64,0x3d,0x4e,0x04,0x34,0xf7,
1628c2c66affSColin Finck 0x2f,0x7f,0xe3,0x21,0xee,0x8d,0xd3,0xb0,0x26,0x7d,0xb8,0xc3,0xb6,0x0f,0xe2,
1629c2c66affSColin Finck 0x3f,0xb6,0x8a,0x53,0x27,0xc0,0xe1,0xfb,0xd8,0xea,0xfe,0xed,0x80,0x51,0xb6,
1630c2c66affSColin Finck 0x46,0x59,0x65,0x6c,0x34,0x01,0xcc,0x2e,0x50,0xc7,0x4e,0x37,0x83,0x54,0x3f,
1631c2c66affSColin Finck 0x7b,0xa2,0x1d,0x3a };
1632c2c66affSColin Finck static const BYTE chain8_1[] = {
1633c2c66affSColin Finck 0x30,0x82,0x01,0x93,0x30,0x81,0xfd,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,0x01,
1634c2c66affSColin Finck 0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,
1635c2c66affSColin Finck 0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,
1636c2c66affSColin Finck 0x72,0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x31,0x30,0x30,
1637c2c66affSColin Finck 0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x30,0x30,0x31,0x30,0x30,
1638c2c66affSColin Finck 0x30,0x30,0x30,0x30,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,
1639c2c66affSColin Finck 0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,
1640c2c66affSColin Finck 0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,
1641c2c66affSColin Finck 0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5,0x33,
1642c2c66affSColin Finck 0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6,0xdc,
1643c2c66affSColin Finck 0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7,0x48,
1644c2c66affSColin Finck 0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b,0x47,
1645c2c66affSColin Finck 0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b,0x05,
1646c2c66affSColin Finck 0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc,0x6a,
1647c2c66affSColin Finck 0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85,0x85,
1648c2c66affSColin Finck 0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2,0xd3,
1649c2c66affSColin Finck 0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72,0xa3,
1650c2c66affSColin Finck 0x02,0x03,0x01,0x00,0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,
1651c2c66affSColin Finck 0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0x22,0xf1,0x66,0x00,0x79,0xd2,
1652c2c66affSColin Finck 0xe6,0xb2,0xb2,0xf7,0x2f,0x98,0x92,0x7d,0x73,0xc3,0x6c,0x5c,0x77,0x20,0xe3,
1653c2c66affSColin Finck 0xbf,0x3e,0xe0,0xb3,0x5c,0x68,0xb4,0x9b,0x3a,0x41,0xae,0x94,0xa0,0x80,0x3a,
1654c2c66affSColin Finck 0xfe,0x5d,0x7a,0x56,0x87,0x85,0x44,0x45,0xcf,0xa6,0xd3,0x10,0xe7,0x73,0x41,
1655c2c66affSColin Finck 0xf2,0x7f,0x88,0x85,0x91,0x8e,0xe6,0xec,0xe2,0xce,0x08,0xbc,0xa5,0x76,0xe5,
1656c2c66affSColin Finck 0x4d,0x1d,0xb7,0x70,0x31,0xdd,0xc9,0x9a,0x15,0x32,0x11,0x5a,0x4e,0x62,0xc8,
1657c2c66affSColin Finck 0xd1,0xf8,0xec,0x46,0x39,0x5b,0xe7,0x67,0x1f,0x58,0xe8,0xa1,0xa0,0x5b,0xf7,
1658c2c66affSColin Finck 0x8a,0x6d,0x5f,0x91,0x18,0xd4,0x90,0x85,0xff,0x30,0xc7,0xca,0x9c,0xc6,0x92,
1659c2c66affSColin Finck 0xb0,0xca,0x16,0xc4,0xa4,0xc0,0xd6,0xe8,0xff,0x15,0x19,0xd1,0x30,0x61,0xf3,
1660c2c66affSColin Finck 0xef,0x9f };
1661c2c66affSColin Finck static const BYTE chain8_2[] = {
1662c2c66affSColin Finck 0x30,0x82,0x01,0x93,0x30,0x81,0xfd,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,0x01,
1663c2c66affSColin Finck 0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,
1664c2c66affSColin Finck 0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,
1665c2c66affSColin Finck 0x72,0x74,0x32,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x39,0x30,0x31,0x30,0x30,
1666c2c66affSColin Finck 0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,
1667c2c66affSColin Finck 0x35,0x39,0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,
1668c2c66affSColin Finck 0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x33,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,
1669c2c66affSColin Finck 0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,
1670c2c66affSColin Finck 0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xc3,0x31,0x35,0xc3,0x9d,0x8a,0x87,0x20,
1671c2c66affSColin Finck 0xc6,0x32,0xe9,0xb1,0xf6,0x8f,0xf9,0x05,0x73,0x1d,0xa7,0xde,0xab,0x15,0x8a,
1672c2c66affSColin Finck 0x9c,0x7f,0x11,0x7e,0x77,0xa0,0x42,0x80,0xf4,0x79,0xda,0x98,0x7b,0x00,0xfa,
1673c2c66affSColin Finck 0x8f,0x0c,0xd0,0xeb,0x8a,0x80,0xed,0x07,0xfc,0x64,0x71,0x03,0xc1,0xd6,0x2f,
1674c2c66affSColin Finck 0x9b,0xde,0x42,0x63,0xd9,0x79,0xea,0xdd,0x10,0xe8,0x68,0xc8,0x69,0x4f,0x4a,
1675c2c66affSColin Finck 0x39,0x23,0x87,0xca,0xd1,0xc9,0x77,0x14,0x30,0x85,0x9e,0xf7,0x79,0xf9,0x07,
1676c2c66affSColin Finck 0xb7,0x7c,0x55,0xcb,0xa7,0xd5,0xb8,0x44,0xb5,0x20,0xb5,0x01,0x5c,0xa2,0xd1,
1677c2c66affSColin Finck 0xd5,0xad,0x0f,0x87,0xaf,0x37,0xd1,0x39,0x0c,0x0d,0xd5,0xde,0x26,0x7a,0xed,
1678c2c66affSColin Finck 0xf9,0x2a,0xb1,0x60,0x65,0x2d,0x08,0x24,0x51,0x1d,0xb0,0x0a,0xb5,0x13,0xc7,
1679c2c66affSColin Finck 0x02,0x03,0x01,0x00,0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,
1680c2c66affSColin Finck 0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0x33,0x95,0x73,0x7c,0x7c,0xb0,
1681c2c66affSColin Finck 0xbb,0x2b,0xe0,0xc4,0x12,0xf0,0x26,0x85,0x97,0x0c,0x81,0xde,0xc5,0x52,0x04,
1682c2c66affSColin Finck 0xcb,0xee,0x11,0x9a,0x2e,0xa2,0xc4,0x76,0xd5,0x57,0xd1,0x2f,0x2d,0x6f,0x42,
1683c2c66affSColin Finck 0xbf,0x23,0x85,0x59,0x5c,0x96,0x8d,0xef,0xbc,0xb6,0xf5,0xd3,0x66,0x99,0x54,
1684c2c66affSColin Finck 0x95,0x09,0x28,0x0b,0x4f,0x05,0x5f,0x61,0x20,0xa8,0x0d,0x46,0x9a,0xab,0x29,
1685c2c66affSColin Finck 0x97,0x6b,0xa3,0xcd,0xd7,0x5a,0xda,0xaa,0x8e,0xad,0x5a,0x66,0x58,0xf6,0x63,
1686c2c66affSColin Finck 0x76,0x10,0xdc,0xb0,0xee,0x3f,0x82,0x6d,0x29,0xb9,0xcb,0x99,0x15,0xbb,0xb9,
1687c2c66affSColin Finck 0x74,0x73,0x00,0x14,0x74,0x79,0xad,0x89,0x73,0xaa,0xa2,0x0e,0x52,0xe8,0x28,
1688c2c66affSColin Finck 0x69,0xe6,0x8c,0x1e,0xce,0x3a,0x6d,0x85,0x33,0x1e,0x21,0xa3,0x42,0x61,0x3a,
1689c2c66affSColin Finck 0xeb,0x25 };
1690c2c66affSColin Finck /* chain9_0 -> chain7_1:
1691c2c66affSColin Finck  * A cyclic chain.
1692c2c66affSColin Finck  */
1693c2c66affSColin Finck static const BYTE chain9_0[] = {
1694c2c66affSColin Finck 0x30,0x82,0x01,0x93,0x30,0x81,0xfd,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,0x01,
1695c2c66affSColin Finck 0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,
1696c2c66affSColin Finck 0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,
1697c2c66affSColin Finck 0x72,0x74,0x32,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,
1698c2c66affSColin Finck 0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,
1699c2c66affSColin Finck 0x35,0x39,0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,
1700c2c66affSColin Finck 0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,
1701c2c66affSColin Finck 0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,
1702c2c66affSColin Finck 0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,
1703c2c66affSColin Finck 0xca,0x50,0x82,0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,
1704c2c66affSColin Finck 0xc5,0xc3,0x34,0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,
1705c2c66affSColin Finck 0x03,0x7a,0xe7,0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,
1706c2c66affSColin Finck 0xc1,0x33,0x91,0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,
1707c2c66affSColin Finck 0x1b,0x99,0xc5,0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,
1708c2c66affSColin Finck 0x49,0xba,0xcd,0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,
1709c2c66affSColin Finck 0x72,0xb6,0x1c,0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,
1710c2c66affSColin Finck 0x1f,0x2f,0x35,0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,
1711c2c66affSColin Finck 0x02,0x03,0x01,0x00,0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,
1712c2c66affSColin Finck 0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0x2c,0xf5,0x25,0xaa,0xb4,0x63,
1713c2c66affSColin Finck 0x5a,0x5d,0xae,0x7b,0x42,0x79,0xbc,0x41,0x2f,0x8a,0x2a,0x70,0x9f,0x8e,0xb2,
1714c2c66affSColin Finck 0x14,0x1b,0x6f,0xb2,0xf3,0x3e,0xab,0x06,0x9c,0xa8,0x92,0x43,0xc4,0x57,0x63,
1715c2c66affSColin Finck 0xa4,0xee,0x83,0x04,0xab,0xa5,0x2c,0xd9,0x90,0xed,0xc9,0x4d,0xa8,0x7b,0xca,
1716c2c66affSColin Finck 0x3b,0x5f,0xdf,0x46,0xe1,0x3b,0x7f,0x72,0xb7,0x92,0x82,0xe6,0x05,0xc3,0x64,
1717c2c66affSColin Finck 0x38,0xfb,0x86,0x13,0xeb,0x19,0xb6,0x16,0x82,0x63,0x84,0x13,0x04,0x38,0x51,
1718c2c66affSColin Finck 0x4c,0x89,0x12,0xf1,0x13,0x46,0x75,0x4e,0x99,0x46,0xcb,0xc6,0x76,0x9f,0x97,
1719c2c66affSColin Finck 0x9c,0xda,0x63,0x01,0x6a,0x71,0x68,0xc4,0x21,0x67,0xa6,0x51,0x19,0x5e,0xc7,
1720c2c66affSColin Finck 0x8c,0x8d,0x63,0x5c,0xbe,0x04,0x8f,0xad,0xea,0xa5,0xcd,0xc3,0xd6,0x6b,0xc7,
1721c2c66affSColin Finck 0xb5,0x56 };
1722c2c66affSColin Finck /* chain0_0 -+
1723c2c66affSColin Finck  *            +-> chain7_1
1724c2c66affSColin Finck  * chain10_1 -+
1725c2c66affSColin Finck  * A chain with two issuers, only one of whose dates is valid.
1726c2c66affSColin Finck  */
1727c2c66affSColin Finck static const BYTE chain10_1[] = {
1728c2c66affSColin Finck 0x30,0x82,0x01,0x9b,0x30,0x82,0x01,0x08,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,
1729c2c66affSColin Finck 0xbf,0x99,0x4f,0x14,0x03,0x77,0x44,0xb8,0x49,0x02,0x70,0xa1,0xb8,0x9c,0xa7,
1730c2c66affSColin Finck 0x24,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x10,0x31,
1731c2c66affSColin Finck 0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31,
1732c2c66affSColin Finck 0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,
1733c2c66affSColin Finck 0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35,
1734c2c66affSColin Finck 0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,
1735c2c66affSColin Finck 0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,
1736c2c66affSColin Finck 0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,
1737c2c66affSColin Finck 0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82,
1738c2c66affSColin Finck 0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34,
1739c2c66affSColin Finck 0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7,
1740c2c66affSColin Finck 0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91,
1741c2c66affSColin Finck 0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5,
1742c2c66affSColin Finck 0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd,
1743c2c66affSColin Finck 0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c,
1744c2c66affSColin Finck 0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35,
1745c2c66affSColin Finck 0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01,
1746c2c66affSColin Finck 0x00,0x01,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x03,0x81,
1747c2c66affSColin Finck 0x81,0x00,0xa8,0xec,0x8c,0x34,0xe7,0x2c,0xdf,0x75,0x87,0xc4,0xf7,0xda,0x71,
1748c2c66affSColin Finck 0x72,0x29,0xb2,0x48,0xa8,0x2a,0xec,0x7b,0x7d,0x19,0xb9,0x5f,0x1d,0xd9,0x91,
1749c2c66affSColin Finck 0x2b,0xc4,0x28,0x7e,0xd6,0xb5,0x91,0x69,0xa5,0x8a,0x1a,0x1f,0x97,0x98,0x46,
1750c2c66affSColin Finck 0x9d,0xdf,0x12,0xf6,0x45,0x62,0xad,0x60,0xb6,0xba,0xb0,0xfd,0xf5,0x9f,0xc6,
1751c2c66affSColin Finck 0x98,0x05,0x4f,0x4d,0x48,0xdc,0xee,0x69,0xbe,0xb8,0xc4,0xc4,0xd7,0x1b,0xb1,
1752c2c66affSColin Finck 0x1f,0x64,0xd6,0x45,0xa7,0xdb,0xb3,0x87,0x63,0x0f,0x54,0xe1,0x3a,0x6b,0x57,
1753c2c66affSColin Finck 0x36,0xd7,0x68,0x65,0xcf,0xda,0x57,0x8d,0xcd,0x84,0x75,0x47,0x26,0x2c,0xef,
1754c2c66affSColin Finck 0x1e,0x8f,0xc7,0x3b,0xee,0x5d,0x03,0xa6,0xdf,0x3a,0x20,0xb2,0xcc,0xc9,0x09,
1755c2c66affSColin Finck 0x2c,0xfe,0x2b,0x79,0xb0,0xca,0x2c,0x9a,0x81,0x6b };
1756c2c66affSColin Finck /* chain0_0 -+
1757c2c66affSColin Finck  *            +-> chain7_1
1758c2c66affSColin Finck  * chain11_1 -+
1759c2c66affSColin Finck  * A chain with two issuers, only one of whose public keys matches the
1760c2c66affSColin Finck  * signature.
1761c2c66affSColin Finck  */
1762c2c66affSColin Finck static const BYTE chain11_1[] = {
1763c2c66affSColin Finck 0x30,0x82,0x01,0x9b,0x30,0x82,0x01,0x08,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,
1764c2c66affSColin Finck 0x72,0x41,0xa2,0x53,0xd2,0x33,0x0b,0xac,0x4a,0x30,0xfe,0x0a,0xe0,0x2e,0xd4,
1765c2c66affSColin Finck 0x03,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x10,0x31,
1766c2c66affSColin Finck 0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31,
1767c2c66affSColin Finck 0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,
1768c2c66affSColin Finck 0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35,
1769c2c66affSColin Finck 0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,
1770c2c66affSColin Finck 0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,
1771c2c66affSColin Finck 0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,
1772c2c66affSColin Finck 0x02,0x81,0x81,0x00,0xc3,0x31,0x35,0xc3,0x9d,0x8a,0x87,0x20,0xc6,0x32,0xe9,
1773c2c66affSColin Finck 0xb1,0xf6,0x8f,0xf9,0x05,0x73,0x1d,0xa7,0xde,0xab,0x15,0x8a,0x9c,0x7f,0x11,
1774c2c66affSColin Finck 0x7e,0x77,0xa0,0x42,0x80,0xf4,0x79,0xda,0x98,0x7b,0x00,0xfa,0x8f,0x0c,0xd0,
1775c2c66affSColin Finck 0xeb,0x8a,0x80,0xed,0x07,0xfc,0x64,0x71,0x03,0xc1,0xd6,0x2f,0x9b,0xde,0x42,
1776c2c66affSColin Finck 0x63,0xd9,0x79,0xea,0xdd,0x10,0xe8,0x68,0xc8,0x69,0x4f,0x4a,0x39,0x23,0x87,
1777c2c66affSColin Finck 0xca,0xd1,0xc9,0x77,0x14,0x30,0x85,0x9e,0xf7,0x79,0xf9,0x07,0xb7,0x7c,0x55,
1778c2c66affSColin Finck 0xcb,0xa7,0xd5,0xb8,0x44,0xb5,0x20,0xb5,0x01,0x5c,0xa2,0xd1,0xd5,0xad,0x0f,
1779c2c66affSColin Finck 0x87,0xaf,0x37,0xd1,0x39,0x0c,0x0d,0xd5,0xde,0x26,0x7a,0xed,0xf9,0x2a,0xb1,
1780c2c66affSColin Finck 0x60,0x65,0x2d,0x08,0x24,0x51,0x1d,0xb0,0x0a,0xb5,0x13,0xc7,0x02,0x03,0x01,
1781c2c66affSColin Finck 0x00,0x01,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x03,0x81,
1782c2c66affSColin Finck 0x81,0x00,0x51,0x17,0xfb,0x2a,0x69,0x31,0x36,0xa7,0x37,0x2c,0x1f,0x38,0xee,
1783c2c66affSColin Finck 0xe3,0xf1,0xae,0x63,0x61,0xac,0x63,0x13,0xc2,0x3b,0x29,0xca,0xb1,0x8e,0x27,
1784c2c66affSColin Finck 0x41,0xfa,0xb3,0x7d,0x42,0xbe,0xf0,0x9c,0xe0,0xc7,0x69,0xba,0x80,0xf4,0x87,
1785c2c66affSColin Finck 0x7c,0x6f,0x77,0x70,0x6b,0x77,0x7d,0x5c,0x58,0x95,0x07,0xbd,0xac,0xe2,0x5d,
1786c2c66affSColin Finck 0x65,0x12,0xb0,0xae,0xf4,0x01,0x14,0x01,0xba,0xf9,0xa0,0x32,0x10,0xea,0x09,
1787c2c66affSColin Finck 0x12,0xcf,0xf1,0xbc,0x37,0xc9,0x42,0xc3,0x8c,0x9e,0xa2,0xc3,0x5e,0x2e,0x56,
1788c2c66affSColin Finck 0xe9,0xa7,0xd8,0x1c,0x1c,0x8c,0x1c,0x2f,0xd8,0xfb,0x67,0x44,0xd4,0xa3,0x79,
1789c2c66affSColin Finck 0x6d,0x53,0x17,0x56,0x3c,0x3e,0xd0,0x67,0x36,0x0c,0x8b,0x77,0xab,0x40,0xc7,
1790c2c66affSColin Finck 0x27,0xd9,0x44,0x69,0x13,0xeb,0x09,0xec,0x06,0xe2 };
1791c2c66affSColin Finck /* chain12_0 -> chain7_1:
1792c2c66affSColin Finck  * A chain whose root has an invalid signature.
1793c2c66affSColin Finck  */
1794c2c66affSColin Finck static const BYTE chain12_0[] = {
1795c2c66affSColin Finck 0x30,0x82,0x01,0xc2,0x30,0x82,0x01,0x2d,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,
1796c2c66affSColin Finck 0x73,0x87,0xdb,0x32,0x3a,0x6c,0x89,0x74,0x0f,0xda,0x07,0xd4,0x6a,0x2c,0x81,
1797c2c66affSColin Finck 0x59,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30,
1798c2c66affSColin Finck 0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,
1799c2c66affSColin Finck 0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,
1800c2c66affSColin Finck 0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,
1801c2c66affSColin Finck 0x39,0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,
1802c2c66affSColin Finck 0x13,0x05,0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a,
1803c2c66affSColin Finck 0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,
1804c2c66affSColin Finck 0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82,
1805c2c66affSColin Finck 0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34,
1806c2c66affSColin Finck 0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7,
1807c2c66affSColin Finck 0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91,
1808c2c66affSColin Finck 0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5,
1809c2c66affSColin Finck 0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd,
1810c2c66affSColin Finck 0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c,
1811c2c66affSColin Finck 0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35,
1812c2c66affSColin Finck 0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01,
1813c2c66affSColin Finck 0x00,0x01,0xa3,0x23,0x30,0x21,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,
1814c2c66affSColin Finck 0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01,
1815c2c66affSColin Finck 0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x0b,0x06,0x09,0x2a,0x86,
1816c2c66affSColin Finck 0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x03,0x81,0x81,0x00,0x82,0xcd,0x5c,0x0a,
1817c2c66affSColin Finck 0x9d,0x0d,0x3f,0xd1,0xd8,0x74,0xfc,0x52,0x65,0x11,0x76,0x10,0x62,0xb0,0x9a,
1818c2c66affSColin Finck 0xc5,0x54,0x66,0xae,0xfa,0xd5,0x66,0x36,0xcb,0x1e,0xe7,0xad,0xb9,0xfa,0x2e,
1819c2c66affSColin Finck 0xbb,0xb9,0x0b,0x4b,0xbf,0xe7,0x26,0x75,0x2c,0xae,0x2d,0x14,0x84,0x92,0xae,
1820c2c66affSColin Finck 0x56,0xdf,0x55,0x56,0xf3,0xa6,0xc5,0x21,0xa8,0x5e,0xce,0x7a,0x9d,0xff,0x7f,
1821c2c66affSColin Finck 0x10,0xd9,0xc3,0x05,0x52,0x86,0xdc,0x9b,0x46,0xe7,0x69,0xfb,0x1e,0xf0,0x68,
1822c2c66affSColin Finck 0x7d,0x34,0xd7,0xf3,0x56,0xe3,0x0a,0xf3,0xe4,0xdc,0x0f,0xd6,0x4d,0xa8,0xc5,
1823c2c66affSColin Finck 0xb5,0x5b,0xbf,0x0b,0x5d,0xe7,0x76,0xa1,0x56,0xc1,0xa7,0x55,0xa0,0x88,0x7f,
1824c2c66affSColin Finck 0x57,0x8e,0x64,0xda,0x6f,0xaa,0x9c,0xca,0x47,0xf3,0x37,0x08,0x4b,0x9a,0xdc,
1825c2c66affSColin Finck 0xbc,0x65,0x4d,0xff };
1826c2c66affSColin Finck /* chain0_0 -> chain13_1:
1827c2c66affSColin Finck  * A chain whose time validity nesting is invalid.
1828c2c66affSColin Finck  */
1829c2c66affSColin Finck static const BYTE chain13_1[] = {
1830c2c66affSColin Finck 0x30,0x82,0x01,0x93,0x30,0x81,0xfd,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,0x01,
1831c2c66affSColin Finck 0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,
1832c2c66affSColin Finck 0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,
1833c2c66affSColin Finck 0x72,0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x36,0x30,0x31,0x30,0x31,0x30,0x30,
1834c2c66affSColin Finck 0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,
1835c2c66affSColin Finck 0x35,0x39,0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,
1836c2c66affSColin Finck 0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,
1837c2c66affSColin Finck 0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,
1838c2c66affSColin Finck 0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5,0x33,
1839c2c66affSColin Finck 0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6,0xdc,
1840c2c66affSColin Finck 0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7,0x48,
1841c2c66affSColin Finck 0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b,0x47,
1842c2c66affSColin Finck 0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b,0x05,
1843c2c66affSColin Finck 0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc,0x6a,
1844c2c66affSColin Finck 0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85,0x85,
1845c2c66affSColin Finck 0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2,0xd3,
1846c2c66affSColin Finck 0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72,0xa3,
1847c2c66affSColin Finck 0x02,0x03,0x01,0x00,0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,
1848c2c66affSColin Finck 0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0x85,0xc9,0xc5,0x08,0x0b,0xb1,
1849c2c66affSColin Finck 0xff,0x58,0x8f,0xee,0x66,0x5f,0xa3,0x77,0x63,0x9f,0xd1,0x53,0x03,0xdc,0xf6,
1850c2c66affSColin Finck 0x59,0x08,0x02,0x1f,0xdc,0x52,0x5a,0x52,0x38,0xa4,0x0b,0x83,0x12,0x19,0xd6,
1851c2c66affSColin Finck 0xb5,0xb8,0x81,0x17,0xcd,0x10,0x5d,0x96,0x16,0x9d,0x51,0x5b,0xf9,0x31,0x3e,
1852c2c66affSColin Finck 0x36,0xac,0x30,0xd5,0xd6,0xa0,0x30,0x5c,0x9c,0xcb,0xe1,0x02,0xfd,0x73,0xc3,
1853c2c66affSColin Finck 0xa1,0x58,0xfe,0x12,0xb0,0xa6,0xbd,0x11,0x86,0xdb,0x20,0x17,0x29,0x1e,0x09,
1854c2c66affSColin Finck 0x63,0x4d,0x28,0xe4,0x55,0x2d,0xa1,0x78,0xde,0x28,0x0b,0x1b,0x35,0x40,0x4c,
1855c2c66affSColin Finck 0xf1,0xb0,0x6e,0x82,0x34,0x2b,0x7f,0x3b,0x2e,0x27,0x6b,0xf7,0xde,0x73,0x9a,
1856c2c66affSColin Finck 0x98,0xac,0x79,0x33,0x1a,0xdd,0x03,0x95,0x60,0x8a,0x08,0xba,0xcb,0x8a,0xbf,
1857c2c66affSColin Finck 0xea,0xe3 };
1858c2c66affSColin Finck /* chain14_0 -> chain14_1:
1859c2c66affSColin Finck  * A chain whose root is allowed to sign certificates.
1860c2c66affSColin Finck  */
1861c2c66affSColin Finck static const BYTE chain14_0[] = {
1862c2c66affSColin Finck 0x30,0x82,0x01,0xc2,0x30,0x82,0x01,0x2d,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,
1863c2c66affSColin Finck 0xe0,0x3a,0xae,0xb4,0x23,0x65,0x59,0x5c,0x05,0x85,0x76,0x8b,0x8e,0x7f,0xa4,
1864c2c66affSColin Finck 0x12,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30,
1865c2c66affSColin Finck 0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,
1866c2c66affSColin Finck 0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,
1867c2c66affSColin Finck 0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,
1868c2c66affSColin Finck 0x39,0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,
1869c2c66affSColin Finck 0x13,0x05,0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a,
1870c2c66affSColin Finck 0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,
1871c2c66affSColin Finck 0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82,
1872c2c66affSColin Finck 0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34,
1873c2c66affSColin Finck 0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7,
1874c2c66affSColin Finck 0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91,
1875c2c66affSColin Finck 0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5,
1876c2c66affSColin Finck 0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd,
1877c2c66affSColin Finck 0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c,
1878c2c66affSColin Finck 0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35,
1879c2c66affSColin Finck 0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01,
1880c2c66affSColin Finck 0x00,0x01,0xa3,0x23,0x30,0x21,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,
1881c2c66affSColin Finck 0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01,
1882c2c66affSColin Finck 0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x0b,0x06,0x09,0x2a,0x86,
1883c2c66affSColin Finck 0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x03,0x81,0x81,0x00,0x10,0xb9,0x5c,0x13,
1884c2c66affSColin Finck 0x7f,0xe9,0xf3,0x45,0xfb,0x40,0xa2,0x2b,0xe6,0x99,0x5e,0x74,0x9a,0x0b,0x15,
1885c2c66affSColin Finck 0xa0,0x16,0xf2,0xff,0x6e,0xfa,0x92,0x78,0x4f,0x05,0x02,0xbd,0x70,0x4f,0x28,
1886c2c66affSColin Finck 0x6f,0x43,0xc7,0xaa,0xaf,0xb6,0xd1,0x60,0x77,0xc6,0x8a,0x58,0x85,0xf0,0xac,
1887c2c66affSColin Finck 0x04,0x90,0x4a,0x06,0xf0,0x17,0x88,0x12,0x90,0x22,0x65,0x98,0xb1,0x67,0x93,
1888c2c66affSColin Finck 0x8a,0xe6,0x2d,0x54,0x79,0x99,0xd3,0x8c,0xe7,0x86,0xf4,0xec,0x08,0xae,0x18,
1889c2c66affSColin Finck 0xa3,0xa9,0x23,0x7b,0x4f,0x8d,0xde,0xe6,0xf9,0x11,0x92,0xcf,0xe0,0x45,0xc3,
1890c2c66affSColin Finck 0x42,0x72,0x43,0x64,0x07,0x8b,0x7f,0x28,0x11,0x0a,0xea,0xf2,0xbd,0x24,0x1b,
1891c2c66affSColin Finck 0x93,0x5c,0x6f,0xed,0x67,0xae,0xee,0x7e,0x40,0x88,0x8b,0x28,0x2c,0xe7,0xee,
1892c2c66affSColin Finck 0xec,0x34,0xe0,0x7b };
1893c2c66affSColin Finck static const BYTE chain14_1[] = {
1894c2c66affSColin Finck 0x30,0x82,0x01,0x8d,0x30,0x81,0xf9,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,0x01,
1895c2c66affSColin Finck 0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30,0x10,
1896c2c66affSColin Finck 0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,
1897c2c66affSColin Finck 0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,
1898c2c66affSColin Finck 0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,
1899c2c66affSColin Finck 0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,
1900c2c66affSColin Finck 0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a,0x86,
1901c2c66affSColin Finck 0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,0x02,
1902c2c66affSColin Finck 0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5,0x33,0x0e,0x67,0x5f,0x48,
1903c2c66affSColin Finck 0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6,0xdc,0xb6,0x17,0x8e,0x20,
1904c2c66affSColin Finck 0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7,0x48,0x9f,0x6e,0xfe,0xb8,
1905c2c66affSColin Finck 0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b,0x47,0xd1,0x57,0x71,0x3c,
1906c2c66affSColin Finck 0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b,0x05,0x72,0xa7,0x87,0x8e,
1907c2c66affSColin Finck 0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc,0x6a,0x80,0x83,0x68,0x28,
1908c2c66affSColin Finck 0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85,0x85,0xb5,0x46,0x36,0x98,
1909c2c66affSColin Finck 0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2,0xd3,0x51,0x9a,0x22,0x4a,
1910c2c66affSColin Finck 0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72,0xa3,0x02,0x03,0x01,0x00,
1911c2c66affSColin Finck 0x01,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x03,
1912c2c66affSColin Finck 0x81,0x81,0x00,0x63,0x67,0x7f,0x82,0x91,0xe2,0x42,0x45,0x98,0xbc,0xe5,0x03,
1913c2c66affSColin Finck 0x6c,0x7d,0xc9,0xab,0xdb,0x95,0xc4,0x96,0x86,0xfd,0xcf,0xe6,0x32,0x4a,0x0b,
1914c2c66affSColin Finck 0x7c,0x5b,0x76,0x39,0x71,0x26,0x54,0x60,0x1d,0xce,0x4f,0x29,0x22,0x9a,0xb7,
1915c2c66affSColin Finck 0x7d,0x8d,0xfa,0x2c,0x99,0x0d,0xa6,0xa4,0x2e,0xd3,0xf6,0x3e,0xaf,0xea,0x89,
1916c2c66affSColin Finck 0xa0,0x16,0x40,0x0f,0xf1,0x50,0xaa,0x98,0xdc,0xc2,0x69,0x90,0x6f,0xc6,0x4a,
1917c2c66affSColin Finck 0xee,0x26,0x9e,0x5e,0x7d,0x4b,0x06,0x65,0x54,0x15,0x67,0x9e,0xe5,0x1d,0x1c,
1918c2c66affSColin Finck 0x6f,0x0c,0x6e,0x84,0x29,0xf9,0x12,0xe9,0x71,0xdd,0xaf,0x9a,0x3d,0x2a,0xc1,
1919c2c66affSColin Finck 0x60,0xeb,0x27,0xed,0x7c,0xbf,0xc4,0x84,0x17,0xa5,0xa6,0x41,0x29,0x13,0x8d,
1920c2c66affSColin Finck 0x6c,0xdd,0x7c,0x3d,0x01,0x03,0xf8,0x70,0x97,0x3c,0x45 };
1921c2c66affSColin Finck /* chain15_0 -> chain14_1:
1922c2c66affSColin Finck  * A chain whose root is not allowed to sign certificates.
1923c2c66affSColin Finck  */
1924c2c66affSColin Finck static const BYTE chain15_0[] = {
1925c2c66affSColin Finck 0x30,0x82,0x01,0xc2,0x30,0x82,0x01,0x2d,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,
1926c2c66affSColin Finck 0x10,0xb3,0x62,0xed,0xed,0x4a,0x92,0xda,0x74,0x62,0x74,0x48,0x99,0xa5,0xe9,
1927c2c66affSColin Finck 0x0d,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30,
1928c2c66affSColin Finck 0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,
1929c2c66affSColin Finck 0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,
1930c2c66affSColin Finck 0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,
1931c2c66affSColin Finck 0x39,0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,
1932c2c66affSColin Finck 0x13,0x05,0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a,
1933c2c66affSColin Finck 0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,
1934c2c66affSColin Finck 0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82,
1935c2c66affSColin Finck 0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34,
1936c2c66affSColin Finck 0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7,
1937c2c66affSColin Finck 0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91,
1938c2c66affSColin Finck 0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5,
1939c2c66affSColin Finck 0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd,
1940c2c66affSColin Finck 0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c,
1941c2c66affSColin Finck 0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35,
1942c2c66affSColin Finck 0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01,
1943c2c66affSColin Finck 0x00,0x01,0xa3,0x23,0x30,0x21,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,
1944c2c66affSColin Finck 0xff,0x04,0x04,0x03,0x02,0x00,0x00,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01,
1945c2c66affSColin Finck 0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x0b,0x06,0x09,0x2a,0x86,
1946c2c66affSColin Finck 0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x03,0x81,0x81,0x00,0x51,0x48,0x43,0xc9,
1947c2c66affSColin Finck 0xe3,0xb4,0xbc,0xc1,0x1d,0x98,0x14,0x69,0xd9,0xec,0x83,0x4d,0x07,0x70,0x58,
1948c2c66affSColin Finck 0xe9,0x45,0x88,0xe5,0x11,0x4a,0xf0,0x58,0x2d,0x8d,0x08,0x35,0x76,0x0e,0x42,
1949c2c66affSColin Finck 0x9f,0x62,0xda,0xf9,0x71,0x51,0x58,0xc7,0xd3,0x7e,0x88,0x6a,0x92,0xd2,0xfe,
1950c2c66affSColin Finck 0x86,0x4f,0xa2,0x17,0xe3,0xdd,0x9b,0x55,0xe0,0xdc,0xa7,0xe7,0x08,0xe0,0x0a,
1951c2c66affSColin Finck 0xa6,0xf3,0x09,0x17,0x63,0x10,0x89,0xe6,0x07,0x00,0x8e,0x2c,0x44,0x79,0x3e,
1952c2c66affSColin Finck 0x6c,0x51,0x9a,0xa3,0x59,0x17,0x8b,0x90,0xa8,0x82,0x64,0x09,0x77,0x95,0x55,
1953c2c66affSColin Finck 0xd6,0x38,0x43,0x8c,0x66,0xe6,0x7b,0xb9,0xf4,0xe1,0x7b,0x86,0x9b,0x8e,0xe3,
1954c2c66affSColin Finck 0x56,0xc9,0x62,0x62,0x6e,0x3d,0x4d,0x67,0x8d,0x5e,0x20,0xe5,0xd0,0xfa,0xaa,
1955c2c66affSColin Finck 0xbe,0x91,0xa8,0xf1 };
1956c2c66affSColin Finck /* chain0_0 -> chain16_1:
1957c2c66affSColin Finck  * A chain whose end cert has a name constraints extension saying it can't
1958c2c66affSColin Finck  * be a CA, and which also has a key usage extension allowing it to sign
1959c2c66affSColin Finck  * certs.
1960c2c66affSColin Finck  */
1961c2c66affSColin Finck static const BYTE chain16_1[] = {
1962c2c66affSColin Finck 0x30,0x82,0x01,0xb0,0x30,0x82,0x01,0x1b,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,
1963c2c66affSColin Finck 0x01,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30,
1964c2c66affSColin Finck 0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,
1965c2c66affSColin Finck 0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,
1966c2c66affSColin Finck 0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,
1967c2c66affSColin Finck 0x39,0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,
1968c2c66affSColin Finck 0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a,
1969c2c66affSColin Finck 0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,
1970c2c66affSColin Finck 0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5,0x33,0x0e,0x67,0x5f,
1971c2c66affSColin Finck 0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6,0xdc,0xb6,0x17,0x8e,
1972c2c66affSColin Finck 0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7,0x48,0x9f,0x6e,0xfe,
1973c2c66affSColin Finck 0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b,0x47,0xd1,0x57,0x71,
1974c2c66affSColin Finck 0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b,0x05,0x72,0xa7,0x87,
1975c2c66affSColin Finck 0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc,0x6a,0x80,0x83,0x68,
1976c2c66affSColin Finck 0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85,0x85,0xb5,0x46,0x36,
1977c2c66affSColin Finck 0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2,0xd3,0x51,0x9a,0x22,
1978c2c66affSColin Finck 0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72,0xa3,0x02,0x03,0x01,
1979c2c66affSColin Finck 0x00,0x01,0xa3,0x20,0x30,0x1e,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,
1980c2c66affSColin Finck 0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0c,0x06,0x03,0x55,0x1d,0x13,0x01,
1981c2c66affSColin Finck 0x01,0xff,0x04,0x02,0x30,0x00,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,
1982c2c66affSColin Finck 0x0d,0x01,0x01,0x05,0x03,0x81,0x81,0x00,0x47,0xdb,0xb4,0x95,0xb1,0xe2,0x5c,
1983c2c66affSColin Finck 0x03,0x3b,0x28,0x16,0x6b,0xed,0xe9,0x38,0xeb,0x74,0xe6,0xde,0xc5,0xaf,0x93,
1984c2c66affSColin Finck 0xad,0x2e,0xaa,0x29,0x14,0x21,0xae,0xe9,0x7d,0x46,0x18,0x05,0x67,0xad,0x2d,
1985c2c66affSColin Finck 0xaa,0xfa,0xf8,0x41,0xc8,0x8c,0xde,0xe0,0xd7,0x3e,0x9a,0x89,0x58,0x71,0x73,
1986c2c66affSColin Finck 0x57,0xc1,0xd9,0x42,0x51,0xfb,0xaa,0xb8,0x50,0x98,0x9b,0x87,0xb1,0x14,0xa2,
1987c2c66affSColin Finck 0x23,0xa7,0xfc,0x51,0x23,0x97,0x9f,0xef,0x06,0x83,0x63,0x91,0x14,0xc3,0xbe,
1988c2c66affSColin Finck 0xaa,0xc8,0x7c,0x03,0x0e,0x41,0x5a,0x23,0x9c,0x1d,0x32,0x3a,0xa5,0xf1,0x6a,
1989c2c66affSColin Finck 0x56,0x6c,0x36,0xe3,0x3d,0xa1,0xac,0x8e,0x1a,0x75,0x30,0x1c,0xd8,0xbc,0xae,
1990c2c66affSColin Finck 0x3e,0x4a,0x1a,0x05,0xf4,0x09,0x24,0xb2,0x89,0x75,0xa4,0x28,0x78,0x6b,0xfa,
1991c2c66affSColin Finck 0xcc };
1992c2c66affSColin Finck /* chain0_0 -> chain17_1 -> chain17_2:
1993c2c66affSColin Finck  * A root cert, an intermediate cert that's a CA and allowed to sign a cert,
1994c2c66affSColin Finck  * and an end cert.
1995c2c66affSColin Finck  */
1996c2c66affSColin Finck static const BYTE chain17_1[] = {
1997c2c66affSColin Finck 0x30,0x82,0x01,0xb3,0x30,0x82,0x01,0x1e,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,
1998c2c66affSColin Finck 0x01,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30,
1999c2c66affSColin Finck 0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,
2000c2c66affSColin Finck 0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,
2001c2c66affSColin Finck 0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,
2002c2c66affSColin Finck 0x39,0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,
2003c2c66affSColin Finck 0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a,
2004c2c66affSColin Finck 0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,
2005c2c66affSColin Finck 0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5,0x33,0x0e,0x67,0x5f,
2006c2c66affSColin Finck 0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6,0xdc,0xb6,0x17,0x8e,
2007c2c66affSColin Finck 0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7,0x48,0x9f,0x6e,0xfe,
2008c2c66affSColin Finck 0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b,0x47,0xd1,0x57,0x71,
2009c2c66affSColin Finck 0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b,0x05,0x72,0xa7,0x87,
2010c2c66affSColin Finck 0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc,0x6a,0x80,0x83,0x68,
2011c2c66affSColin Finck 0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85,0x85,0xb5,0x46,0x36,
2012c2c66affSColin Finck 0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2,0xd3,0x51,0x9a,0x22,
2013c2c66affSColin Finck 0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72,0xa3,0x02,0x03,0x01,
2014c2c66affSColin Finck 0x00,0x01,0xa3,0x23,0x30,0x21,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,
2015c2c66affSColin Finck 0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01,
2016c2c66affSColin Finck 0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x0b,0x06,0x09,0x2a,0x86,
2017c2c66affSColin Finck 0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x03,0x81,0x81,0x00,0x26,0x56,0x31,0x53,
2018c2c66affSColin Finck 0x65,0xe3,0xd8,0x59,0xc8,0x6f,0xa3,0x5b,0x8a,0x11,0x53,0xde,0x8d,0x6f,0x6d,
2019c2c66affSColin Finck 0x8c,0xe1,0x79,0x25,0xb2,0xbf,0xc6,0x3b,0xa1,0x8b,0x6b,0xcd,0x99,0xcf,0x0c,
2020c2c66affSColin Finck 0x6f,0xaa,0xbc,0xd0,0x3d,0xb2,0xf8,0x1c,0x6f,0xb0,0x84,0x7b,0xb1,0x88,0xec,
2021c2c66affSColin Finck 0xd6,0x77,0xbe,0xb1,0x0b,0x8c,0x18,0x85,0xb7,0x38,0x81,0x12,0xc9,0xc7,0x4a,
2022c2c66affSColin Finck 0xf6,0x83,0xc4,0xd9,0xae,0xb6,0x1d,0xbb,0xd2,0x08,0x01,0x4a,0xe1,0xdc,0x8f,
2023c2c66affSColin Finck 0x67,0xa9,0xed,0xe2,0x3f,0x96,0xf6,0x72,0x7e,0x4a,0x63,0x46,0xc4,0x82,0x89,
2024c2c66affSColin Finck 0x0a,0x81,0xc8,0x3a,0x9c,0xe7,0x23,0x5f,0x8d,0xd9,0x6c,0xb2,0x5d,0x9a,0x40,
2025c2c66affSColin Finck 0x04,0x04,0xd5,0x4a,0x29,0x57,0xbd,0x18,0xd8,0xca,0x1f,0xf7,0xf8,0x23,0x07,
2026c2c66affSColin Finck 0x4b,0x03,0xa3,0xd9 };
2027c2c66affSColin Finck static const BYTE chain17_2[] = {
2028c2c66affSColin Finck 0x30,0x82,0x01,0x8d,0x30,0x81,0xf9,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,0x01,
2029c2c66affSColin Finck 0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30,0x10,
2030c2c66affSColin Finck 0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,
2031c2c66affSColin Finck 0x32,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,
2032c2c66affSColin Finck 0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,
2033c2c66affSColin Finck 0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,
2034c2c66affSColin Finck 0x05,0x43,0x65,0x72,0x74,0x33,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a,0x86,
2035c2c66affSColin Finck 0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,0x02,
2036c2c66affSColin Finck 0x81,0x81,0x00,0xc3,0x31,0x35,0xc3,0x9d,0x8a,0x87,0x20,0xc6,0x32,0xe9,0xb1,
2037c2c66affSColin Finck 0xf6,0x8f,0xf9,0x05,0x73,0x1d,0xa7,0xde,0xab,0x15,0x8a,0x9c,0x7f,0x11,0x7e,
2038c2c66affSColin Finck 0x77,0xa0,0x42,0x80,0xf4,0x79,0xda,0x98,0x7b,0x00,0xfa,0x8f,0x0c,0xd0,0xeb,
2039c2c66affSColin Finck 0x8a,0x80,0xed,0x07,0xfc,0x64,0x71,0x03,0xc1,0xd6,0x2f,0x9b,0xde,0x42,0x63,
2040c2c66affSColin Finck 0xd9,0x79,0xea,0xdd,0x10,0xe8,0x68,0xc8,0x69,0x4f,0x4a,0x39,0x23,0x87,0xca,
2041c2c66affSColin Finck 0xd1,0xc9,0x77,0x14,0x30,0x85,0x9e,0xf7,0x79,0xf9,0x07,0xb7,0x7c,0x55,0xcb,
2042c2c66affSColin Finck 0xa7,0xd5,0xb8,0x44,0xb5,0x20,0xb5,0x01,0x5c,0xa2,0xd1,0xd5,0xad,0x0f,0x87,
2043c2c66affSColin Finck 0xaf,0x37,0xd1,0x39,0x0c,0x0d,0xd5,0xde,0x26,0x7a,0xed,0xf9,0x2a,0xb1,0x60,
2044c2c66affSColin Finck 0x65,0x2d,0x08,0x24,0x51,0x1d,0xb0,0x0a,0xb5,0x13,0xc7,0x02,0x03,0x01,0x00,
2045c2c66affSColin Finck 0x01,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x03,
2046c2c66affSColin Finck 0x81,0x81,0x00,0x5c,0xb5,0x55,0xd7,0x2c,0x70,0xc5,0x6e,0xc0,0x8e,0x30,0x1f,
2047c2c66affSColin Finck 0xf2,0x8e,0x55,0xd6,0xf6,0x95,0xa4,0x51,0xd8,0xf0,0x39,0x98,0x12,0x57,0xa7,
2048c2c66affSColin Finck 0x6d,0x0c,0xfd,0xcb,0x25,0xf1,0xc4,0x73,0x85,0x78,0x82,0x15,0x12,0x08,0xb6,
2049c2c66affSColin Finck 0x05,0x85,0x4f,0x5a,0x59,0x1f,0x03,0xdf,0x04,0xef,0xc2,0xb0,0xee,0xd7,0x73,
2050c2c66affSColin Finck 0x09,0xca,0xbb,0xfb,0xd8,0xec,0x8b,0x39,0x01,0x14,0xc9,0x03,0xc9,0x08,0x4d,
2051c2c66affSColin Finck 0x97,0xc7,0xf2,0x0b,0x54,0x67,0xf7,0x7c,0xc6,0xee,0x74,0xd5,0xa2,0x10,0x3e,
2052c2c66affSColin Finck 0xd9,0x3a,0x7a,0x9d,0xeb,0xeb,0xd8,0x8e,0x43,0x74,0xc3,0xa5,0x3b,0x1a,0x4b,
2053c2c66affSColin Finck 0x8a,0xbc,0x6a,0x2c,0x15,0x4b,0x72,0x0b,0xac,0xa4,0x1a,0x97,0x80,0xf8,0xb1,
2054c2c66affSColin Finck 0xd3,0xd7,0x1a,0xf3,0xf5,0x9f,0x7c,0x4c,0x7d,0x7c,0xc7 };
2055c2c66affSColin Finck /* chain0_0 -> chain18_1 -> chain18_2:
2056c2c66affSColin Finck  * A root, an intermediate CA not allowed to sign certs, and an end cert.
2057c2c66affSColin Finck  */
2058c2c66affSColin Finck static const BYTE chain18_1[] = {
2059c2c66affSColin Finck 0x30,0x82,0x01,0xb3,0x30,0x82,0x01,0x1e,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,
2060c2c66affSColin Finck 0x01,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30,
2061c2c66affSColin Finck 0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,
2062c2c66affSColin Finck 0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,
2063c2c66affSColin Finck 0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,
2064c2c66affSColin Finck 0x39,0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,
2065c2c66affSColin Finck 0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a,
2066c2c66affSColin Finck 0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,
2067c2c66affSColin Finck 0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5,0x33,0x0e,0x67,0x5f,
2068c2c66affSColin Finck 0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6,0xdc,0xb6,0x17,0x8e,
2069c2c66affSColin Finck 0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7,0x48,0x9f,0x6e,0xfe,
2070c2c66affSColin Finck 0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b,0x47,0xd1,0x57,0x71,
2071c2c66affSColin Finck 0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b,0x05,0x72,0xa7,0x87,
2072c2c66affSColin Finck 0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc,0x6a,0x80,0x83,0x68,
2073c2c66affSColin Finck 0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85,0x85,0xb5,0x46,0x36,
2074c2c66affSColin Finck 0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2,0xd3,0x51,0x9a,0x22,
2075c2c66affSColin Finck 0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72,0xa3,0x02,0x03,0x01,
2076c2c66affSColin Finck 0x00,0x01,0xa3,0x23,0x30,0x21,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,
2077c2c66affSColin Finck 0xff,0x04,0x04,0x03,0x02,0x00,0x00,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01,
2078c2c66affSColin Finck 0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x0b,0x06,0x09,0x2a,0x86,
2079c2c66affSColin Finck 0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x03,0x81,0x81,0x00,0x2c,0x49,0x9f,0xc2,
2080c2c66affSColin Finck 0xce,0xf5,0x0d,0x59,0xaa,0xff,0xa0,0x72,0xa7,0xcf,0x4c,0x35,0xc5,0x5e,0x1b,
2081c2c66affSColin Finck 0x32,0xe6,0x46,0x53,0x3e,0x70,0xe6,0xbc,0xa2,0x37,0xe0,0x9d,0x41,0x40,0x12,
2082c2c66affSColin Finck 0x9e,0x81,0x2b,0xd9,0x46,0x3a,0xdc,0xd7,0x37,0xc4,0xbf,0x0f,0x0c,0xf8,0x74,
2083c2c66affSColin Finck 0x7a,0xf9,0x92,0x2d,0xf8,0xfe,0xec,0x17,0xfb,0x38,0x4f,0x83,0x02,0x6f,0x49,
2084c2c66affSColin Finck 0xb4,0xad,0xb2,0x84,0x41,0x13,0x71,0x32,0xee,0x34,0x8d,0xea,0x2b,0x64,0x9b,
2085c2c66affSColin Finck 0x26,0x76,0xe9,0xcc,0xdf,0x73,0xe0,0x84,0xc1,0x8b,0xea,0xfc,0x8c,0x18,0x93,
2086c2c66affSColin Finck 0xfd,0xa3,0x5f,0x8f,0xde,0x05,0x11,0x88,0x62,0x0b,0x03,0x35,0x1a,0xef,0x65,
2087c2c66affSColin Finck 0x82,0x06,0xc8,0xa5,0xf6,0xd2,0x1e,0x46,0xc2,0x86,0xe7,0x26,0x8e,0x9e,0x10,
2088c2c66affSColin Finck 0x33,0xe2,0x89,0x93 };
2089c2c66affSColin Finck static const BYTE chain18_2[] = {
2090c2c66affSColin Finck 0x30,0x82,0x01,0x8d,0x30,0x81,0xf9,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,0x01,
2091c2c66affSColin Finck 0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30,0x10,
2092c2c66affSColin Finck 0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,
2093c2c66affSColin Finck 0x32,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,
2094c2c66affSColin Finck 0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,
2095c2c66affSColin Finck 0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,
2096c2c66affSColin Finck 0x05,0x43,0x65,0x72,0x74,0x33,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a,0x86,
2097c2c66affSColin Finck 0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,0x02,
2098c2c66affSColin Finck 0x81,0x81,0x00,0xc3,0x31,0x35,0xc3,0x9d,0x8a,0x87,0x20,0xc6,0x32,0xe9,0xb1,
2099c2c66affSColin Finck 0xf6,0x8f,0xf9,0x05,0x73,0x1d,0xa7,0xde,0xab,0x15,0x8a,0x9c,0x7f,0x11,0x7e,
2100c2c66affSColin Finck 0x77,0xa0,0x42,0x80,0xf4,0x79,0xda,0x98,0x7b,0x00,0xfa,0x8f,0x0c,0xd0,0xeb,
2101c2c66affSColin Finck 0x8a,0x80,0xed,0x07,0xfc,0x64,0x71,0x03,0xc1,0xd6,0x2f,0x9b,0xde,0x42,0x63,
2102c2c66affSColin Finck 0xd9,0x79,0xea,0xdd,0x10,0xe8,0x68,0xc8,0x69,0x4f,0x4a,0x39,0x23,0x87,0xca,
2103c2c66affSColin Finck 0xd1,0xc9,0x77,0x14,0x30,0x85,0x9e,0xf7,0x79,0xf9,0x07,0xb7,0x7c,0x55,0xcb,
2104c2c66affSColin Finck 0xa7,0xd5,0xb8,0x44,0xb5,0x20,0xb5,0x01,0x5c,0xa2,0xd1,0xd5,0xad,0x0f,0x87,
2105c2c66affSColin Finck 0xaf,0x37,0xd1,0x39,0x0c,0x0d,0xd5,0xde,0x26,0x7a,0xed,0xf9,0x2a,0xb1,0x60,
2106c2c66affSColin Finck 0x65,0x2d,0x08,0x24,0x51,0x1d,0xb0,0x0a,0xb5,0x13,0xc7,0x02,0x03,0x01,0x00,
2107c2c66affSColin Finck 0x01,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x03,
2108c2c66affSColin Finck 0x81,0x81,0x00,0x5c,0xb5,0x55,0xd7,0x2c,0x70,0xc5,0x6e,0xc0,0x8e,0x30,0x1f,
2109c2c66affSColin Finck 0xf2,0x8e,0x55,0xd6,0xf6,0x95,0xa4,0x51,0xd8,0xf0,0x39,0x98,0x12,0x57,0xa7,
2110c2c66affSColin Finck 0x6d,0x0c,0xfd,0xcb,0x25,0xf1,0xc4,0x73,0x85,0x78,0x82,0x15,0x12,0x08,0xb6,
2111c2c66affSColin Finck 0x05,0x85,0x4f,0x5a,0x59,0x1f,0x03,0xdf,0x04,0xef,0xc2,0xb0,0xee,0xd7,0x73,
2112c2c66affSColin Finck 0x09,0xca,0xbb,0xfb,0xd8,0xec,0x8b,0x39,0x01,0x14,0xc9,0x03,0xc9,0x08,0x4d,
2113c2c66affSColin Finck 0x97,0xc7,0xf2,0x0b,0x54,0x67,0xf7,0x7c,0xc6,0xee,0x74,0xd5,0xa2,0x10,0x3e,
2114c2c66affSColin Finck 0xd9,0x3a,0x7a,0x9d,0xeb,0xeb,0xd8,0x8e,0x43,0x74,0xc3,0xa5,0x3b,0x1a,0x4b,
2115c2c66affSColin Finck 0x8a,0xbc,0x6a,0x2c,0x15,0x4b,0x72,0x0b,0xac,0xa4,0x1a,0x97,0x80,0xf8,0xb1,
2116c2c66affSColin Finck 0xd3,0xd7,0x1a,0xf3,0xf5,0x9f,0x7c,0x4c,0x7d,0x7c,0xc7 };
2117c2c66affSColin Finck /* A chain which allows a.com, where the end cert is issued to a.com */
2118c2c66affSColin Finck static const BYTE chain19_0[] = {
2119c2c66affSColin Finck 0x30,0x82,0x01,0xd9,0x30,0x82,0x01,0x46,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,
2120c2c66affSColin Finck 0x22,0xf4,0xa5,0xbe,0xe7,0x5f,0x91,0x89,0x4b,0x10,0x5c,0x86,0x89,0x94,0x36,
2121c2c66affSColin Finck 0xab,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x10,0x31,
2122c2c66affSColin Finck 0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31,
2123c2c66affSColin Finck 0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,
2124c2c66affSColin Finck 0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35,
2125c2c66affSColin Finck 0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,
2126c2c66affSColin Finck 0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,
2127c2c66affSColin Finck 0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,
2128c2c66affSColin Finck 0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82,
2129c2c66affSColin Finck 0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34,
2130c2c66affSColin Finck 0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7,
2131c2c66affSColin Finck 0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91,
2132c2c66affSColin Finck 0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5,
2133c2c66affSColin Finck 0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd,
2134c2c66affSColin Finck 0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c,
2135c2c66affSColin Finck 0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35,
2136c2c66affSColin Finck 0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01,
2137c2c66affSColin Finck 0x00,0x01,0xa3,0x3c,0x30,0x3a,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,
2138c2c66affSColin Finck 0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01,
2139c2c66affSColin Finck 0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x17,0x06,0x03,0x55,0x1d,
2140c2c66affSColin Finck 0x1e,0x01,0x01,0xff,0x04,0x0d,0x30,0x0b,0xa0,0x09,0x30,0x07,0x82,0x05,0x61,
2141c2c66affSColin Finck 0x2e,0x63,0x6f,0x6d,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,
2142c2c66affSColin Finck 0x03,0x81,0x81,0x00,0x19,0x84,0xa8,0xed,0x39,0xb3,0xc0,0x7e,0xc1,0x50,0x50,
2143c2c66affSColin Finck 0xb7,0x4c,0xf2,0xf4,0x16,0xc8,0x2a,0x00,0xc9,0x9e,0x0a,0x77,0x7f,0x65,0xb0,
2144c2c66affSColin Finck 0xe9,0x46,0x88,0x39,0x03,0xd9,0xcc,0x83,0x27,0x22,0xd3,0xec,0x98,0xb3,0x0d,
2145c2c66affSColin Finck 0xf6,0x85,0xe2,0x3f,0x82,0x02,0x96,0xd2,0x9f,0x17,0xcb,0x7c,0x06,0xbb,0xe5,
2146c2c66affSColin Finck 0x58,0x0d,0x9e,0xc3,0x01,0xcd,0xba,0xee,0x26,0x7d,0xc6,0x2b,0x50,0xa7,0xf3,
2147c2c66affSColin Finck 0x9e,0x28,0x87,0xa8,0x9a,0x8b,0x1c,0x73,0x79,0x3e,0xed,0xa0,0xcf,0x70,0xf0,
2148c2c66affSColin Finck 0x53,0x89,0x1f,0xbf,0x0d,0x6b,0x30,0xb1,0x5e,0x16,0x6d,0x57,0x81,0xe9,0xad,
2149c2c66affSColin Finck 0x63,0xe5,0x03,0x50,0x99,0x3d,0xb3,0xad,0x1d,0x9c,0x6b,0x32,0xea,0xc3,0x7f,
2150c2c66affSColin Finck 0x54,0x22,0x89,0x69,0xbf,0x73,0xdc,0x87,0xff,0x4b,0xf1,0xf6 };
2151c2c66affSColin Finck static const BYTE chain19_1[] = {
2152c2c66affSColin Finck 0x30,0x82,0x01,0xaa,0x30,0x82,0x01,0x13,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,
2153c2c66affSColin Finck 0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,
2154c2c66affSColin Finck 0x00,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,
2155c2c66affSColin Finck 0x65,0x72,0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x31,0x30,
2156c2c66affSColin Finck 0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x30,0x30,0x31,0x30,
2157c2c66affSColin Finck 0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,
2158c2c66affSColin Finck 0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9f,0x30,0x0d,0x06,
2159c2c66affSColin Finck 0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,
2160c2c66affSColin Finck 0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5,
2161c2c66affSColin Finck 0x33,0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6,
2162c2c66affSColin Finck 0xdc,0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7,
2163c2c66affSColin Finck 0x48,0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b,
2164c2c66affSColin Finck 0x47,0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b,
2165c2c66affSColin Finck 0x05,0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc,
2166c2c66affSColin Finck 0x6a,0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85,
2167c2c66affSColin Finck 0x85,0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2,
2168c2c66affSColin Finck 0xd3,0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72,
2169c2c66affSColin Finck 0xa3,0x02,0x03,0x01,0x00,0x01,0xa3,0x14,0x30,0x12,0x30,0x10,0x06,0x03,0x55,
2170c2c66affSColin Finck 0x1d,0x07,0x04,0x09,0x30,0x07,0x82,0x05,0x61,0x2e,0x63,0x6f,0x6d,0x30,0x0d,
2171c2c66affSColin Finck 0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x81,
2172c2c66affSColin Finck 0x81,0x00,0x8e,0x1d,0xf5,0xac,0x59,0x8e,0x39,0x7a,0x4d,0x79,0x79,0x68,0xa9,
2173c2c66affSColin Finck 0x13,0x25,0xbf,0x71,0x62,0x73,0x55,0xb0,0x22,0xcb,0x8a,0x22,0xa2,0x4f,0xa3,
2174c2c66affSColin Finck 0xfc,0x22,0xa3,0x2c,0x4c,0xe3,0x95,0xc6,0x97,0xe1,0x97,0xf1,0xee,0xb0,0xb4,
2175c2c66affSColin Finck 0xac,0x7a,0x80,0xe3,0xdd,0x02,0x5a,0x42,0x30,0xe7,0x27,0x0e,0x69,0xff,0x6b,
2176c2c66affSColin Finck 0xb2,0x83,0x7a,0x4f,0xc7,0xaa,0x05,0x95,0xb5,0x18,0x5f,0xa8,0x29,0x97,0x3b,
2177c2c66affSColin Finck 0xf2,0xb8,0x35,0x06,0x1b,0xfe,0xfa,0xa8,0x91,0xc7,0xb7,0x1b,0x8b,0xaa,0xd5,
2178c2c66affSColin Finck 0x23,0x88,0x7f,0xd9,0x88,0x45,0xee,0xd4,0xb9,0xcd,0x36,0xd4,0x5a,0x28,0x86,
2179c2c66affSColin Finck 0x0d,0x92,0x5d,0xcb,0x8c,0xf1,0xd9,0xfb,0xcc,0xa4,0x65,0xda,0x8d,0x6e,0xfd,
2180c2c66affSColin Finck 0x99,0xed,0xf1,0xc6,0x45,0xdf,0x5b,0x1f,0xf5,0xa0 };
2181c2c66affSColin Finck /* A chain which allows a.com, where the end cert is issued to b.com */
2182c2c66affSColin Finck static const BYTE chain20_0[] = {
2183c2c66affSColin Finck 0x30,0x82,0x01,0xd9,0x30,0x82,0x01,0x46,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,
2184c2c66affSColin Finck 0x5e,0xf5,0xbf,0x5a,0x8d,0x92,0xd9,0x8e,0x46,0x09,0xbf,0x50,0x27,0x2f,0xc1,
2185c2c66affSColin Finck 0x4b,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x10,0x31,
2186c2c66affSColin Finck 0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31,
2187c2c66affSColin Finck 0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,
2188c2c66affSColin Finck 0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35,
2189c2c66affSColin Finck 0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,
2190c2c66affSColin Finck 0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,
2191c2c66affSColin Finck 0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,
2192c2c66affSColin Finck 0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82,
2193c2c66affSColin Finck 0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34,
2194c2c66affSColin Finck 0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7,
2195c2c66affSColin Finck 0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91,
2196c2c66affSColin Finck 0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5,
2197c2c66affSColin Finck 0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd,
2198c2c66affSColin Finck 0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c,
2199c2c66affSColin Finck 0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35,
2200c2c66affSColin Finck 0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01,
2201c2c66affSColin Finck 0x00,0x01,0xa3,0x3c,0x30,0x3a,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,
2202c2c66affSColin Finck 0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01,
2203c2c66affSColin Finck 0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x17,0x06,0x03,0x55,0x1d,
2204c2c66affSColin Finck 0x1e,0x01,0x01,0xff,0x04,0x0d,0x30,0x0b,0xa0,0x09,0x30,0x07,0x82,0x05,0x61,
2205c2c66affSColin Finck 0x2e,0x63,0x6f,0x6d,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,
2206c2c66affSColin Finck 0x03,0x81,0x81,0x00,0x4e,0xd8,0x55,0xa5,0x18,0xa8,0xc3,0xc4,0xa2,0xed,0x11,
2207c2c66affSColin Finck 0xff,0x12,0x78,0xbe,0xa5,0xaf,0x6c,0x9f,0xa5,0x94,0x46,0xd3,0x74,0x8e,0x44,
2208c2c66affSColin Finck 0x45,0x9f,0xf2,0xf9,0x0b,0xbe,0x28,0x08,0xf2,0x28,0x4a,0xd5,0x00,0x71,0xb2,
2209c2c66affSColin Finck 0xa5,0x01,0x3b,0x86,0xd6,0x8f,0xb8,0x9a,0xbc,0x8e,0xe4,0x33,0x9e,0xc2,0x5d,
2210c2c66affSColin Finck 0xcc,0x5c,0x24,0x90,0x52,0xbc,0xe6,0x83,0x38,0x77,0xd6,0x25,0x1b,0xfa,0x37,
2211c2c66affSColin Finck 0xc1,0xf6,0x22,0xa7,0xff,0xc6,0x4b,0x16,0x73,0xf5,0xca,0x04,0xad,0xa5,0x71,
2212c2c66affSColin Finck 0xff,0x15,0x5b,0x34,0x84,0xd4,0x45,0xce,0xfb,0xd1,0x76,0x13,0x2f,0x53,0x3e,
2213c2c66affSColin Finck 0x82,0xba,0x2f,0x53,0x82,0x48,0xcb,0x3a,0x77,0xd4,0xb0,0x0f,0xb5,0x38,0x68,
2214c2c66affSColin Finck 0x73,0x3f,0x49,0x60,0x0f,0x61,0x58,0xae,0x25,0xd8,0xe6,0x73 };
2215c2c66affSColin Finck static const BYTE chain20_1[] = {
2216c2c66affSColin Finck 0x30,0x82,0x01,0xaa,0x30,0x82,0x01,0x13,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,
2217c2c66affSColin Finck 0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,
2218c2c66affSColin Finck 0x00,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,
2219c2c66affSColin Finck 0x65,0x72,0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x31,0x30,
2220c2c66affSColin Finck 0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x30,0x30,0x31,0x30,
2221c2c66affSColin Finck 0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,
2222c2c66affSColin Finck 0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9f,0x30,0x0d,0x06,
2223c2c66affSColin Finck 0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,
2224c2c66affSColin Finck 0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5,
2225c2c66affSColin Finck 0x33,0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6,
2226c2c66affSColin Finck 0xdc,0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7,
2227c2c66affSColin Finck 0x48,0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b,
2228c2c66affSColin Finck 0x47,0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b,
2229c2c66affSColin Finck 0x05,0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc,
2230c2c66affSColin Finck 0x6a,0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85,
2231c2c66affSColin Finck 0x85,0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2,
2232c2c66affSColin Finck 0xd3,0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72,
2233c2c66affSColin Finck 0xa3,0x02,0x03,0x01,0x00,0x01,0xa3,0x14,0x30,0x12,0x30,0x10,0x06,0x03,0x55,
2234c2c66affSColin Finck 0x1d,0x07,0x04,0x09,0x30,0x07,0x82,0x05,0x62,0x2e,0x63,0x6f,0x6d,0x30,0x0d,
2235c2c66affSColin Finck 0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x81,
2236c2c66affSColin Finck 0x81,0x00,0x17,0xbb,0xec,0x37,0x4c,0xaf,0x0f,0xb0,0x57,0x04,0x01,0x67,0x69,
2237c2c66affSColin Finck 0x77,0xe4,0x73,0xc4,0x12,0x0a,0xa5,0xfe,0x0c,0x8b,0x89,0x90,0x98,0x0d,0x3b,
2238c2c66affSColin Finck 0x37,0xbe,0xe7,0x7e,0xba,0x84,0x27,0x5f,0xed,0x40,0xc9,0x57,0x91,0x6b,0x72,
2239c2c66affSColin Finck 0xe3,0x4c,0xfa,0x9f,0x6d,0xd5,0xe6,0xf8,0x33,0xa1,0x6e,0xbd,0x5f,0x8d,0xfb,
2240c2c66affSColin Finck 0x8f,0xe6,0xe1,0x6a,0x64,0x51,0x1e,0x3b,0x04,0xe4,0x3b,0xa2,0x49,0x15,0x23,
2241c2c66affSColin Finck 0x35,0x17,0x61,0x4a,0xa6,0x03,0xee,0xa2,0xa6,0x4f,0x42,0x13,0x75,0x14,0xd3,
2242c2c66affSColin Finck 0x87,0x3b,0x71,0x6a,0x2f,0x11,0xcd,0xe6,0xd0,0x63,0xce,0x62,0x8c,0xd9,0x64,
2243c2c66affSColin Finck 0xc0,0xaa,0x53,0x4e,0x5e,0xa2,0x4c,0x6e,0xd0,0x13,0x49,0x2e,0xdf,0x81,0x3a,
2244c2c66affSColin Finck 0x3c,0x67,0xcf,0x4e,0xde,0x95,0x14,0x74,0xa8,0x31 };
2245c2c66affSColin Finck /* A chain which allows A.com, where the end cert is issued to a.COM */
2246c2c66affSColin Finck static const BYTE chain21_0[] = {
2247c2c66affSColin Finck 0x30,0x82,0x01,0xd9,0x30,0x82,0x01,0x46,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,
2248c2c66affSColin Finck 0x66,0xaf,0x57,0xcc,0x4b,0x41,0xd1,0x96,0x40,0xef,0xa4,0xc9,0xe0,0x96,0xad,
2249c2c66affSColin Finck 0x5c,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x10,0x31,
2250c2c66affSColin Finck 0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31,
2251c2c66affSColin Finck 0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,
2252c2c66affSColin Finck 0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35,
2253c2c66affSColin Finck 0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,
2254c2c66affSColin Finck 0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,
2255c2c66affSColin Finck 0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,
2256c2c66affSColin Finck 0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82,
2257c2c66affSColin Finck 0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34,
2258c2c66affSColin Finck 0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7,
2259c2c66affSColin Finck 0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91,
2260c2c66affSColin Finck 0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5,
2261c2c66affSColin Finck 0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd,
2262c2c66affSColin Finck 0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c,
2263c2c66affSColin Finck 0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35,
2264c2c66affSColin Finck 0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01,
2265c2c66affSColin Finck 0x00,0x01,0xa3,0x3c,0x30,0x3a,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,
2266c2c66affSColin Finck 0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01,
2267c2c66affSColin Finck 0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x17,0x06,0x03,0x55,0x1d,
2268c2c66affSColin Finck 0x1e,0x01,0x01,0xff,0x04,0x0d,0x30,0x0b,0xa0,0x09,0x30,0x07,0x82,0x05,0x41,
2269c2c66affSColin Finck 0x2e,0x63,0x6f,0x6d,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,
2270c2c66affSColin Finck 0x03,0x81,0x81,0x00,0x66,0x0e,0x8e,0x3d,0x1b,0xe8,0x51,0x2d,0x5f,0xfa,0xf5,
2271c2c66affSColin Finck 0x01,0xb1,0xf8,0x8e,0x65,0xf6,0xcf,0x63,0x40,0x27,0x20,0x41,0xfc,0xa2,0x97,
2272c2c66affSColin Finck 0x14,0x8d,0x46,0x33,0x3b,0x79,0xc7,0x3d,0xc8,0x1d,0xb3,0xf1,0xf3,0x52,0xfb,
2273c2c66affSColin Finck 0x76,0x55,0x00,0xb9,0x4d,0x89,0x4c,0xfd,0xa9,0xcc,0xa0,0x96,0x86,0x15,0x40,
2274c2c66affSColin Finck 0xfc,0xd2,0x5b,0x60,0xca,0x9c,0x00,0xf8,0x02,0x6a,0x56,0x1c,0x79,0x94,0x01,
2275c2c66affSColin Finck 0x8a,0x60,0x44,0x1a,0x2f,0x34,0x94,0xb6,0xfb,0x00,0xa7,0xd1,0x47,0xd8,0x8f,
2276c2c66affSColin Finck 0xf7,0xf5,0xfc,0xfd,0xeb,0xf7,0xa1,0xab,0xa7,0x38,0x13,0x16,0x50,0x04,0x8e,
2277c2c66affSColin Finck 0xf2,0x17,0x45,0xac,0x10,0x83,0x08,0x1c,0x0d,0xe9,0xa9,0xea,0x4e,0x0e,0x06,
2278c2c66affSColin Finck 0x09,0xca,0xb3,0x54,0xd1,0x44,0x10,0x47,0xac,0xaf,0xbc,0xbb };
2279c2c66affSColin Finck static const BYTE chain21_1[] = {
2280c2c66affSColin Finck 0x30,0x82,0x01,0xaa,0x30,0x82,0x01,0x13,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,
2281c2c66affSColin Finck 0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,
2282c2c66affSColin Finck 0x00,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,
2283c2c66affSColin Finck 0x65,0x72,0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x31,0x30,
2284c2c66affSColin Finck 0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x30,0x30,0x31,0x30,
2285c2c66affSColin Finck 0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,
2286c2c66affSColin Finck 0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9f,0x30,0x0d,0x06,
2287c2c66affSColin Finck 0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,
2288c2c66affSColin Finck 0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5,
2289c2c66affSColin Finck 0x33,0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6,
2290c2c66affSColin Finck 0xdc,0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7,
2291c2c66affSColin Finck 0x48,0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b,
2292c2c66affSColin Finck 0x47,0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b,
2293c2c66affSColin Finck 0x05,0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc,
2294c2c66affSColin Finck 0x6a,0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85,
2295c2c66affSColin Finck 0x85,0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2,
2296c2c66affSColin Finck 0xd3,0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72,
2297c2c66affSColin Finck 0xa3,0x02,0x03,0x01,0x00,0x01,0xa3,0x14,0x30,0x12,0x30,0x10,0x06,0x03,0x55,
2298c2c66affSColin Finck 0x1d,0x07,0x04,0x09,0x30,0x07,0x82,0x05,0x61,0x2e,0x43,0x4f,0x4d,0x30,0x0d,
2299c2c66affSColin Finck 0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x81,
2300c2c66affSColin Finck 0x81,0x00,0x65,0xd5,0xaa,0x17,0x1f,0xa8,0xda,0x62,0x04,0x9d,0xf5,0xe0,0x82,
2301c2c66affSColin Finck 0xe4,0xed,0xc6,0x1b,0x54,0x8f,0xb7,0x46,0xac,0xcd,0xaf,0xaa,0xe3,0xd8,0x4a,
2302c2c66affSColin Finck 0x8b,0xd9,0xe6,0x87,0x4f,0x8c,0xa6,0x86,0x97,0x75,0x08,0x42,0xf1,0xed,0x3e,
2303c2c66affSColin Finck 0x70,0x99,0x13,0xf2,0x00,0xf8,0xcc,0xf4,0x55,0x36,0xf5,0x29,0x97,0x47,0x71,
2304c2c66affSColin Finck 0xb8,0x40,0x8d,0x47,0x03,0xe2,0x66,0x3c,0x00,0x01,0xcc,0xa7,0x39,0xf7,0xf9,
2305c2c66affSColin Finck 0x76,0xfc,0x14,0x31,0x1f,0x6f,0xf0,0x87,0xe0,0x43,0x8b,0xad,0x98,0xa2,0xe3,
2306c2c66affSColin Finck 0xfe,0x49,0xa3,0x1e,0x57,0x34,0xe8,0x61,0x97,0x23,0xc8,0x03,0x05,0xa4,0x2f,
2307c2c66affSColin Finck 0xab,0x49,0x97,0xff,0x3f,0xbf,0x6c,0x08,0x2c,0x6b,0x4d,0x6a,0x54,0x62,0x2e,
2308c2c66affSColin Finck 0x16,0x83,0xac,0xdd,0x21,0x8f,0xe7,0x71,0x12,0x5f };
2309c2c66affSColin Finck /* A chain which allows A.com, where the end cert is issued to b.COM */
2310c2c66affSColin Finck static const BYTE chain22_0[] = {
2311c2c66affSColin Finck 0x30,0x82,0x01,0xd9,0x30,0x82,0x01,0x46,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,
2312c2c66affSColin Finck 0x75,0xff,0x32,0x4c,0x24,0xbb,0x4e,0xb9,0x45,0x70,0xc3,0x4a,0xe1,0xfd,0xdb,
2313c2c66affSColin Finck 0xdc,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x10,0x31,
2314c2c66affSColin Finck 0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31,
2315c2c66affSColin Finck 0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,
2316c2c66affSColin Finck 0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35,
2317c2c66affSColin Finck 0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,
2318c2c66affSColin Finck 0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,
2319c2c66affSColin Finck 0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,
2320c2c66affSColin Finck 0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82,
2321c2c66affSColin Finck 0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34,
2322c2c66affSColin Finck 0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7,
2323c2c66affSColin Finck 0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91,
2324c2c66affSColin Finck 0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5,
2325c2c66affSColin Finck 0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd,
2326c2c66affSColin Finck 0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c,
2327c2c66affSColin Finck 0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35,
2328c2c66affSColin Finck 0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01,
2329c2c66affSColin Finck 0x00,0x01,0xa3,0x3c,0x30,0x3a,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,
2330c2c66affSColin Finck 0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01,
2331c2c66affSColin Finck 0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x17,0x06,0x03,0x55,0x1d,
2332c2c66affSColin Finck 0x1e,0x01,0x01,0xff,0x04,0x0d,0x30,0x0b,0xa0,0x09,0x30,0x07,0x82,0x05,0x41,
2333c2c66affSColin Finck 0x2e,0x63,0x6f,0x6d,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,
2334c2c66affSColin Finck 0x03,0x81,0x81,0x00,0x43,0x9b,0xcf,0x0d,0x31,0x9a,0x33,0x9d,0x7a,0xf8,0x2b,
2335c2c66affSColin Finck 0x5a,0x6f,0x52,0x68,0x25,0x7e,0x14,0x04,0xb1,0x88,0x90,0xa3,0xa8,0x4e,0xa8,
2336c2c66affSColin Finck 0x0c,0xc2,0x06,0x35,0x6c,0xb9,0x07,0x9a,0x28,0xd0,0x54,0xad,0x5f,0xc7,0x5e,
2337c2c66affSColin Finck 0xbf,0x1d,0xde,0x3d,0x76,0x6d,0x32,0x6c,0xc2,0x95,0x26,0x8e,0x6a,0xc5,0xfd,
2338c2c66affSColin Finck 0x45,0x47,0x3a,0x2e,0x81,0x47,0x37,0xf9,0xe3,0xdb,0x57,0xd5,0x24,0xe9,0x10,
2339c2c66affSColin Finck 0x91,0x55,0xbf,0x48,0xaa,0x27,0x7a,0x32,0xc8,0x96,0xbc,0xd8,0x9d,0xb5,0x03,
2340c2c66affSColin Finck 0x6e,0x64,0x50,0xa6,0x9d,0xc2,0xd9,0xdb,0x67,0x8d,0xad,0x76,0x82,0x75,0x42,
2341c2c66affSColin Finck 0x78,0x38,0x3c,0x31,0x55,0x1e,0x8f,0xbb,0x18,0xc9,0xf3,0xa4,0x49,0xc7,0x24,
2342c2c66affSColin Finck 0x1a,0x9b,0xef,0x61,0x03,0x75,0xb7,0x2b,0x8b,0xd4,0x50,0x8b };
2343c2c66affSColin Finck static const BYTE chain22_1[] = {
2344c2c66affSColin Finck 0x30,0x82,0x01,0xaa,0x30,0x82,0x01,0x13,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,
2345c2c66affSColin Finck 0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,
2346c2c66affSColin Finck 0x00,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,
2347c2c66affSColin Finck 0x65,0x72,0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x31,0x30,
2348c2c66affSColin Finck 0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x30,0x30,0x31,0x30,
2349c2c66affSColin Finck 0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,
2350c2c66affSColin Finck 0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9f,0x30,0x0d,0x06,
2351c2c66affSColin Finck 0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,
2352c2c66affSColin Finck 0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5,
2353c2c66affSColin Finck 0x33,0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6,
2354c2c66affSColin Finck 0xdc,0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7,
2355c2c66affSColin Finck 0x48,0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b,
2356c2c66affSColin Finck 0x47,0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b,
2357c2c66affSColin Finck 0x05,0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc,
2358c2c66affSColin Finck 0x6a,0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85,
2359c2c66affSColin Finck 0x85,0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2,
2360c2c66affSColin Finck 0xd3,0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72,
2361c2c66affSColin Finck 0xa3,0x02,0x03,0x01,0x00,0x01,0xa3,0x14,0x30,0x12,0x30,0x10,0x06,0x03,0x55,
2362c2c66affSColin Finck 0x1d,0x07,0x04,0x09,0x30,0x07,0x82,0x05,0x62,0x2e,0x43,0x4f,0x4d,0x30,0x0d,
2363c2c66affSColin Finck 0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x81,
2364c2c66affSColin Finck 0x81,0x00,0x4b,0x4c,0x2f,0x68,0xd2,0x64,0x82,0x7d,0x95,0x1d,0xd0,0x2b,0xa4,
2365c2c66affSColin Finck 0xab,0xc3,0x9d,0xd8,0xc1,0x0f,0xaa,0x3e,0xc6,0xa3,0x11,0x9a,0xc6,0x58,0x40,
2366c2c66affSColin Finck 0x49,0xcc,0x92,0x8e,0xd4,0x0d,0x20,0x81,0x65,0x59,0xca,0x7d,0x54,0xce,0xd4,
2367c2c66affSColin Finck 0x43,0x95,0xb5,0xc3,0x8c,0x79,0x01,0xc6,0x17,0xf8,0x04,0x13,0xf7,0x7c,0xf7,
2368c2c66affSColin Finck 0x7f,0xd7,0xc6,0x62,0x2c,0x21,0x0d,0xab,0x79,0x82,0xd7,0x70,0x9f,0x38,0xba,
2369c2c66affSColin Finck 0x5f,0x2f,0xb4,0xfd,0xe8,0x62,0x40,0xe3,0x69,0xe7,0xc4,0xe5,0x5a,0xc1,0x71,
2370c2c66affSColin Finck 0xc0,0x9a,0xdc,0xcc,0xa6,0x0e,0x5e,0x84,0x27,0x70,0xc3,0x47,0x98,0x72,0x89,
2371c2c66affSColin Finck 0xf9,0x7c,0xe4,0x15,0x4b,0x4c,0xec,0x56,0x1b,0xbf,0x6c,0xf1,0xf7,0x5a,0x76,
2372c2c66affSColin Finck 0x80,0x1f,0x43,0x7c,0xae,0xdb,0xb3,0x49,0xbc,0xcb };
2373c2c66affSColin Finck /* A chain which allows *.com, where the end cert is issued to foo.com */
2374c2c66affSColin Finck static const BYTE chain23_0[] = {
2375c2c66affSColin Finck 0x30,0x82,0x01,0xd9,0x30,0x82,0x01,0x46,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,
2376c2c66affSColin Finck 0x70,0x29,0x25,0xb2,0x21,0xd9,0x44,0x8a,0x4b,0x9d,0xf3,0x4e,0x6b,0xdb,0x7c,
2377c2c66affSColin Finck 0xa7,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x10,0x31,
2378c2c66affSColin Finck 0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31,
2379c2c66affSColin Finck 0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,
2380c2c66affSColin Finck 0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35,
2381c2c66affSColin Finck 0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,
2382c2c66affSColin Finck 0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,
2383c2c66affSColin Finck 0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,
2384c2c66affSColin Finck 0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82,
2385c2c66affSColin Finck 0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34,
2386c2c66affSColin Finck 0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7,
2387c2c66affSColin Finck 0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91,
2388c2c66affSColin Finck 0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5,
2389c2c66affSColin Finck 0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd,
2390c2c66affSColin Finck 0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c,
2391c2c66affSColin Finck 0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35,
2392c2c66affSColin Finck 0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01,
2393c2c66affSColin Finck 0x00,0x01,0xa3,0x3c,0x30,0x3a,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,
2394c2c66affSColin Finck 0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01,
2395c2c66affSColin Finck 0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x17,0x06,0x03,0x55,0x1d,
2396c2c66affSColin Finck 0x1e,0x01,0x01,0xff,0x04,0x0d,0x30,0x0b,0xa0,0x09,0x30,0x07,0x82,0x05,0x2a,
2397c2c66affSColin Finck 0x2e,0x63,0x6f,0x6d,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,
2398c2c66affSColin Finck 0x03,0x81,0x81,0x00,0x39,0x5b,0xf7,0xc9,0x4e,0xac,0x65,0x8b,0x56,0xf4,0xaf,
2399c2c66affSColin Finck 0x23,0xaa,0x1b,0x95,0x0a,0x6e,0x62,0xa8,0x39,0xa0,0xc7,0x86,0x6f,0xb2,0xac,
2400c2c66affSColin Finck 0x45,0xb6,0x99,0x21,0x66,0x48,0x1a,0x7d,0xe9,0xa9,0xfe,0x5c,0xc6,0xa7,0x25,
2401c2c66affSColin Finck 0x89,0x66,0x84,0xc4,0x8e,0x05,0x3b,0x53,0xcf,0xee,0x78,0x88,0x85,0xf1,0x8f,
2402c2c66affSColin Finck 0xce,0x6e,0x72,0xc6,0x0c,0x06,0x3d,0xa6,0x12,0xad,0x0a,0x07,0xbb,0x16,0x2f,
2403c2c66affSColin Finck 0x0c,0x96,0x0c,0x78,0x31,0xfa,0x93,0x5a,0x2d,0x8d,0x02,0xf5,0xb0,0x1c,0x83,
2404c2c66affSColin Finck 0x53,0x14,0xc6,0xa6,0x29,0xa6,0xfe,0xb1,0xc0,0x65,0x72,0x47,0xe9,0xf6,0x01,
2405c2c66affSColin Finck 0x09,0xa4,0xff,0xd2,0x60,0x87,0x81,0xc1,0xb4,0xe7,0xe8,0x3e,0x9a,0xba,0x25,
2406c2c66affSColin Finck 0xb2,0x36,0x50,0xc4,0xf8,0xb1,0x94,0x07,0xba,0xdd,0x6a,0x95 };
2407c2c66affSColin Finck static const BYTE chain23_1[] = {
2408c2c66affSColin Finck 0x30,0x82,0x01,0xac,0x30,0x82,0x01,0x15,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,
2409c2c66affSColin Finck 0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,
2410c2c66affSColin Finck 0x00,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,
2411c2c66affSColin Finck 0x65,0x72,0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x31,0x30,
2412c2c66affSColin Finck 0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x30,0x30,0x31,0x30,
2413c2c66affSColin Finck 0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,
2414c2c66affSColin Finck 0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9f,0x30,0x0d,0x06,
2415c2c66affSColin Finck 0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,
2416c2c66affSColin Finck 0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5,
2417c2c66affSColin Finck 0x33,0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6,
2418c2c66affSColin Finck 0xdc,0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7,
2419c2c66affSColin Finck 0x48,0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b,
2420c2c66affSColin Finck 0x47,0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b,
2421c2c66affSColin Finck 0x05,0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc,
2422c2c66affSColin Finck 0x6a,0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85,
2423c2c66affSColin Finck 0x85,0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2,
2424c2c66affSColin Finck 0xd3,0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72,
2425c2c66affSColin Finck 0xa3,0x02,0x03,0x01,0x00,0x01,0xa3,0x16,0x30,0x14,0x30,0x12,0x06,0x03,0x55,
2426c2c66affSColin Finck 0x1d,0x07,0x04,0x0b,0x30,0x09,0x82,0x07,0x66,0x6f,0x6f,0x2e,0x63,0x6f,0x6d,
2427c2c66affSColin Finck 0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,
2428c2c66affSColin Finck 0x03,0x81,0x81,0x00,0xa5,0xc0,0xf6,0xb1,0x63,0x3a,0x23,0xc5,0xb0,0x07,0xb4,
2429c2c66affSColin Finck 0x83,0xcf,0x36,0xb4,0xfe,0x3c,0xcb,0xa6,0x6b,0xed,0xf7,0x4c,0x25,0x9f,0x2d,
2430c2c66affSColin Finck 0x88,0xcd,0x8a,0xe4,0x88,0xe3,0x33,0xbb,0x50,0x54,0xee,0xc9,0xad,0xed,0x8b,
2431c2c66affSColin Finck 0xec,0x1e,0x64,0x36,0xe8,0xb5,0x51,0xca,0xd3,0xa5,0xb9,0x7a,0x2d,0x4b,0xe7,
2432c2c66affSColin Finck 0xe8,0xc9,0xa5,0x1d,0x49,0xa1,0x31,0x0f,0x50,0x46,0xb0,0x0f,0xd0,0xf6,0xad,
2433c2c66affSColin Finck 0x51,0x18,0x93,0x25,0x8f,0x4f,0x57,0x12,0x72,0x1e,0xa7,0x44,0x37,0x9f,0xf2,
2434c2c66affSColin Finck 0xc0,0x28,0xe8,0xbe,0xb8,0x75,0x42,0xef,0x1d,0x7a,0xca,0x87,0x0c,0x11,0x25,
2435c2c66affSColin Finck 0xeb,0xab,0xcf,0xe0,0xe1,0x12,0x38,0xf6,0x68,0x31,0xfb,0x16,0xcb,0xef,0x67,
2436c2c66affSColin Finck 0x8c,0x4b,0x6b,0xfd,0x69,0xba,0x0b,0x69,0xee,0x74,0xe0,0x73 };
2437c2c66affSColin Finck /* A chain which allows *.com, where the end cert is issued to foo.bar.com */
2438c2c66affSColin Finck static const BYTE chain24_0[] = {
2439c2c66affSColin Finck 0x30,0x82,0x01,0xd9,0x30,0x82,0x01,0x46,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,
2440c2c66affSColin Finck 0x57,0xa6,0x19,0xe0,0x2a,0x65,0x89,0x8d,0x4c,0xd9,0x58,0x8f,0xd0,0xe5,0x5a,
2441c2c66affSColin Finck 0x02,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x10,0x31,
2442c2c66affSColin Finck 0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31,
2443c2c66affSColin Finck 0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,
2444c2c66affSColin Finck 0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35,
2445c2c66affSColin Finck 0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,
2446c2c66affSColin Finck 0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,
2447c2c66affSColin Finck 0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,
2448c2c66affSColin Finck 0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82,
2449c2c66affSColin Finck 0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34,
2450c2c66affSColin Finck 0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7,
2451c2c66affSColin Finck 0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91,
2452c2c66affSColin Finck 0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5,
2453c2c66affSColin Finck 0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd,
2454c2c66affSColin Finck 0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c,
2455c2c66affSColin Finck 0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35,
2456c2c66affSColin Finck 0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01,
2457c2c66affSColin Finck 0x00,0x01,0xa3,0x3c,0x30,0x3a,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,
2458c2c66affSColin Finck 0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01,
2459c2c66affSColin Finck 0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x17,0x06,0x03,0x55,0x1d,
2460c2c66affSColin Finck 0x1e,0x01,0x01,0xff,0x04,0x0d,0x30,0x0b,0xa0,0x09,0x30,0x07,0x82,0x05,0x2a,
2461c2c66affSColin Finck 0x2e,0x63,0x6f,0x6d,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,
2462c2c66affSColin Finck 0x03,0x81,0x81,0x00,0x44,0xec,0x96,0x0c,0x82,0x70,0xd6,0x4f,0xa0,0xa0,0x9e,
2463c2c66affSColin Finck 0x6f,0xfc,0x93,0xcb,0xbb,0x9b,0xb7,0x34,0xf9,0x9c,0x00,0x00,0x7e,0x11,0xeb,
2464c2c66affSColin Finck 0x38,0x85,0x8d,0xc9,0xc5,0x69,0x05,0x8e,0xcd,0x82,0x6c,0xe4,0xe5,0xb8,0x63,
2465c2c66affSColin Finck 0xa6,0x8b,0xe5,0x17,0x9e,0x24,0x67,0x34,0xdd,0x4c,0x62,0xdd,0x08,0xfe,0xdc,
2466c2c66affSColin Finck 0x90,0xe1,0x8e,0x02,0xfe,0xe9,0xc4,0x19,0xfc,0x7d,0xef,0x24,0xcc,0x99,0x9f,
2467c2c66affSColin Finck 0x11,0x81,0x6a,0x4d,0x46,0xc8,0x48,0x73,0xc8,0x52,0x89,0xab,0xc7,0x0d,0x9b,
2468c2c66affSColin Finck 0x77,0xc0,0xbc,0xb5,0x57,0x51,0x2e,0x64,0xad,0x98,0x39,0xd3,0x6d,0xe9,0xe1,
2469c2c66affSColin Finck 0x58,0x32,0x01,0xfa,0xc7,0xa9,0x89,0x58,0x86,0x3c,0x34,0xc3,0x90,0xd6,0xed,
2470c2c66affSColin Finck 0x4a,0xdc,0x23,0x66,0xc5,0xab,0x76,0xb9,0x47,0xc8,0x00,0x4c };
2471c2c66affSColin Finck static const BYTE chain24_1[] = {
2472c2c66affSColin Finck 0x30,0x82,0x01,0xb0,0x30,0x82,0x01,0x19,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,
2473c2c66affSColin Finck 0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,
2474c2c66affSColin Finck 0x00,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,
2475c2c66affSColin Finck 0x65,0x72,0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x31,0x30,
2476c2c66affSColin Finck 0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x30,0x30,0x31,0x30,
2477c2c66affSColin Finck 0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,
2478c2c66affSColin Finck 0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9f,0x30,0x0d,0x06,
2479c2c66affSColin Finck 0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,
2480c2c66affSColin Finck 0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5,
2481c2c66affSColin Finck 0x33,0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6,
2482c2c66affSColin Finck 0xdc,0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7,
2483c2c66affSColin Finck 0x48,0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b,
2484c2c66affSColin Finck 0x47,0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b,
2485c2c66affSColin Finck 0x05,0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc,
2486c2c66affSColin Finck 0x6a,0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85,
2487c2c66affSColin Finck 0x85,0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2,
2488c2c66affSColin Finck 0xd3,0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72,
2489c2c66affSColin Finck 0xa3,0x02,0x03,0x01,0x00,0x01,0xa3,0x1a,0x30,0x18,0x30,0x16,0x06,0x03,0x55,
2490c2c66affSColin Finck 0x1d,0x07,0x04,0x0f,0x30,0x0d,0x82,0x0b,0x66,0x6f,0x6f,0x2e,0x62,0x61,0x72,
2491c2c66affSColin Finck 0x2e,0x63,0x6f,0x6d,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,
2492c2c66affSColin Finck 0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0x28,0x64,0x0b,0xad,0x9f,0x12,0xd4,
2493c2c66affSColin Finck 0x77,0xbe,0x1d,0x20,0x3b,0x69,0x74,0xce,0x91,0x69,0xbe,0x3f,0x76,0x1d,0xe7,
2494c2c66affSColin Finck 0x81,0x92,0x2b,0xdc,0xbb,0xf9,0xd9,0xba,0xf0,0xba,0x58,0x4a,0x9b,0x47,0x59,
2495c2c66affSColin Finck 0x34,0xf7,0x19,0xb5,0x15,0x31,0x35,0x4a,0x6d,0x7b,0x91,0x3d,0xc2,0x6c,0x8f,
2496c2c66affSColin Finck 0x58,0x27,0x0f,0x79,0x96,0x57,0xee,0x4e,0x66,0x3e,0xfa,0x5c,0x22,0xb9,0x57,
2497c2c66affSColin Finck 0xbf,0x8e,0x7e,0xce,0x98,0x62,0x28,0xb1,0x39,0x0e,0x2d,0x7b,0x5d,0x23,0x70,
2498c2c66affSColin Finck 0xf0,0x4a,0x63,0x11,0x66,0x80,0xf9,0x99,0x53,0x80,0xda,0x87,0x87,0xf7,0x3c,
2499c2c66affSColin Finck 0x44,0x76,0x66,0x26,0xa7,0x05,0x3c,0x68,0x66,0x1c,0x07,0x4d,0xcf,0x54,0xaa,
2500c2c66affSColin Finck 0x5d,0xba,0x7a,0x8f,0x06,0xa7,0x1e,0x86,0xf1,0x5a,0x4b,0x50,0x16,0xad,0x9f,
2501c2c66affSColin Finck 0x89 };
2502c2c66affSColin Finck /* A chain which allows f*.com, where the end cert is issued to foo.com */
2503c2c66affSColin Finck static const BYTE chain25_0[] = {
2504c2c66affSColin Finck 0x30,0x82,0x01,0xda,0x30,0x82,0x01,0x47,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,
2505c2c66affSColin Finck 0x58,0x61,0x5e,0xb3,0x52,0x48,0xc2,0xa7,0x4a,0xa4,0x70,0x8a,0x64,0x96,0xac,
2506c2c66affSColin Finck 0xc6,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x10,0x31,
2507c2c66affSColin Finck 0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31,
2508c2c66affSColin Finck 0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,
2509c2c66affSColin Finck 0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35,
2510c2c66affSColin Finck 0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,
2511c2c66affSColin Finck 0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,
2512c2c66affSColin Finck 0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,
2513c2c66affSColin Finck 0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82,
2514c2c66affSColin Finck 0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34,
2515c2c66affSColin Finck 0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7,
2516c2c66affSColin Finck 0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91,
2517c2c66affSColin Finck 0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5,
2518c2c66affSColin Finck 0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd,
2519c2c66affSColin Finck 0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c,
2520c2c66affSColin Finck 0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35,
2521c2c66affSColin Finck 0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01,
2522c2c66affSColin Finck 0x00,0x01,0xa3,0x3d,0x30,0x3b,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,
2523c2c66affSColin Finck 0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01,
2524c2c66affSColin Finck 0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x18,0x06,0x03,0x55,0x1d,
2525c2c66affSColin Finck 0x1e,0x01,0x01,0xff,0x04,0x0e,0x30,0x0c,0xa0,0x0a,0x30,0x08,0x82,0x06,0x66,
2526c2c66affSColin Finck 0x2a,0x2e,0x63,0x6f,0x6d,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,
2527c2c66affSColin Finck 0x00,0x03,0x81,0x81,0x00,0x18,0xb1,0xb1,0x84,0x3c,0x55,0x29,0xfc,0xd0,0xa7,
2528c2c66affSColin Finck 0xcd,0x40,0x88,0x9b,0x35,0x9a,0x14,0xa1,0x34,0xd7,0x20,0xd9,0xfb,0x52,0x2f,
2529c2c66affSColin Finck 0xba,0x6c,0x19,0x5c,0xdc,0x0b,0x0b,0xa5,0x21,0xf9,0x0f,0x98,0x23,0xb6,0xcd,
2530c2c66affSColin Finck 0x36,0x3f,0xed,0xeb,0xf3,0x10,0xbf,0x62,0x33,0xbb,0xb1,0x94,0x79,0x45,0xe4,
2531c2c66affSColin Finck 0x42,0x2b,0x9e,0x32,0x53,0x18,0x19,0x59,0x4d,0xc9,0x2d,0x65,0xa4,0xcb,0xd4,
2532c2c66affSColin Finck 0x0b,0x90,0x2a,0xfe,0xea,0x7f,0x10,0xa9,0xb7,0x65,0xf8,0xc3,0xad,0x26,0x4c,
2533c2c66affSColin Finck 0x29,0x45,0x60,0xce,0x6a,0x63,0x3e,0xa4,0x6f,0x47,0xaf,0x96,0xea,0xc4,0x35,
2534c2c66affSColin Finck 0xb0,0x83,0xd7,0x52,0xa9,0x1a,0xd0,0x9a,0x6d,0xac,0xcf,0x6a,0xa6,0xe8,0x8e,
2535c2c66affSColin Finck 0x52,0x61,0x34,0x95,0xd2,0x22,0x83,0x1f,0x86,0x15,0xa0,0x91,0x2b };
2536c2c66affSColin Finck static const BYTE chain25_1[] = {
2537c2c66affSColin Finck 0x30,0x82,0x01,0xac,0x30,0x82,0x01,0x15,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,
2538c2c66affSColin Finck 0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,
2539c2c66affSColin Finck 0x00,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,
2540c2c66affSColin Finck 0x65,0x72,0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x31,0x30,
2541c2c66affSColin Finck 0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x30,0x30,0x31,0x30,
2542c2c66affSColin Finck 0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,
2543c2c66affSColin Finck 0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9f,0x30,0x0d,0x06,
2544c2c66affSColin Finck 0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,
2545c2c66affSColin Finck 0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5,
2546c2c66affSColin Finck 0x33,0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6,
2547c2c66affSColin Finck 0xdc,0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7,
2548c2c66affSColin Finck 0x48,0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b,
2549c2c66affSColin Finck 0x47,0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b,
2550c2c66affSColin Finck 0x05,0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc,
2551c2c66affSColin Finck 0x6a,0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85,
2552c2c66affSColin Finck 0x85,0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2,
2553c2c66affSColin Finck 0xd3,0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72,
2554c2c66affSColin Finck 0xa3,0x02,0x03,0x01,0x00,0x01,0xa3,0x16,0x30,0x14,0x30,0x12,0x06,0x03,0x55,
2555c2c66affSColin Finck 0x1d,0x07,0x04,0x0b,0x30,0x09,0x82,0x07,0x66,0x6f,0x6f,0x2e,0x63,0x6f,0x6d,
2556c2c66affSColin Finck 0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,
2557c2c66affSColin Finck 0x03,0x81,0x81,0x00,0xa5,0xc0,0xf6,0xb1,0x63,0x3a,0x23,0xc5,0xb0,0x07,0xb4,
2558c2c66affSColin Finck 0x83,0xcf,0x36,0xb4,0xfe,0x3c,0xcb,0xa6,0x6b,0xed,0xf7,0x4c,0x25,0x9f,0x2d,
2559c2c66affSColin Finck 0x88,0xcd,0x8a,0xe4,0x88,0xe3,0x33,0xbb,0x50,0x54,0xee,0xc9,0xad,0xed,0x8b,
2560c2c66affSColin Finck 0xec,0x1e,0x64,0x36,0xe8,0xb5,0x51,0xca,0xd3,0xa5,0xb9,0x7a,0x2d,0x4b,0xe7,
2561c2c66affSColin Finck 0xe8,0xc9,0xa5,0x1d,0x49,0xa1,0x31,0x0f,0x50,0x46,0xb0,0x0f,0xd0,0xf6,0xad,
2562c2c66affSColin Finck 0x51,0x18,0x93,0x25,0x8f,0x4f,0x57,0x12,0x72,0x1e,0xa7,0x44,0x37,0x9f,0xf2,
2563c2c66affSColin Finck 0xc0,0x28,0xe8,0xbe,0xb8,0x75,0x42,0xef,0x1d,0x7a,0xca,0x87,0x0c,0x11,0x25,
2564c2c66affSColin Finck 0xeb,0xab,0xcf,0xe0,0xe1,0x12,0x38,0xf6,0x68,0x31,0xfb,0x16,0xcb,0xef,0x67,
2565c2c66affSColin Finck 0x8c,0x4b,0x6b,0xfd,0x69,0xba,0x0b,0x69,0xee,0x74,0xe0,0x73 };
2566c2c66affSColin Finck /* A chain which allows f*.com, where the end cert is issued to bar.com */
2567c2c66affSColin Finck static const BYTE chain26_0[] = {
2568c2c66affSColin Finck 0x30,0x82,0x01,0xda,0x30,0x82,0x01,0x47,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,
2569c2c66affSColin Finck 0x6f,0x9d,0x2b,0x8a,0x6d,0xf2,0xd4,0x9f,0x42,0xea,0x3d,0x16,0xe8,0xa5,0x80,
2570c2c66affSColin Finck 0x7e,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x10,0x31,
2571c2c66affSColin Finck 0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31,
2572c2c66affSColin Finck 0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,
2573c2c66affSColin Finck 0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35,
2574c2c66affSColin Finck 0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,
2575c2c66affSColin Finck 0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,
2576c2c66affSColin Finck 0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,
2577c2c66affSColin Finck 0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82,
2578c2c66affSColin Finck 0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34,
2579c2c66affSColin Finck 0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7,
2580c2c66affSColin Finck 0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91,
2581c2c66affSColin Finck 0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5,
2582c2c66affSColin Finck 0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd,
2583c2c66affSColin Finck 0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c,
2584c2c66affSColin Finck 0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35,
2585c2c66affSColin Finck 0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01,
2586c2c66affSColin Finck 0x00,0x01,0xa3,0x3d,0x30,0x3b,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,
2587c2c66affSColin Finck 0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01,
2588c2c66affSColin Finck 0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x18,0x06,0x03,0x55,0x1d,
2589c2c66affSColin Finck 0x1e,0x01,0x01,0xff,0x04,0x0e,0x30,0x0c,0xa0,0x0a,0x30,0x08,0x82,0x06,0x66,
2590c2c66affSColin Finck 0x2a,0x2e,0x63,0x6f,0x6d,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,
2591c2c66affSColin Finck 0x00,0x03,0x81,0x81,0x00,0x6c,0x34,0x75,0x37,0xd9,0x65,0x9e,0x20,0x05,0x67,
2592c2c66affSColin Finck 0x16,0x2e,0xc9,0x53,0xc1,0x69,0x53,0xd6,0x00,0x2c,0x92,0x53,0x91,0xa2,0x2a,
2593c2c66affSColin Finck 0x94,0x2c,0xfa,0x6f,0xc1,0x7e,0xee,0x3c,0x22,0x06,0xcc,0xd1,0xdc,0xd7,0x21,
2594c2c66affSColin Finck 0x6a,0xf2,0xd3,0x1b,0xaf,0x34,0x20,0x97,0x0f,0xa1,0xec,0x7f,0x72,0x22,0xf2,
2595c2c66affSColin Finck 0x98,0x5d,0xf4,0x0b,0x83,0x23,0xa7,0x73,0xb2,0xde,0x12,0x56,0xc9,0x11,0xa6,
2596c2c66affSColin Finck 0x5d,0xbc,0x32,0x79,0x41,0x8b,0xe6,0x8c,0x9c,0xf9,0x78,0xd2,0x20,0x96,0x27,
2597c2c66affSColin Finck 0x85,0x41,0xc1,0xb8,0x8a,0x74,0x1e,0xbb,0x27,0xc1,0xf7,0xaf,0xe8,0x1c,0x21,
2598c2c66affSColin Finck 0xe4,0x10,0x64,0x6a,0xdf,0x79,0x30,0x29,0x0e,0x5a,0x04,0x48,0x18,0xdd,0xb0,
2599c2c66affSColin Finck 0xaa,0x43,0x08,0x71,0x2e,0x49,0x9f,0x9b,0xc1,0x1a,0xcc,0x5f,0xee };
2600c2c66affSColin Finck static const BYTE chain26_1[] = {
2601c2c66affSColin Finck 0x30,0x82,0x01,0xac,0x30,0x82,0x01,0x15,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,
2602c2c66affSColin Finck 0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,
2603c2c66affSColin Finck 0x00,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,
2604c2c66affSColin Finck 0x65,0x72,0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x31,0x30,
2605c2c66affSColin Finck 0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x30,0x30,0x31,0x30,
2606c2c66affSColin Finck 0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,
2607c2c66affSColin Finck 0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9f,0x30,0x0d,0x06,
2608c2c66affSColin Finck 0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,
2609c2c66affSColin Finck 0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5,
2610c2c66affSColin Finck 0x33,0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6,
2611c2c66affSColin Finck 0xdc,0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7,
2612c2c66affSColin Finck 0x48,0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b,
2613c2c66affSColin Finck 0x47,0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b,
2614c2c66affSColin Finck 0x05,0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc,
2615c2c66affSColin Finck 0x6a,0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85,
2616c2c66affSColin Finck 0x85,0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2,
2617c2c66affSColin Finck 0xd3,0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72,
2618c2c66affSColin Finck 0xa3,0x02,0x03,0x01,0x00,0x01,0xa3,0x16,0x30,0x14,0x30,0x12,0x06,0x03,0x55,
2619c2c66affSColin Finck 0x1d,0x07,0x04,0x0b,0x30,0x09,0x82,0x07,0x62,0x61,0x72,0x2e,0x63,0x6f,0x6d,
2620c2c66affSColin Finck 0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,
2621c2c66affSColin Finck 0x03,0x81,0x81,0x00,0x47,0xa6,0x37,0x73,0x4f,0x19,0xf9,0xaf,0xa9,0xb5,0xa8,
2622c2c66affSColin Finck 0x41,0x99,0x31,0xa5,0xaa,0x0d,0x6c,0xb8,0x9d,0xe6,0xf6,0x59,0x4d,0xd8,0x12,
2623c2c66affSColin Finck 0x76,0xcc,0x0b,0xaa,0x2f,0x08,0x1c,0x75,0x54,0x5a,0xae,0x09,0x39,0x25,0xfc,
2624c2c66affSColin Finck 0x44,0xa1,0x00,0x24,0x5c,0xec,0x20,0x04,0xc7,0xe9,0x14,0xb0,0x71,0x4a,0x33,
2625c2c66affSColin Finck 0x41,0x7f,0x1d,0x47,0xe5,0x7c,0xe4,0x86,0xb1,0xeb,0xa4,0x9d,0x2a,0x89,0xeb,
2626c2c66affSColin Finck 0x1d,0x15,0xd6,0x42,0x39,0xe4,0x05,0x26,0xbf,0xc2,0x09,0x6c,0x5c,0xd1,0x56,
2627c2c66affSColin Finck 0xfd,0x18,0x42,0xd3,0xd5,0x7c,0x52,0xa8,0x4a,0x77,0xe8,0xc0,0x53,0x2b,0xa6,
2628c2c66affSColin Finck 0x01,0xf9,0x90,0x68,0x60,0x3f,0xcb,0xb8,0x24,0x16,0x0b,0x69,0x4b,0xd9,0xf8,
2629c2c66affSColin Finck 0x2c,0x92,0xed,0x89,0xa5,0xff,0x71,0xc5,0xed,0xe8,0xbc,0x70 };
2630c2c66affSColin Finck /* A chain which allows foo.com, where the end cert is issued to
2631c2c66affSColin Finck  * foo.com\0baddie
2632c2c66affSColin Finck  */
2633c2c66affSColin Finck static const BYTE chain27_0[] = {
2634c2c66affSColin Finck 0x30,0x82,0x01,0xdb,0x30,0x82,0x01,0x48,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,
2635c2c66affSColin Finck 0x3d,0xd2,0x79,0xf1,0xa7,0x1a,0xac,0xb2,0x43,0x5e,0x53,0x67,0xc9,0xa1,0x8c,
2636c2c66affSColin Finck 0x53,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x10,0x31,
2637c2c66affSColin Finck 0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31,
2638c2c66affSColin Finck 0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,
2639c2c66affSColin Finck 0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35,
2640c2c66affSColin Finck 0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,
2641c2c66affSColin Finck 0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,
2642c2c66affSColin Finck 0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,
2643c2c66affSColin Finck 0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82,
2644c2c66affSColin Finck 0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34,
2645c2c66affSColin Finck 0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7,
2646c2c66affSColin Finck 0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91,
2647c2c66affSColin Finck 0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5,
2648c2c66affSColin Finck 0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd,
2649c2c66affSColin Finck 0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c,
2650c2c66affSColin Finck 0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35,
2651c2c66affSColin Finck 0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01,
2652c2c66affSColin Finck 0x00,0x01,0xa3,0x3e,0x30,0x3c,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,
2653c2c66affSColin Finck 0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01,
2654c2c66affSColin Finck 0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x19,0x06,0x03,0x55,0x1d,
2655c2c66affSColin Finck 0x1e,0x01,0x01,0xff,0x04,0x0f,0x30,0x0d,0xa0,0x0b,0x30,0x09,0x82,0x07,0x66,
2656c2c66affSColin Finck 0x6f,0x6f,0x2e,0x63,0x6f,0x6d,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,
2657c2c66affSColin Finck 0x05,0x00,0x03,0x81,0x81,0x00,0x18,0x5d,0xb0,0x42,0x96,0xf7,0x96,0x7b,0x23,
2658c2c66affSColin Finck 0x46,0xa9,0xf4,0x99,0x57,0x27,0x8e,0x24,0xae,0x29,0xb8,0x04,0xe3,0x1b,0x64,
2659c2c66affSColin Finck 0x22,0x8e,0x20,0xf1,0x45,0xb8,0x84,0x38,0x41,0x99,0x73,0xb2,0xbc,0xd9,0xcb,
2660c2c66affSColin Finck 0x9d,0x9f,0xf4,0x86,0xed,0x21,0x34,0x42,0x21,0xf4,0x8f,0xa7,0xcf,0x19,0xe5,
2661c2c66affSColin Finck 0xd3,0x4f,0x7c,0x4f,0xc7,0x9e,0x91,0x3a,0x16,0x0b,0x61,0x9e,0xfa,0x08,0x1b,
2662c2c66affSColin Finck 0x01,0xc0,0x19,0xeb,0xe8,0xd4,0x5a,0xe9,0xe0,0x71,0x04,0xaa,0x88,0x93,0x10,
2663c2c66affSColin Finck 0x3e,0xc5,0x23,0xbe,0x0b,0xab,0xa9,0x07,0x46,0x4d,0x4b,0xf2,0x95,0xeb,0x69,
2664c2c66affSColin Finck 0xf2,0x70,0x33,0x5c,0xf7,0xd1,0xa9,0x5b,0xd2,0x84,0x10,0xa6,0x00,0xbe,0xb5,
2665c2c66affSColin Finck 0xd4,0xe7,0xa3,0x54,0x63,0x3c,0xca,0xb0,0xbf,0x96,0xd1,0x6f,0x64,0xaf };
2666c2c66affSColin Finck static const BYTE chain27_1[] = {
2667c2c66affSColin Finck 0x30,0x82,0x01,0xb3,0x30,0x82,0x01,0x1c,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,
2668c2c66affSColin Finck 0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,
2669c2c66affSColin Finck 0x00,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,
2670c2c66affSColin Finck 0x65,0x72,0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x31,0x30,
2671c2c66affSColin Finck 0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x30,0x30,0x31,0x30,
2672c2c66affSColin Finck 0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,
2673c2c66affSColin Finck 0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9f,0x30,0x0d,0x06,
2674c2c66affSColin Finck 0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,
2675c2c66affSColin Finck 0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5,
2676c2c66affSColin Finck 0x33,0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6,
2677c2c66affSColin Finck 0xdc,0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7,
2678c2c66affSColin Finck 0x48,0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b,
2679c2c66affSColin Finck 0x47,0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b,
2680c2c66affSColin Finck 0x05,0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc,
2681c2c66affSColin Finck 0x6a,0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85,
2682c2c66affSColin Finck 0x85,0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2,
2683c2c66affSColin Finck 0xd3,0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72,
2684c2c66affSColin Finck 0xa3,0x02,0x03,0x01,0x00,0x01,0xa3,0x1d,0x30,0x1b,0x30,0x19,0x06,0x03,0x55,
2685c2c66affSColin Finck 0x1d,0x07,0x04,0x12,0x30,0x10,0x82,0x0e,0x66,0x6f,0x6f,0x2e,0x63,0x6f,0x6d,
2686c2c66affSColin Finck 0x00,0x62,0x61,0x64,0x64,0x69,0x65,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,
2687c2c66affSColin Finck 0xf7,0x0d,0x01,0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0x6f,0x06,0xc6,0xd0,
2688c2c66affSColin Finck 0xa1,0x8c,0xc6,0xed,0x33,0x04,0xf6,0x64,0x81,0xa1,0x0f,0x79,0x4d,0x9a,0xbd,
2689c2c66affSColin Finck 0xc0,0x8f,0x18,0xc2,0xb8,0x82,0xb9,0x70,0x6f,0xbe,0xaa,0xbb,0x43,0x95,0x79,
2690c2c66affSColin Finck 0x58,0xec,0xdf,0x94,0x8b,0x4d,0xe1,0xee,0x56,0xc4,0x57,0x7c,0xff,0xde,0x5f,
2691c2c66affSColin Finck 0x52,0xf9,0x3a,0x9e,0x33,0x99,0x6e,0xdf,0xf2,0xce,0x40,0xc7,0xd8,0xb5,0x86,
2692c2c66affSColin Finck 0xae,0xb7,0x52,0x8b,0xc5,0x62,0x17,0xce,0x03,0x06,0x29,0x5a,0xf6,0x5a,0x9a,
2693c2c66affSColin Finck 0x8e,0xb7,0xe3,0xb2,0xcd,0x3f,0xa7,0x61,0x2b,0xba,0xe6,0x68,0xa8,0x92,0x8a,
2694c2c66affSColin Finck 0xe5,0x32,0xe0,0x49,0xd4,0x42,0xc0,0x1a,0x92,0x72,0xb0,0x66,0x48,0x84,0x74,
2695c2c66affSColin Finck 0xd3,0x25,0xe3,0x66,0x2f,0x30,0xea,0x40,0x72,0x82,0xc4,0xc5,0x4a,0x4e,0xcc,
2696c2c66affSColin Finck 0x32,0xbc,0x36,0xa4 };
2697c2c66affSColin Finck /* A chain which allows foo.*.com, where the end cert is issued to foo.bar.com.
2698c2c66affSColin Finck  */
2699c2c66affSColin Finck static const BYTE chain28_0[] = {
2700c2c66affSColin Finck 0x30,0x82,0x01,0xdd,0x30,0x82,0x01,0x4a,0xa0,0x03,0x02,0x01,0x02,0x02,0x10,
2701c2c66affSColin Finck 0x72,0x7f,0x98,0xcd,0x99,0xa6,0x5f,0x89,0x4a,0x5c,0xd2,0x15,0xd0,0x68,0x25,
2702c2c66affSColin Finck 0xc8,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,0x02,0x1d,0x05,0x00,0x30,0x10,0x31,
2703c2c66affSColin Finck 0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x31,
2704c2c66affSColin Finck 0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x31,0x30,0x31,0x30,0x30,0x30,0x30,0x30,
2705c2c66affSColin Finck 0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,0x35,
2706c2c66affSColin Finck 0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,
2707c2c66affSColin Finck 0x43,0x65,0x72,0x74,0x31,0x30,0x81,0x9f,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,
2708c2c66affSColin Finck 0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,
2709c2c66affSColin Finck 0x02,0x81,0x81,0x00,0xad,0x7e,0xca,0xf3,0xe5,0x99,0xc2,0x2a,0xca,0x50,0x82,
2710c2c66affSColin Finck 0x7c,0x2d,0xa4,0x81,0xcd,0x0d,0x0d,0x86,0xd7,0xd8,0xb2,0xde,0xc5,0xc3,0x34,
2711c2c66affSColin Finck 0x9e,0x07,0x78,0x08,0x11,0x12,0x2d,0x21,0x0a,0x09,0x07,0x14,0x03,0x7a,0xe7,
2712c2c66affSColin Finck 0x3b,0x58,0xf1,0xde,0x3e,0x01,0x25,0x93,0xab,0x8f,0xce,0x1f,0xc1,0x33,0x91,
2713c2c66affSColin Finck 0xfe,0x59,0xb9,0x3b,0x9e,0x95,0x12,0x89,0x8e,0xc3,0x4b,0x98,0x1b,0x99,0xc5,
2714c2c66affSColin Finck 0x07,0xe2,0xdf,0x15,0x4c,0x39,0x76,0x06,0xad,0xdb,0x16,0x06,0x49,0xba,0xcd,
2715c2c66affSColin Finck 0x0f,0x07,0xd6,0xea,0x27,0xa6,0xfe,0x3d,0x88,0xe5,0x97,0x45,0x72,0xb6,0x1c,
2716c2c66affSColin Finck 0xc0,0x1c,0xb1,0xa2,0x89,0xe8,0x37,0x9e,0xf6,0x2a,0xcf,0xd5,0x1f,0x2f,0x35,
2717c2c66affSColin Finck 0x5e,0x8f,0x3a,0x9c,0x61,0xb1,0xf1,0x6c,0xff,0x8c,0xb2,0x2f,0x02,0x03,0x01,
2718c2c66affSColin Finck 0x00,0x01,0xa3,0x40,0x30,0x3e,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,
2719c2c66affSColin Finck 0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01,
2720c2c66affSColin Finck 0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x1b,0x06,0x03,0x55,0x1d,
2721c2c66affSColin Finck 0x1e,0x01,0x01,0xff,0x04,0x11,0x30,0x0f,0xa0,0x0d,0x30,0x0b,0x82,0x09,0x66,
2722c2c66affSColin Finck 0x6f,0x6f,0x2e,0x2a,0x2e,0x63,0x6f,0x6d,0x30,0x09,0x06,0x05,0x2b,0x0e,0x03,
2723c2c66affSColin Finck 0x02,0x1d,0x05,0x00,0x03,0x81,0x81,0x00,0x01,0x9a,0x8c,0x75,0x20,0x9f,0x91,
2724c2c66affSColin Finck 0xe9,0xde,0x28,0x3c,0x7a,0xd9,0xf1,0x2d,0xa3,0x0d,0x66,0x9f,0xd8,0x2a,0xb0,
2725c2c66affSColin Finck 0xb5,0x19,0x9a,0x29,0xc7,0xd5,0xe5,0xf6,0x75,0xee,0x06,0xe4,0xd2,0x71,0x77,
2726c2c66affSColin Finck 0x7e,0xbc,0x1a,0x5f,0xbe,0x28,0xba,0x6e,0x50,0x8e,0xe6,0xd9,0xd5,0x5a,0x21,
2727c2c66affSColin Finck 0xa6,0x29,0xff,0xb0,0xc7,0xfe,0x06,0xb6,0xde,0x51,0x5b,0xab,0xe4,0xbb,0xbf,
2728c2c66affSColin Finck 0xaa,0x03,0xa9,0xfe,0x71,0xb8,0x3f,0x65,0xe2,0x2c,0xa9,0x31,0x18,0x6d,0xe6,
2729c2c66affSColin Finck 0x54,0xd0,0x90,0x6b,0x7b,0x3a,0x9a,0x45,0xa9,0x1b,0x05,0x2e,0xca,0xd7,0x5f,
2730c2c66affSColin Finck 0x79,0x3d,0x1c,0xbf,0xdb,0xce,0x23,0x5d,0x0a,0x9b,0xb4,0x91,0xfe,0xd4,0x94,
2731c2c66affSColin Finck 0x92,0x76,0x36,0xae,0x03,0xb8,0x30,0x13,0x58,0x69,0x71,0xea,0xc2,0xbc,0x31,
2732c2c66affSColin Finck 0x83 };
2733c2c66affSColin Finck static const BYTE chain28_1[] = {
2734c2c66affSColin Finck 0x30,0x82,0x01,0xb0,0x30,0x82,0x01,0x19,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,
2735c2c66affSColin Finck 0x01,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x05,
2736c2c66affSColin Finck 0x00,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,
2737c2c66affSColin Finck 0x65,0x72,0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x31,0x30,
2738c2c66affSColin Finck 0x30,0x30,0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x30,0x30,0x31,0x30,
2739c2c66affSColin Finck 0x30,0x30,0x30,0x30,0x30,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,
2740c2c66affSColin Finck 0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9f,0x30,0x0d,0x06,
2741c2c66affSColin Finck 0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8d,
2742c2c66affSColin Finck 0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5,
2743c2c66affSColin Finck 0x33,0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6,
2744c2c66affSColin Finck 0xdc,0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7,
2745c2c66affSColin Finck 0x48,0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b,
2746c2c66affSColin Finck 0x47,0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b,
2747c2c66affSColin Finck 0x05,0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc,
2748c2c66affSColin Finck 0x6a,0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85,
2749c2c66affSColin Finck 0x85,0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2,
2750c2c66affSColin Finck 0xd3,0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72,
2751c2c66affSColin Finck 0xa3,0x02,0x03,0x01,0x00,0x01,0xa3,0x1a,0x30,0x18,0x30,0x16,0x06,0x03,0x55,
2752c2c66affSColin Finck 0x1d,0x07,0x04,0x0f,0x30,0x0d,0x82,0x0b,0x66,0x6f,0x6f,0x2e,0x62,0x61,0x72,
2753c2c66affSColin Finck 0x2e,0x63,0x6f,0x6d,0x30,0x0d,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,
2754c2c66affSColin Finck 0x01,0x05,0x05,0x00,0x03,0x81,0x81,0x00,0x28,0x64,0x0b,0xad,0x9f,0x12,0xd4,
2755c2c66affSColin Finck 0x77,0xbe,0x1d,0x20,0x3b,0x69,0x74,0xce,0x91,0x69,0xbe,0x3f,0x76,0x1d,0xe7,
2756c2c66affSColin Finck 0x81,0x92,0x2b,0xdc,0xbb,0xf9,0xd9,0xba,0xf0,0xba,0x58,0x4a,0x9b,0x47,0x59,
2757c2c66affSColin Finck 0x34,0xf7,0x19,0xb5,0x15,0x31,0x35,0x4a,0x6d,0x7b,0x91,0x3d,0xc2,0x6c,0x8f,
2758c2c66affSColin Finck 0x58,0x27,0x0f,0x79,0x96,0x57,0xee,0x4e,0x66,0x3e,0xfa,0x5c,0x22,0xb9,0x57,
2759c2c66affSColin Finck 0xbf,0x8e,0x7e,0xce,0x98,0x62,0x28,0xb1,0x39,0x0e,0x2d,0x7b,0x5d,0x23,0x70,
2760c2c66affSColin Finck 0xf0,0x4a,0x63,0x11,0x66,0x80,0xf9,0x99,0x53,0x80,0xda,0x87,0x87,0xf7,0x3c,
2761c2c66affSColin Finck 0x44,0x76,0x66,0x26,0xa7,0x05,0x3c,0x68,0x66,0x1c,0x07,0x4d,0xcf,0x54,0xaa,
2762c2c66affSColin Finck 0x5d,0xba,0x7a,0x8f,0x06,0xa7,0x1e,0x86,0xf1,0x5a,0x4b,0x50,0x16,0xad,0x9f,
2763c2c66affSColin Finck 0x89 };
2764c2c66affSColin Finck /* A chain whose end certificate is issued to *.winehq.org. */
2765c2c66affSColin Finck static const BYTE chain29_1[] = {
2766c2c66affSColin Finck 0x30,0x82,0x01,0xab,0x30,0x82,0x01,0x16,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,
2767c2c66affSColin Finck 0x01,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30,
2768c2c66affSColin Finck 0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,
2769c2c66affSColin Finck 0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x31,0x30,0x30,0x30,
2770c2c66affSColin Finck 0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x30,0x30,0x31,0x30,0x30,0x30,
2771c2c66affSColin Finck 0x30,0x30,0x30,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,
2772c2c66affSColin Finck 0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a,
2773c2c66affSColin Finck 0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,
2774c2c66affSColin Finck 0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5,0x33,0x0e,0x67,0x5f,
2775c2c66affSColin Finck 0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6,0xdc,0xb6,0x17,0x8e,
2776c2c66affSColin Finck 0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7,0x48,0x9f,0x6e,0xfe,
2777c2c66affSColin Finck 0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b,0x47,0xd1,0x57,0x71,
2778c2c66affSColin Finck 0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b,0x05,0x72,0xa7,0x87,
2779c2c66affSColin Finck 0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc,0x6a,0x80,0x83,0x68,
2780c2c66affSColin Finck 0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85,0x85,0xb5,0x46,0x36,
2781c2c66affSColin Finck 0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2,0xd3,0x51,0x9a,0x22,
2782c2c66affSColin Finck 0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72,0xa3,0x02,0x03,0x01,
2783c2c66affSColin Finck 0x00,0x01,0xa3,0x1b,0x30,0x19,0x30,0x17,0x06,0x03,0x55,0x1d,0x07,0x04,0x10,
2784c2c66affSColin Finck 0x30,0x0e,0x82,0x0c,0x2a,0x2e,0x77,0x69,0x6e,0x65,0x68,0x71,0x2e,0x6f,0x72,
2785c2c66affSColin Finck 0x67,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x03,
2786c2c66affSColin Finck 0x81,0x81,0x00,0x65,0xbf,0xfa,0xf7,0xc3,0x09,0x70,0x25,0x8a,0x46,0x69,0xf6,
2787c2c66affSColin Finck 0xdc,0x07,0x1e,0x30,0xc9,0xe4,0x58,0x89,0x65,0x3a,0xa8,0xda,0xbd,0x17,0xf8,
2788c2c66affSColin Finck 0x1d,0x0d,0x7d,0x47,0xb1,0xb2,0xda,0x17,0x9f,0xf6,0x47,0xe0,0xe4,0x4a,0xeb,
2789c2c66affSColin Finck 0x02,0xc9,0x2e,0x69,0x1c,0x57,0x2a,0x80,0xc9,0x01,0x77,0x7b,0x27,0xff,0x2f,
2790c2c66affSColin Finck 0xaf,0xdf,0xf3,0x65,0x12,0xd8,0x7d,0xc2,0xbf,0x1b,0x1d,0x18,0x96,0x5c,0xf6,
2791c2c66affSColin Finck 0xba,0x43,0xc5,0x43,0x57,0xc0,0xdd,0x97,0x95,0xfb,0x1c,0xad,0x64,0x0f,0x61,
2792c2c66affSColin Finck 0x3a,0xe9,0x27,0xa4,0x57,0x27,0x34,0xa7,0x42,0xde,0x78,0x1a,0x71,0x80,0x23,
2793c2c66affSColin Finck 0xd6,0xd7,0x22,0xf0,0x24,0x0d,0x71,0xf1,0x2b,0xd0,0xd8,0x76,0x3d,0xef,0x4c,
2794c2c66affSColin Finck 0xce,0x1c,0x3b,0x83,0x1b,0x63,0x10,0x6c,0x63,0xe5,0x69 };
2795c2c66affSColin Finck /* chain0_0 -> chain30_1 -> chain30_2
2796c2c66affSColin Finck  * A chain whose intermediate certificate has an unsupported critical
2797c2c66affSColin Finck  * extension.
2798c2c66affSColin Finck  */
2799c2c66affSColin Finck static const BYTE chain30_1[] = {
2800c2c66affSColin Finck 0x30,0x82,0x01,0xc0,0x30,0x82,0x01,0x2b,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,
2801c2c66affSColin Finck 0x01,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30,
2802c2c66affSColin Finck 0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,
2803c2c66affSColin Finck 0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x31,0x30,0x30,0x30,
2804c2c66affSColin Finck 0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x30,0x30,0x31,0x30,0x30,0x30,
2805c2c66affSColin Finck 0x30,0x30,0x30,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,
2806c2c66affSColin Finck 0x13,0x05,0x43,0x65,0x72,0x74,0x32,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a,
2807c2c66affSColin Finck 0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,
2808c2c66affSColin Finck 0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,0xe5,0x33,0x0e,0x67,0x5f,
2809c2c66affSColin Finck 0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,0xc6,0xdc,0xb6,0x17,0x8e,
2810c2c66affSColin Finck 0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,0xa7,0x48,0x9f,0x6e,0xfe,
2811c2c66affSColin Finck 0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,0x8b,0x47,0xd1,0x57,0x71,
2812c2c66affSColin Finck 0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,0x6b,0x05,0x72,0xa7,0x87,
2813c2c66affSColin Finck 0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,0xfc,0x6a,0x80,0x83,0x68,
2814c2c66affSColin Finck 0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,0x85,0x85,0xb5,0x46,0x36,
2815c2c66affSColin Finck 0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,0xb2,0xd3,0x51,0x9a,0x22,
2816c2c66affSColin Finck 0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,0x72,0xa3,0x02,0x03,0x01,
2817c2c66affSColin Finck 0x00,0x01,0xa3,0x30,0x30,0x2e,0x30,0x0e,0x06,0x03,0x55,0x1d,0x0f,0x01,0x01,
2818c2c66affSColin Finck 0xff,0x04,0x04,0x03,0x02,0x00,0x04,0x30,0x0f,0x06,0x03,0x55,0x1d,0x13,0x01,
2819c2c66affSColin Finck 0x01,0xff,0x04,0x05,0x30,0x03,0x01,0x01,0xff,0x30,0x0b,0x06,0x02,0x2a,0x03,
2820c2c66affSColin Finck 0x01,0x01,0xff,0x04,0x02,0x30,0x00,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,
2821c2c66affSColin Finck 0xf7,0x0d,0x01,0x01,0x05,0x03,0x81,0x81,0x00,0x51,0x3e,0x35,0x1b,0x66,0x3c,
2822c2c66affSColin Finck 0xca,0x5e,0xf3,0xf9,0x1b,0xd5,0x03,0x13,0xf8,0xcf,0x87,0xdf,0xed,0x75,0xa6,
2823c2c66affSColin Finck 0xcd,0x4b,0x1c,0x15,0xd3,0xd8,0x58,0x85,0x85,0x2c,0x64,0x31,0xbd,0xbb,0xad,
2824c2c66affSColin Finck 0xff,0x38,0x64,0xc5,0x16,0x43,0x14,0x0e,0x71,0x35,0xf3,0xe9,0xca,0xf9,0xf4,
2825c2c66affSColin Finck 0x69,0xa7,0x67,0xa8,0x0f,0xc9,0xcf,0x6f,0x22,0xe5,0x39,0xb8,0xfc,0xe7,0x50,
2826c2c66affSColin Finck 0x82,0xf7,0xa4,0xaa,0x29,0xe1,0xa9,0xb5,0x03,0x5e,0x0b,0x5f,0x9c,0x8e,0x29,
2827c2c66affSColin Finck 0x64,0xe5,0xb6,0xed,0xde,0x04,0x0e,0xdb,0xad,0xa3,0xc6,0x2a,0xb0,0x12,0x86,
2828c2c66affSColin Finck 0x60,0xd4,0xff,0xd8,0xea,0x85,0x54,0x34,0xca,0xc1,0x85,0x4e,0xb5,0x15,0x96,
2829c2c66affSColin Finck 0xb7,0xa5,0x64,0x7b,0xc7,0x76,0xcb,0x04,0x75,0x9e,0x1e,0xbd,0x62,0x79,0xc5,
2830c2c66affSColin Finck 0x1f,0x32 };
2831c2c66affSColin Finck static const BYTE chain30_2[] = {
2832c2c66affSColin Finck 0x30,0x82,0x01,0x8d,0x30,0x81,0xf9,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,0x01,
2833c2c66affSColin Finck 0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30,0x10,
2834c2c66affSColin Finck 0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,0x74,
2835c2c66affSColin Finck 0x32,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x39,0x30,0x31,0x30,0x30,0x30,0x30,
2836c2c66affSColin Finck 0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x32,0x33,0x31,0x32,0x33,0x35,0x39,
2837c2c66affSColin Finck 0x35,0x39,0x5a,0x30,0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,
2838c2c66affSColin Finck 0x05,0x43,0x65,0x72,0x74,0x33,0x30,0x81,0x9d,0x30,0x0b,0x06,0x09,0x2a,0x86,
2839c2c66affSColin Finck 0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,0x8d,0x00,0x30,0x81,0x89,0x02,
2840c2c66affSColin Finck 0x81,0x81,0x00,0xc3,0x31,0x35,0xc3,0x9d,0x8a,0x87,0x20,0xc6,0x32,0xe9,0xb1,
2841c2c66affSColin Finck 0xf6,0x8f,0xf9,0x05,0x73,0x1d,0xa7,0xde,0xab,0x15,0x8a,0x9c,0x7f,0x11,0x7e,
2842c2c66affSColin Finck 0x77,0xa0,0x42,0x80,0xf4,0x79,0xda,0x98,0x7b,0x00,0xfa,0x8f,0x0c,0xd0,0xeb,
2843c2c66affSColin Finck 0x8a,0x80,0xed,0x07,0xfc,0x64,0x71,0x03,0xc1,0xd6,0x2f,0x9b,0xde,0x42,0x63,
2844c2c66affSColin Finck 0xd9,0x79,0xea,0xdd,0x10,0xe8,0x68,0xc8,0x69,0x4f,0x4a,0x39,0x23,0x87,0xca,
2845c2c66affSColin Finck 0xd1,0xc9,0x77,0x14,0x30,0x85,0x9e,0xf7,0x79,0xf9,0x07,0xb7,0x7c,0x55,0xcb,
2846c2c66affSColin Finck 0xa7,0xd5,0xb8,0x44,0xb5,0x20,0xb5,0x01,0x5c,0xa2,0xd1,0xd5,0xad,0x0f,0x87,
2847c2c66affSColin Finck 0xaf,0x37,0xd1,0x39,0x0c,0x0d,0xd5,0xde,0x26,0x7a,0xed,0xf9,0x2a,0xb1,0x60,
2848c2c66affSColin Finck 0x65,0x2d,0x08,0x24,0x51,0x1d,0xb0,0x0a,0xb5,0x13,0xc7,0x02,0x03,0x01,0x00,
2849c2c66affSColin Finck 0x01,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x03,
2850c2c66affSColin Finck 0x81,0x81,0x00,0x14,0x75,0x85,0xcc,0x68,0xfe,0x98,0x6f,0xf6,0x67,0x00,0x5b,
2851c2c66affSColin Finck 0x0c,0xfc,0x36,0x18,0xf4,0x56,0x46,0x7c,0xb9,0xfa,0x6c,0xe6,0x37,0xaf,0x69,
2852c2c66affSColin Finck 0x37,0x93,0x8c,0x35,0x3a,0x1b,0x58,0x2f,0xe2,0x06,0x39,0x85,0x3f,0x73,0xcf,
2853c2c66affSColin Finck 0xe1,0x3f,0x27,0x19,0x60,0xc3,0x1b,0xf6,0x69,0x3b,0x8e,0x57,0x7b,0xd8,0xb9,
2854c2c66affSColin Finck 0xc6,0x9f,0x13,0x72,0x22,0x04,0x8f,0x5c,0x54,0x13,0x8c,0x63,0xe3,0x6b,0x70,
2855c2c66affSColin Finck 0x98,0xec,0xcc,0xe1,0x93,0xb1,0x4b,0x30,0x4c,0xde,0xe8,0x3c,0x68,0x38,0x44,
2856c2c66affSColin Finck 0x5e,0xe2,0x2b,0xf5,0xa1,0xee,0x02,0x7e,0x09,0x15,0xff,0xc9,0xf6,0xaf,0xf5,
2857c2c66affSColin Finck 0xcc,0xeb,0xfc,0xe7,0x3c,0x92,0xdb,0x31,0xab,0x1e,0xb8,0x9e,0xf0,0x5e,0xa3,
2858c2c66affSColin Finck 0x93,0xfe,0xab,0x26,0x7b,0x01,0xa8,0x98,0x88,0xbb,0xee };
2859c2c66affSColin Finck /* chain0_0 -> chain31_1: a chain whose end certificate has two CNs, a
2860c2c66affSColin Finck  * wildcard name "*.foo.com" and a non-wildcard name "foo.com".
2861c2c66affSColin Finck  */
2862c2c66affSColin Finck static const BYTE chain31_1[] = {
2863c2c66affSColin Finck 0x30,0x82,0x01,0xa2,0x30,0x82,0x01,0x0d,0xa0,0x03,0x02,0x01,0x02,0x02,0x01,
2864c2c66affSColin Finck 0x01,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x05,0x30,
2865c2c66affSColin Finck 0x10,0x31,0x0e,0x30,0x0c,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x43,0x65,0x72,
2866c2c66affSColin Finck 0x74,0x31,0x30,0x1e,0x17,0x0d,0x30,0x37,0x30,0x35,0x30,0x31,0x30,0x30,0x30,
2867c2c66affSColin Finck 0x30,0x30,0x30,0x5a,0x17,0x0d,0x30,0x37,0x31,0x30,0x30,0x31,0x30,0x30,0x30,
2868c2c66affSColin Finck 0x30,0x30,0x30,0x5a,0x30,0x24,0x31,0x22,0x30,0x0e,0x06,0x03,0x55,0x04,0x03,
2869c2c66affSColin Finck 0x13,0x07,0x66,0x6f,0x6f,0x2e,0x63,0x6f,0x6d,0x30,0x10,0x06,0x03,0x55,0x04,
2870c2c66affSColin Finck 0x03,0x13,0x09,0x2a,0x2e,0x66,0x6f,0x6f,0x2e,0x63,0x6f,0x6d,0x30,0x81,0x9d,
2871c2c66affSColin Finck 0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,0xf7,0x0d,0x01,0x01,0x01,0x03,0x81,
2872c2c66affSColin Finck 0x8d,0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xb8,0x52,0xda,0xc5,0x4b,0x3f,
2873c2c66affSColin Finck 0xe5,0x33,0x0e,0x67,0x5f,0x48,0x21,0xdc,0x7e,0xef,0x37,0x33,0xba,0xff,0xb4,
2874c2c66affSColin Finck 0xc6,0xdc,0xb6,0x17,0x8e,0x20,0x55,0x07,0x12,0xd2,0x7b,0x3c,0xce,0x30,0xc5,
2875c2c66affSColin Finck 0xa7,0x48,0x9f,0x6e,0xfe,0xb8,0xbe,0xdb,0x9f,0x9b,0x17,0x60,0x16,0xde,0xc6,
2876c2c66affSColin Finck 0x8b,0x47,0xd1,0x57,0x71,0x3c,0x93,0xfc,0xbd,0xec,0x44,0x32,0x3b,0xb9,0xcf,
2877c2c66affSColin Finck 0x6b,0x05,0x72,0xa7,0x87,0x8e,0x7e,0xd4,0x9a,0x87,0x1c,0x2f,0xb7,0x82,0x40,
2878c2c66affSColin Finck 0xfc,0x6a,0x80,0x83,0x68,0x28,0xce,0x84,0xf4,0x0b,0x2e,0x44,0xcb,0x53,0xac,
2879c2c66affSColin Finck 0x85,0x85,0xb5,0x46,0x36,0x98,0x3c,0x10,0x02,0xaa,0x02,0xbc,0x8b,0xa2,0x23,
2880c2c66affSColin Finck 0xb2,0xd3,0x51,0x9a,0x22,0x4a,0xe3,0xaa,0x4e,0x7c,0xda,0x38,0xcf,0x49,0x98,
2881c2c66affSColin Finck 0x72,0xa3,0x02,0x03,0x01,0x00,0x01,0x30,0x0b,0x06,0x09,0x2a,0x86,0x48,0x86,
2882c2c66affSColin Finck 0xf7,0x0d,0x01,0x01,0x05,0x03,0x81,0x81,0x00,0xa0,0x93,0x52,0x87,0x81,0xe2,
2883c2c66affSColin Finck 0xff,0x2a,0xc7,0xef,0x5f,0x3c,0xbc,0x88,0x99,0xc0,0x47,0x3e,0x13,0xe9,0x87,
2884c2c66affSColin Finck 0xfa,0x36,0xd7,0xb5,0xe8,0xdf,0x70,0xcc,0x36,0xe4,0x70,0x3c,0xcd,0xa2,0x0b,
2885c2c66affSColin Finck 0x31,0x6e,0x0a,0xb9,0x00,0xf0,0x4f,0xb6,0xc2,0xce,0xf4,0x33,0x1e,0xc0,0x29,
2886c2c66affSColin Finck 0xc0,0x73,0x0c,0xcf,0x28,0xa5,0x26,0x9d,0xc2,0xaf,0x85,0x30,0x81,0xbf,0xd1,
2887c2c66affSColin Finck 0x70,0x3f,0x69,0x15,0xc5,0x41,0x1d,0x8e,0xd4,0xfa,0x02,0xcd,0xba,0xf1,0xf2,
2888c2c66affSColin Finck 0x67,0xb5,0x45,0x29,0xad,0xe8,0x54,0x9a,0x0f,0x1a,0x8f,0xdf,0x16,0xf4,0xcb,
2889c2c66affSColin Finck 0x43,0x08,0xe5,0x78,0x2b,0x95,0xf3,0x75,0xb6,0x88,0xf0,0x6b,0x5c,0x5b,0x50,
2890c2c66affSColin Finck 0x04,0x91,0x3b,0x89,0x5a,0x60,0x1f,0xfc,0x36,0x53,0x32,0x36,0x0a,0x4d,0x03,
2891c2c66affSColin Finck 0x2c,0xd7 };
2892c2c66affSColin Finck 
2893c2c66affSColin Finck typedef struct _CONST_DATA_BLOB
2894c2c66affSColin Finck {
2895c2c66affSColin Finck     DWORD       cbData;
2896c2c66affSColin Finck     const BYTE *pbData;
2897c2c66affSColin Finck } CONST_DATA_BLOB;
2898c2c66affSColin Finck 
2899c2c66affSColin Finck typedef struct _CONST_BLOB_ARRAY
2900c2c66affSColin Finck {
2901c2c66affSColin Finck     DWORD cBlob;
2902c2c66affSColin Finck     CONST_DATA_BLOB *rgBlob;
2903c2c66affSColin Finck } CONST_BLOB_ARRAY;
2904c2c66affSColin Finck 
2905c2c66affSColin Finck #define TODO_CHAIN    1
2906c2c66affSColin Finck #define TODO_ERROR    2
2907c2c66affSColin Finck #define TODO_INFO     4
2908c2c66affSColin Finck #define TODO_ELEMENTS 8
2909c2c66affSColin Finck #define TODO_CHAINS   16
2910c2c66affSColin Finck #define TODO_POLICY   32
2911c2c66affSColin Finck 
2912c2c66affSColin Finck /* Gets a certificate chain built from a store containing all the certs in
2913c2c66affSColin Finck  * certArray, where the last certificate in the chain is expected to be the
2914c2c66affSColin Finck  * end certificate (the one from which the chain is built.)
2915c2c66affSColin Finck  */
getChain(HCERTCHAINENGINE engine,const CONST_BLOB_ARRAY * certArray,DWORD flags,BOOL includeStore,LPSYSTEMTIME checkTime,DWORD todo,DWORD testIndex)2916c2c66affSColin Finck static PCCERT_CHAIN_CONTEXT getChain(HCERTCHAINENGINE engine,
2917c2c66affSColin Finck  const CONST_BLOB_ARRAY *certArray, DWORD flags, BOOL includeStore,
2918c2c66affSColin Finck  LPSYSTEMTIME checkTime, DWORD todo, DWORD testIndex)
2919c2c66affSColin Finck {
2920c2c66affSColin Finck     HCERTSTORE store;
2921c2c66affSColin Finck     PCCERT_CHAIN_CONTEXT chain = NULL;
2922c2c66affSColin Finck 
2923c2c66affSColin Finck     store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0,
2924c2c66affSColin Finck      CERT_STORE_CREATE_NEW_FLAG, NULL);
2925c2c66affSColin Finck     if (store)
2926c2c66affSColin Finck     {
2927c2c66affSColin Finck         BOOL ret;
2928c2c66affSColin Finck         PCCERT_CONTEXT endCert;
2929c2c66affSColin Finck 
2930c2c66affSColin Finck         if (certArray->cBlob > 1)
2931c2c66affSColin Finck         {
2932c2c66affSColin Finck             DWORD i;
2933c2c66affSColin Finck 
2934c2c66affSColin Finck             for (i = 0, ret = TRUE; ret && i < certArray->cBlob - 1; i++)
2935c2c66affSColin Finck             {
2936c2c66affSColin Finck                 ret = CertAddEncodedCertificateToStore(store,
2937c2c66affSColin Finck                  X509_ASN_ENCODING, certArray->rgBlob[i].pbData,
2938c2c66affSColin Finck                  certArray->rgBlob[i].cbData, CERT_STORE_ADD_ALWAYS, NULL);
2939c2c66affSColin Finck                 ok(ret, "Chain %d: adding cert %d failed: %08x\n",
2940c2c66affSColin Finck                  testIndex, i, GetLastError());
2941c2c66affSColin Finck             }
2942c2c66affSColin Finck         }
2943c2c66affSColin Finck         ret = CertAddEncodedCertificateToStore(store,
2944c2c66affSColin Finck          X509_ASN_ENCODING, certArray->rgBlob[certArray->cBlob - 1].pbData,
2945c2c66affSColin Finck          certArray->rgBlob[certArray->cBlob - 1].cbData, CERT_STORE_ADD_ALWAYS,
2946c2c66affSColin Finck          &endCert);
2947c2c66affSColin Finck         ok(ret, "Chain %d: adding end cert failed: %08x\n",
2948c2c66affSColin Finck          testIndex, GetLastError());
2949c2c66affSColin Finck         if (ret)
2950c2c66affSColin Finck         {
2951c2c66affSColin Finck             /* FIXME: allow caller to specify usage matches? */
2952c2c66affSColin Finck             CERT_CHAIN_PARA chainPara = { sizeof(chainPara), { 0 } };
2953c2c66affSColin Finck             FILETIME fileTime;
2954c2c66affSColin Finck 
2955c2c66affSColin Finck             ok(SystemTimeToFileTime(checkTime, &fileTime),
2956c2c66affSColin Finck              "SystemTimeToFileTime failed for day %d, month %d, year %d\n",
2957c2c66affSColin Finck              checkTime->wDay, checkTime->wMonth, checkTime->wYear);
2958c2c66affSColin Finck             ret = pCertGetCertificateChain(engine, endCert, &fileTime,
2959c2c66affSColin Finck              includeStore ? store : NULL, &chainPara, flags, NULL, &chain);
2960c2c66affSColin Finck             todo_wine_if (todo & TODO_CHAIN)
2961c2c66affSColin Finck                 ok(ret, "Chain %d: CertGetCertificateChain failed: %08x\n",
2962c2c66affSColin Finck                  testIndex, GetLastError());
2963c2c66affSColin Finck             CertFreeCertificateContext(endCert);
2964c2c66affSColin Finck         }
2965c2c66affSColin Finck         CertCloseStore(store, 0);
2966c2c66affSColin Finck     }
2967c2c66affSColin Finck     return chain;
2968c2c66affSColin Finck }
2969c2c66affSColin Finck 
2970c2c66affSColin Finck typedef struct _SimpleChainStatusCheck
2971c2c66affSColin Finck {
2972c2c66affSColin Finck     DWORD                    cElement;
2973c2c66affSColin Finck     const CERT_TRUST_STATUS *rgElementStatus;
2974c2c66affSColin Finck } SimpleChainStatusCheck;
2975c2c66affSColin Finck 
checkElementStatus(const CERT_TRUST_STATUS * expected,const CERT_TRUST_STATUS * got,const CERT_TRUST_STATUS * ignore,DWORD todo,LPCSTR testName,DWORD testIndex,DWORD chainIndex,DWORD elementIndex)2976c2c66affSColin Finck static void checkElementStatus(const CERT_TRUST_STATUS *expected,
2977c2c66affSColin Finck  const CERT_TRUST_STATUS *got, const CERT_TRUST_STATUS *ignore,
2978c2c66affSColin Finck  DWORD todo, LPCSTR testName, DWORD testIndex, DWORD chainIndex,
2979c2c66affSColin Finck  DWORD elementIndex)
2980c2c66affSColin Finck {
2981c2c66affSColin Finck     if (got->dwErrorStatus == expected->dwErrorStatus)
2982c2c66affSColin Finck         ok(got->dwErrorStatus == expected->dwErrorStatus,
2983c2c66affSColin Finck          "%s[%d], element [%d,%d]: expected error %08x, got %08x\n",
2984c2c66affSColin Finck          testName, testIndex, chainIndex, elementIndex, expected->dwErrorStatus,
2985c2c66affSColin Finck          got->dwErrorStatus);
2986c2c66affSColin Finck     else todo_wine_if (todo & TODO_ERROR)
2987c2c66affSColin Finck         ok(got->dwErrorStatus == expected->dwErrorStatus ||
2988c2c66affSColin Finck          broken((got->dwErrorStatus & ~ignore->dwErrorStatus) ==
2989c2c66affSColin Finck          (expected->dwErrorStatus & ~ignore->dwErrorStatus)),
2990c2c66affSColin Finck          "%s[%d], element [%d,%d]: expected error %08x, got %08x. %08x is "
2991c2c66affSColin Finck          "expected if no valid root certificate is available.\n",
2992c2c66affSColin Finck          testName, testIndex, chainIndex, elementIndex, expected->dwErrorStatus,
2993c2c66affSColin Finck          got->dwErrorStatus, CERT_TRUST_IS_UNTRUSTED_ROOT);
2994c2c66affSColin Finck     if (got->dwInfoStatus == expected->dwInfoStatus)
2995c2c66affSColin Finck         ok(got->dwInfoStatus == expected->dwInfoStatus,
2996c2c66affSColin Finck          "%s[%d], element [%d,%d]: expected info %08x, got %08x\n",
2997c2c66affSColin Finck          testName, testIndex, chainIndex, elementIndex, expected->dwInfoStatus,
2998c2c66affSColin Finck          got->dwInfoStatus);
2999c2c66affSColin Finck     else todo_wine_if (todo & TODO_INFO)
3000c2c66affSColin Finck         ok(got->dwInfoStatus == expected->dwInfoStatus ||
3001c2c66affSColin Finck          broken((got->dwInfoStatus & ~ignore->dwInfoStatus) ==
3002c2c66affSColin Finck          (expected->dwInfoStatus & ~ignore->dwInfoStatus)),
3003c2c66affSColin Finck          "%s[%d], element [%d,%d]: expected info %08x, got %08x\n",
3004c2c66affSColin Finck          testName, testIndex, chainIndex, elementIndex, expected->dwInfoStatus,
3005c2c66affSColin Finck          got->dwInfoStatus);
3006c2c66affSColin Finck }
3007c2c66affSColin Finck 
checkSimpleChainStatus(const CERT_SIMPLE_CHAIN * simpleChain,const SimpleChainStatusCheck * simpleChainStatus,const CERT_TRUST_STATUS * ignore,DWORD todo,LPCSTR testName,DWORD testIndex,DWORD chainIndex)3008c2c66affSColin Finck static void checkSimpleChainStatus(const CERT_SIMPLE_CHAIN *simpleChain,
3009c2c66affSColin Finck  const SimpleChainStatusCheck *simpleChainStatus,
3010c2c66affSColin Finck  const CERT_TRUST_STATUS *ignore, DWORD todo, LPCSTR testName, DWORD testIndex,
3011c2c66affSColin Finck  DWORD chainIndex)
3012c2c66affSColin Finck {
3013c2c66affSColin Finck     todo_wine_if (todo & TODO_ELEMENTS)
3014c2c66affSColin Finck         ok(simpleChain->cElement == simpleChainStatus->cElement,
3015c2c66affSColin Finck          "%s[%d]: expected %d elements, got %d\n", testName, testIndex,
3016c2c66affSColin Finck          simpleChainStatus->cElement, simpleChain->cElement);
3017c2c66affSColin Finck     if (simpleChain->cElement == simpleChainStatus->cElement)
3018c2c66affSColin Finck     {
3019c2c66affSColin Finck         DWORD i;
3020c2c66affSColin Finck 
3021c2c66affSColin Finck         for (i = 0; i < simpleChain->cElement; i++)
3022c2c66affSColin Finck             checkElementStatus(&simpleChainStatus->rgElementStatus[i],
3023c2c66affSColin Finck              &simpleChain->rgpElement[i]->TrustStatus, ignore, todo, testName,
3024c2c66affSColin Finck              testIndex, chainIndex, i);
3025c2c66affSColin Finck     }
3026c2c66affSColin Finck }
3027c2c66affSColin Finck 
3028c2c66affSColin Finck typedef struct _ChainStatusCheck
3029c2c66affSColin Finck {
3030c2c66affSColin Finck     CERT_TRUST_STATUS             statusToIgnore;
3031c2c66affSColin Finck     CERT_TRUST_STATUS             status;
3032c2c66affSColin Finck     DWORD                         cChain;
3033c2c66affSColin Finck     const SimpleChainStatusCheck *rgChainStatus;
3034c2c66affSColin Finck } ChainStatusCheck;
3035c2c66affSColin Finck 
checkChainStatus(PCCERT_CHAIN_CONTEXT chain,const ChainStatusCheck * chainStatus,DWORD todo,LPCSTR testName,DWORD testIndex)3036c2c66affSColin Finck static void checkChainStatus(PCCERT_CHAIN_CONTEXT chain,
3037c2c66affSColin Finck  const ChainStatusCheck *chainStatus, DWORD todo, LPCSTR testName,
3038c2c66affSColin Finck  DWORD testIndex)
3039c2c66affSColin Finck {
3040c2c66affSColin Finck     ok(chain->cChain == chainStatus->cChain,
3041c2c66affSColin Finck      "%s[%d]: expected %d simple chains, got %d\n", testName, testIndex,
3042c2c66affSColin Finck      chainStatus->cChain, chain->cChain);
3043c2c66affSColin Finck     todo_wine_if (todo & TODO_ERROR &&
3044c2c66affSColin Finck      chain->TrustStatus.dwErrorStatus != chainStatus->status.dwErrorStatus)
3045c2c66affSColin Finck         ok(chain->TrustStatus.dwErrorStatus ==
3046c2c66affSColin Finck          chainStatus->status.dwErrorStatus ||
3047c2c66affSColin Finck          broken((chain->TrustStatus.dwErrorStatus &
3048c2c66affSColin Finck          ~chainStatus->statusToIgnore.dwErrorStatus) ==
3049c2c66affSColin Finck          (chainStatus->status.dwErrorStatus &
3050c2c66affSColin Finck          ~chainStatus->statusToIgnore.dwErrorStatus)),
3051c2c66affSColin Finck          "%s[%d]: expected error %08x, got %08x. %08x is expected if no valid "
3052c2c66affSColin Finck          "root certificate is available.\n",
3053c2c66affSColin Finck          testName, testIndex, chainStatus->status.dwErrorStatus,
3054c2c66affSColin Finck          chain->TrustStatus.dwErrorStatus, CERT_TRUST_IS_UNTRUSTED_ROOT);
3055c2c66affSColin Finck     todo_wine_if (todo & TODO_INFO &&
3056c2c66affSColin Finck      chain->TrustStatus.dwInfoStatus != chainStatus->status.dwInfoStatus)
3057c2c66affSColin Finck         ok(chain->TrustStatus.dwInfoStatus ==
3058c2c66affSColin Finck          chainStatus->status.dwInfoStatus ||
3059c2c66affSColin Finck          broken((chain->TrustStatus.dwInfoStatus &
3060c2c66affSColin Finck          ~chainStatus->statusToIgnore.dwInfoStatus) ==
3061c2c66affSColin Finck          (chainStatus->status.dwInfoStatus &
3062c2c66affSColin Finck          ~chainStatus->statusToIgnore.dwInfoStatus)),
3063c2c66affSColin Finck          "%s[%d]: expected info %08x, got %08x\n",
3064c2c66affSColin Finck          testName, testIndex, chainStatus->status.dwInfoStatus,
3065c2c66affSColin Finck          chain->TrustStatus.dwInfoStatus);
3066c2c66affSColin Finck     if (chain->cChain == chainStatus->cChain)
3067c2c66affSColin Finck     {
3068c2c66affSColin Finck         DWORD i;
3069c2c66affSColin Finck 
3070c2c66affSColin Finck         for (i = 0; i < chain->cChain; i++)
3071c2c66affSColin Finck             checkSimpleChainStatus(chain->rgpChain[i],
3072c2c66affSColin Finck              &chainStatus->rgChainStatus[i], &chainStatus->statusToIgnore,
3073c2c66affSColin Finck              todo, testName, testIndex, i);
3074c2c66affSColin Finck     }
3075c2c66affSColin Finck }
3076c2c66affSColin Finck 
3077c2c66affSColin Finck /* Wednesday, Oct 1, 2007 */
3078c2c66affSColin Finck static SYSTEMTIME oct2007 = { 2007, 10, 1, 1, 0, 0, 0, 0 };
3079c2c66affSColin Finck /* Wednesday, Oct 28, 2009 */
3080c2c66affSColin Finck static SYSTEMTIME oct2009 = { 2009, 10, 3, 28, 0, 0, 0, 0 };
3081c2c66affSColin Finck /* Wednesday, Oct 28, 2010 */
3082c2c66affSColin Finck static SYSTEMTIME oct2010 = { 2010, 10, 3, 28, 0, 0, 0, 0 };
3083c2c66affSColin Finck /* Friday, June 6, 2013 */
3084c2c66affSColin Finck static SYSTEMTIME jun2013 = { 2013, 6, 5, 6, 0, 0, 0, 0 };
3085c2c66affSColin Finck /* Saturday, Oct 1, 2016 */
3086c2c66affSColin Finck static SYSTEMTIME oct2016 = { 2016, 10, 6, 1, 0, 0, 0, 0 };
3087c2c66affSColin Finck /* Wednesday, Nov 17, 2016 */
3088c2c66affSColin Finck static SYSTEMTIME nov2016 = { 2016, 11, 3, 17, 0, 0, 0, 0 };
3089c2c66affSColin Finck 
3090c2c66affSColin Finck typedef struct _ChainCheck
3091c2c66affSColin Finck {
3092c2c66affSColin Finck     CONST_BLOB_ARRAY certs;
3093c2c66affSColin Finck     ChainStatusCheck status;
3094c2c66affSColin Finck     DWORD            todo;
3095c2c66affSColin Finck     PSYSTEMTIME      validfor;
3096c2c66affSColin Finck } ChainCheck;
3097c2c66affSColin Finck 
3098c2c66affSColin Finck static CONST_DATA_BLOB chain0[] = {
3099c2c66affSColin Finck  { sizeof(chain0_0), chain0_0 },
3100c2c66affSColin Finck  { sizeof(chain0_1), chain0_1 },
3101c2c66affSColin Finck };
3102c2c66affSColin Finck static const CERT_TRUST_STATUS elementStatus0[] = {
3103c2c66affSColin Finck  { CERT_TRUST_IS_NOT_TIME_VALID, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3104c2c66affSColin Finck  { CERT_TRUST_IS_UNTRUSTED_ROOT,
3105c2c66affSColin Finck    CERT_TRUST_HAS_NAME_MATCH_ISSUER | CERT_TRUST_IS_SELF_SIGNED },
3106c2c66affSColin Finck };
3107c2c66affSColin Finck static const SimpleChainStatusCheck simpleStatus0[] = {
3108*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(elementStatus0), elementStatus0 },
3109c2c66affSColin Finck };
3110c2c66affSColin Finck static CONST_DATA_BLOB chain1[] = {
3111c2c66affSColin Finck  { sizeof(chain0_0), chain0_0 },
3112c2c66affSColin Finck  { sizeof(chain1_1), chain1_1 },
3113c2c66affSColin Finck };
3114c2c66affSColin Finck static const CERT_TRUST_STATUS elementStatus1[] = {
3115c2c66affSColin Finck  { CERT_TRUST_IS_NOT_TIME_VALID | CERT_TRUST_IS_NOT_SIGNATURE_VALID,
3116c2c66affSColin Finck    CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3117c2c66affSColin Finck  { CERT_TRUST_IS_UNTRUSTED_ROOT,
3118c2c66affSColin Finck    CERT_TRUST_HAS_NAME_MATCH_ISSUER | CERT_TRUST_IS_SELF_SIGNED },
3119c2c66affSColin Finck };
3120c2c66affSColin Finck static const SimpleChainStatusCheck simpleStatus1[] = {
3121*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(elementStatus1), elementStatus1 },
3122c2c66affSColin Finck };
3123c2c66affSColin Finck static CONST_DATA_BLOB chain2[] = {
3124c2c66affSColin Finck  { sizeof(chain2_0), chain2_0 },
3125c2c66affSColin Finck  { sizeof(chain0_1), chain0_1 },
3126c2c66affSColin Finck };
3127c2c66affSColin Finck static const CERT_TRUST_STATUS elementStatus2[] = {
3128c2c66affSColin Finck  { CERT_TRUST_IS_NOT_TIME_VALID, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3129c2c66affSColin Finck  { CERT_TRUST_IS_NOT_TIME_VALID | CERT_TRUST_IS_UNTRUSTED_ROOT,
3130c2c66affSColin Finck    CERT_TRUST_HAS_NAME_MATCH_ISSUER | CERT_TRUST_IS_SELF_SIGNED },
3131c2c66affSColin Finck };
3132c2c66affSColin Finck static const SimpleChainStatusCheck simpleStatus2[] = {
3133*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(elementStatus2), elementStatus2 },
3134c2c66affSColin Finck };
3135c2c66affSColin Finck static CONST_DATA_BLOB chain3[] = {
3136c2c66affSColin Finck  { sizeof(chain3_0), chain3_0 },
3137c2c66affSColin Finck  { sizeof(chain0_1), chain0_1 },
3138c2c66affSColin Finck };
3139c2c66affSColin Finck static const CERT_TRUST_STATUS elementStatus3[] = {
3140c2c66affSColin Finck  { CERT_TRUST_IS_NOT_TIME_VALID, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3141c2c66affSColin Finck  { CERT_TRUST_INVALID_BASIC_CONSTRAINTS | CERT_TRUST_IS_UNTRUSTED_ROOT,
3142c2c66affSColin Finck    CERT_TRUST_HAS_NAME_MATCH_ISSUER | CERT_TRUST_IS_SELF_SIGNED },
3143c2c66affSColin Finck };
3144c2c66affSColin Finck static const SimpleChainStatusCheck simpleStatus3[] = {
3145*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(elementStatus3), elementStatus3 },
3146c2c66affSColin Finck };
3147c2c66affSColin Finck static CONST_DATA_BLOB chain4[] = {
3148c2c66affSColin Finck  { sizeof(chain4_0), chain4_0 },
3149c2c66affSColin Finck  { sizeof(chain4_1), chain4_1 },
3150c2c66affSColin Finck  { sizeof(chain4_2), chain4_2 },
3151c2c66affSColin Finck };
3152c2c66affSColin Finck static const CERT_TRUST_STATUS elementStatus4[] = {
3153c2c66affSColin Finck  { CERT_TRUST_IS_NOT_TIME_VALID, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3154c2c66affSColin Finck  { CERT_TRUST_INVALID_BASIC_CONSTRAINTS, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3155c2c66affSColin Finck  { CERT_TRUST_INVALID_BASIC_CONSTRAINTS | CERT_TRUST_IS_UNTRUSTED_ROOT,
3156c2c66affSColin Finck    CERT_TRUST_HAS_NAME_MATCH_ISSUER | CERT_TRUST_IS_SELF_SIGNED },
3157c2c66affSColin Finck };
3158c2c66affSColin Finck static const SimpleChainStatusCheck simpleStatus4[] = {
3159*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(elementStatus4), elementStatus4 },
3160c2c66affSColin Finck };
3161c2c66affSColin Finck static CONST_DATA_BLOB chain5[] = {
3162c2c66affSColin Finck  { sizeof(chain5_0), chain5_0 },
3163c2c66affSColin Finck  { sizeof(chain5_1), chain5_1 },
3164c2c66affSColin Finck };
3165c2c66affSColin Finck static const CERT_TRUST_STATUS elementStatus5[] = {
3166c2c66affSColin Finck  { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3167c2c66affSColin Finck  { CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT |
3168c2c66affSColin Finck    CERT_TRUST_IS_UNTRUSTED_ROOT,
3169c2c66affSColin Finck    CERT_TRUST_HAS_NAME_MATCH_ISSUER | CERT_TRUST_IS_SELF_SIGNED },
3170c2c66affSColin Finck };
3171c2c66affSColin Finck static const SimpleChainStatusCheck simpleStatus5[] = {
3172*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(elementStatus5), elementStatus5 },
3173c2c66affSColin Finck };
3174c2c66affSColin Finck static CONST_DATA_BLOB chain6[] = {
3175c2c66affSColin Finck  { sizeof(chain0_0), chain0_0 },
3176c2c66affSColin Finck  { sizeof(chain4_1), chain4_1 },
3177c2c66affSColin Finck };
3178c2c66affSColin Finck static const CERT_TRUST_STATUS elementStatus6[] = {
3179c2c66affSColin Finck  { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3180c2c66affSColin Finck  { CERT_TRUST_IS_UNTRUSTED_ROOT,
3181c2c66affSColin Finck    CERT_TRUST_HAS_NAME_MATCH_ISSUER | CERT_TRUST_IS_SELF_SIGNED },
3182c2c66affSColin Finck };
3183c2c66affSColin Finck static const SimpleChainStatusCheck simpleStatus6[] = {
3184*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(elementStatus6), elementStatus6 },
3185c2c66affSColin Finck };
3186c2c66affSColin Finck static CONST_DATA_BLOB chain7[] = {
3187c2c66affSColin Finck  { sizeof(chain0_0), chain0_0 },
3188c2c66affSColin Finck  { sizeof(chain7_1), chain7_1 },
3189c2c66affSColin Finck };
3190c2c66affSColin Finck static const CERT_TRUST_STATUS elementStatus7[] = {
3191c2c66affSColin Finck  { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3192c2c66affSColin Finck  { CERT_TRUST_IS_UNTRUSTED_ROOT,
3193c2c66affSColin Finck    CERT_TRUST_HAS_NAME_MATCH_ISSUER | CERT_TRUST_IS_SELF_SIGNED },
3194c2c66affSColin Finck };
3195c2c66affSColin Finck static const SimpleChainStatusCheck simpleStatus7[] = {
3196*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(elementStatus7), elementStatus7 },
3197c2c66affSColin Finck };
3198c2c66affSColin Finck static CONST_DATA_BLOB chain8[] = {
3199c2c66affSColin Finck  { sizeof(chain8_0), chain8_0 },
3200c2c66affSColin Finck  { sizeof(chain8_1), chain8_1 },
3201c2c66affSColin Finck  { sizeof(chain8_2), chain8_2 },
3202c2c66affSColin Finck };
3203c2c66affSColin Finck static const CERT_TRUST_STATUS elementStatus8[] = {
3204c2c66affSColin Finck  { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3205c2c66affSColin Finck  { CERT_TRUST_INVALID_BASIC_CONSTRAINTS, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3206c2c66affSColin Finck  { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_IS_NOT_TIME_VALID,
3207c2c66affSColin Finck    CERT_TRUST_HAS_NAME_MATCH_ISSUER | CERT_TRUST_IS_SELF_SIGNED },
3208c2c66affSColin Finck };
3209c2c66affSColin Finck static const SimpleChainStatusCheck simpleStatus8[] = {
3210*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(elementStatus8), elementStatus8 },
3211c2c66affSColin Finck };
3212c2c66affSColin Finck static CONST_DATA_BLOB chain9[] = {
3213c2c66affSColin Finck  { sizeof(chain9_0), chain9_0 },
3214c2c66affSColin Finck  { sizeof(chain7_1), chain7_1 },
3215c2c66affSColin Finck };
3216c2c66affSColin Finck static const CERT_TRUST_STATUS elementStatus9[] = {
3217c2c66affSColin Finck  { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3218c2c66affSColin Finck  { CERT_TRUST_INVALID_BASIC_CONSTRAINTS, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3219c2c66affSColin Finck  { CERT_TRUST_INVALID_BASIC_CONSTRAINTS | CERT_TRUST_IS_CYCLIC,
3220c2c66affSColin Finck    CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3221c2c66affSColin Finck };
3222c2c66affSColin Finck static const SimpleChainStatusCheck simpleStatus9[] = {
3223*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(elementStatus9), elementStatus9 },
3224c2c66affSColin Finck };
3225c2c66affSColin Finck static CONST_DATA_BLOB chain10[] = {
3226c2c66affSColin Finck  { sizeof(chain0_0), chain0_0 },
3227c2c66affSColin Finck  { sizeof(chain10_1), chain10_1 },
3228c2c66affSColin Finck  { sizeof(chain7_1), chain7_1 },
3229c2c66affSColin Finck };
3230c2c66affSColin Finck static const CERT_TRUST_STATUS elementStatus10[] = {
3231c2c66affSColin Finck  { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3232c2c66affSColin Finck  { CERT_TRUST_IS_UNTRUSTED_ROOT,
3233c2c66affSColin Finck    CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3234c2c66affSColin Finck };
3235c2c66affSColin Finck static const SimpleChainStatusCheck simpleStatus10[] = {
3236*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(elementStatus10), elementStatus10 },
3237c2c66affSColin Finck };
3238c2c66affSColin Finck static CONST_DATA_BLOB chain11[] = {
3239c2c66affSColin Finck  { sizeof(chain0_0), chain0_0 },
3240c2c66affSColin Finck  { sizeof(chain11_1), chain11_1 },
3241c2c66affSColin Finck  { sizeof(chain7_1), chain7_1 },
3242c2c66affSColin Finck };
3243c2c66affSColin Finck static CONST_DATA_BLOB chain12[] = {
3244c2c66affSColin Finck  { sizeof(chain12_0), chain12_0 },
3245c2c66affSColin Finck  { sizeof(chain7_1), chain7_1 },
3246c2c66affSColin Finck };
3247c2c66affSColin Finck static const CERT_TRUST_STATUS elementStatus12[] = {
3248c2c66affSColin Finck  { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3249c2c66affSColin Finck  { CERT_TRUST_IS_NOT_SIGNATURE_VALID | CERT_TRUST_IS_UNTRUSTED_ROOT,
3250c2c66affSColin Finck    CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3251c2c66affSColin Finck };
3252c2c66affSColin Finck static const SimpleChainStatusCheck simpleStatus12[] = {
3253*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(elementStatus12), elementStatus12 },
3254c2c66affSColin Finck };
3255c2c66affSColin Finck static CONST_DATA_BLOB chain13[] = {
3256c2c66affSColin Finck  { sizeof(chain0_0), chain0_0 },
3257c2c66affSColin Finck  { sizeof(chain13_1), chain13_1 },
3258c2c66affSColin Finck };
3259c2c66affSColin Finck static const CERT_TRUST_STATUS elementStatus13[] = {
3260c2c66affSColin Finck  { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3261c2c66affSColin Finck  { CERT_TRUST_IS_UNTRUSTED_ROOT,
3262c2c66affSColin Finck    CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3263c2c66affSColin Finck };
3264c2c66affSColin Finck static const SimpleChainStatusCheck simpleStatus13[] = {
3265*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(elementStatus13), elementStatus13 },
3266c2c66affSColin Finck };
3267c2c66affSColin Finck static CONST_DATA_BLOB chain14[] = {
3268c2c66affSColin Finck  { sizeof(chain14_0), chain14_0 },
3269c2c66affSColin Finck  { sizeof(chain14_1), chain14_1 },
3270c2c66affSColin Finck };
3271c2c66affSColin Finck static const CERT_TRUST_STATUS elementStatus14[] = {
3272c2c66affSColin Finck  { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3273c2c66affSColin Finck  { CERT_TRUST_IS_UNTRUSTED_ROOT,
3274c2c66affSColin Finck    CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3275c2c66affSColin Finck };
3276c2c66affSColin Finck static const SimpleChainStatusCheck simpleStatus14[] = {
3277*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(elementStatus14), elementStatus14 },
3278c2c66affSColin Finck };
3279c2c66affSColin Finck static CONST_DATA_BLOB chain15[] = {
3280c2c66affSColin Finck  { sizeof(chain15_0), chain15_0 },
3281c2c66affSColin Finck  { sizeof(chain14_1), chain14_1 },
3282c2c66affSColin Finck };
3283c2c66affSColin Finck static const CERT_TRUST_STATUS elementStatus15[] = {
3284c2c66affSColin Finck  { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3285c2c66affSColin Finck  { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_IS_NOT_VALID_FOR_USAGE,
3286c2c66affSColin Finck    CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3287c2c66affSColin Finck };
3288c2c66affSColin Finck static const SimpleChainStatusCheck simpleStatus15[] = {
3289*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(elementStatus15), elementStatus15 },
3290c2c66affSColin Finck };
3291c2c66affSColin Finck static CONST_DATA_BLOB chain16[] = {
3292c2c66affSColin Finck  { sizeof(chain0_0), chain0_0 },
3293c2c66affSColin Finck  { sizeof(chain16_1), chain16_1 },
3294c2c66affSColin Finck };
3295c2c66affSColin Finck static const CERT_TRUST_STATUS elementStatus16[] = {
3296c2c66affSColin Finck  { CERT_TRUST_NO_ERROR | CERT_TRUST_IS_NOT_VALID_FOR_USAGE,
3297c2c66affSColin Finck    CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3298c2c66affSColin Finck  { CERT_TRUST_IS_UNTRUSTED_ROOT,
3299c2c66affSColin Finck    CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3300c2c66affSColin Finck };
3301c2c66affSColin Finck static const SimpleChainStatusCheck simpleStatus16[] = {
3302*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(elementStatus16), elementStatus16 },
3303c2c66affSColin Finck };
3304c2c66affSColin Finck static CONST_DATA_BLOB chain17[] = {
3305c2c66affSColin Finck  { sizeof(chain0_0), chain0_0 },
3306c2c66affSColin Finck  { sizeof(chain17_1), chain17_1 },
3307c2c66affSColin Finck  { sizeof(chain17_2), chain17_2 },
3308c2c66affSColin Finck };
3309c2c66affSColin Finck static const CERT_TRUST_STATUS elementStatus17[] = {
3310c2c66affSColin Finck  { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3311c2c66affSColin Finck  { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3312c2c66affSColin Finck  { CERT_TRUST_IS_UNTRUSTED_ROOT,
3313c2c66affSColin Finck    CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3314c2c66affSColin Finck };
3315c2c66affSColin Finck static const SimpleChainStatusCheck simpleStatus17[] = {
3316*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(elementStatus17), elementStatus17 },
3317c2c66affSColin Finck };
3318c2c66affSColin Finck static CONST_DATA_BLOB chain18[] = {
3319c2c66affSColin Finck  { sizeof(chain0_0), chain0_0 },
3320c2c66affSColin Finck  { sizeof(chain18_1), chain18_1 },
3321c2c66affSColin Finck  { sizeof(chain18_2), chain18_2 },
3322c2c66affSColin Finck };
3323c2c66affSColin Finck static const CERT_TRUST_STATUS elementStatus18[] = {
3324c2c66affSColin Finck  { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3325c2c66affSColin Finck  { CERT_TRUST_IS_NOT_VALID_FOR_USAGE, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3326c2c66affSColin Finck  { CERT_TRUST_IS_UNTRUSTED_ROOT,
3327c2c66affSColin Finck    CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3328c2c66affSColin Finck };
3329c2c66affSColin Finck static const SimpleChainStatusCheck simpleStatus18[] = {
3330*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(elementStatus18), elementStatus18 },
3331c2c66affSColin Finck };
3332c2c66affSColin Finck static CONST_DATA_BLOB chain19[] = {
3333c2c66affSColin Finck  { sizeof(chain19_0), chain19_0 },
3334c2c66affSColin Finck  { sizeof(chain19_1), chain19_1 },
3335c2c66affSColin Finck };
3336c2c66affSColin Finck static const CERT_TRUST_STATUS elementStatus19[] = {
3337c2c66affSColin Finck  { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3338c2c66affSColin Finck  { CERT_TRUST_IS_UNTRUSTED_ROOT,
3339c2c66affSColin Finck    CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER |
3340c2c66affSColin Finck    CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS },
3341c2c66affSColin Finck };
3342c2c66affSColin Finck static const SimpleChainStatusCheck simpleStatus19[] = {
3343*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(elementStatus19), elementStatus19 },
3344c2c66affSColin Finck };
3345c2c66affSColin Finck static CONST_DATA_BLOB chain20[] = {
3346c2c66affSColin Finck  { sizeof(chain20_0), chain20_0 },
3347c2c66affSColin Finck  { sizeof(chain20_1), chain20_1 },
3348c2c66affSColin Finck };
3349c2c66affSColin Finck static const CERT_TRUST_STATUS elementStatus20[] = {
3350c2c66affSColin Finck  { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3351c2c66affSColin Finck  { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT,
3352c2c66affSColin Finck    CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3353c2c66affSColin Finck };
3354c2c66affSColin Finck static const SimpleChainStatusCheck simpleStatus20[] = {
3355*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(elementStatus20), elementStatus20 },
3356c2c66affSColin Finck };
3357c2c66affSColin Finck static CONST_DATA_BLOB chain21[] = {
3358c2c66affSColin Finck  { sizeof(chain21_0), chain21_0 },
3359c2c66affSColin Finck  { sizeof(chain21_1), chain21_1 },
3360c2c66affSColin Finck };
3361c2c66affSColin Finck static const CERT_TRUST_STATUS elementStatus21[] = {
3362c2c66affSColin Finck  { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3363c2c66affSColin Finck  { CERT_TRUST_IS_UNTRUSTED_ROOT,
3364c2c66affSColin Finck    CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER |
3365c2c66affSColin Finck    CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS },
3366c2c66affSColin Finck };
3367c2c66affSColin Finck static const SimpleChainStatusCheck simpleStatus21[] = {
3368*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(elementStatus21), elementStatus21 },
3369c2c66affSColin Finck };
3370c2c66affSColin Finck static CONST_DATA_BLOB chain22[] = {
3371c2c66affSColin Finck  { sizeof(chain22_0), chain22_0 },
3372c2c66affSColin Finck  { sizeof(chain22_1), chain22_1 },
3373c2c66affSColin Finck };
3374c2c66affSColin Finck static const CERT_TRUST_STATUS elementStatus22[] = {
3375c2c66affSColin Finck  { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3376c2c66affSColin Finck  { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT,
3377c2c66affSColin Finck    CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3378c2c66affSColin Finck };
3379c2c66affSColin Finck static const SimpleChainStatusCheck simpleStatus22[] = {
3380*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(elementStatus22), elementStatus22 },
3381c2c66affSColin Finck };
3382c2c66affSColin Finck static CONST_DATA_BLOB chain23[] = {
3383c2c66affSColin Finck  { sizeof(chain23_0), chain23_0 },
3384c2c66affSColin Finck  { sizeof(chain23_1), chain23_1 },
3385c2c66affSColin Finck };
3386c2c66affSColin Finck static const CERT_TRUST_STATUS elementStatus23[] = {
3387c2c66affSColin Finck  { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3388c2c66affSColin Finck  { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT,
3389c2c66affSColin Finck    CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3390c2c66affSColin Finck };
3391c2c66affSColin Finck static const SimpleChainStatusCheck simpleStatus23[] = {
3392*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(elementStatus23), elementStatus23 },
3393c2c66affSColin Finck };
3394c2c66affSColin Finck static CONST_DATA_BLOB chain24[] = {
3395c2c66affSColin Finck  { sizeof(chain24_0), chain24_0 },
3396c2c66affSColin Finck  { sizeof(chain24_1), chain24_1 },
3397c2c66affSColin Finck };
3398c2c66affSColin Finck static const CERT_TRUST_STATUS elementStatus24[] = {
3399c2c66affSColin Finck  { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3400c2c66affSColin Finck  { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT,
3401c2c66affSColin Finck    CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3402c2c66affSColin Finck };
3403c2c66affSColin Finck static const SimpleChainStatusCheck simpleStatus24[] = {
3404*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(elementStatus24), elementStatus24 },
3405c2c66affSColin Finck };
3406c2c66affSColin Finck static CONST_DATA_BLOB chain25[] = {
3407c2c66affSColin Finck  { sizeof(chain25_0), chain25_0 },
3408c2c66affSColin Finck  { sizeof(chain25_1), chain25_1 },
3409c2c66affSColin Finck };
3410c2c66affSColin Finck static const CERT_TRUST_STATUS elementStatus25[] = {
3411c2c66affSColin Finck  { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3412c2c66affSColin Finck  { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT,
3413c2c66affSColin Finck    CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3414c2c66affSColin Finck };
3415c2c66affSColin Finck static const SimpleChainStatusCheck simpleStatus25[] = {
3416*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(elementStatus25), elementStatus25 },
3417c2c66affSColin Finck };
3418c2c66affSColin Finck static CONST_DATA_BLOB chain26[] = {
3419c2c66affSColin Finck  { sizeof(chain26_0), chain26_0 },
3420c2c66affSColin Finck  { sizeof(chain26_1), chain26_1 },
3421c2c66affSColin Finck };
3422c2c66affSColin Finck static const CERT_TRUST_STATUS elementStatus26[] = {
3423c2c66affSColin Finck  { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3424c2c66affSColin Finck  { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT,
3425c2c66affSColin Finck    CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3426c2c66affSColin Finck };
3427c2c66affSColin Finck static const SimpleChainStatusCheck simpleStatus26[] = {
3428*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(elementStatus26), elementStatus26 },
3429c2c66affSColin Finck };
3430c2c66affSColin Finck static CONST_DATA_BLOB chain27[] = {
3431c2c66affSColin Finck  { sizeof(chain27_0), chain27_0 },
3432c2c66affSColin Finck  { sizeof(chain27_1), chain27_1 },
3433c2c66affSColin Finck };
3434c2c66affSColin Finck static const CERT_TRUST_STATUS elementStatus27[] = {
3435c2c66affSColin Finck  { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3436c2c66affSColin Finck  { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_INVALID_NAME_CONSTRAINTS |
3437c2c66affSColin Finck    CERT_TRUST_INVALID_EXTENSION,
3438c2c66affSColin Finck    CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3439c2c66affSColin Finck };
3440c2c66affSColin Finck static const SimpleChainStatusCheck simpleStatus27[] = {
3441*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(elementStatus27), elementStatus27 },
3442c2c66affSColin Finck };
3443c2c66affSColin Finck static const CERT_TRUST_STATUS elementStatus27Broken[] = {
3444c2c66affSColin Finck  { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3445c2c66affSColin Finck  { CERT_TRUST_IS_UNTRUSTED_ROOT,
3446c2c66affSColin Finck    CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER |
3447c2c66affSColin Finck    CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS },
3448c2c66affSColin Finck };
3449c2c66affSColin Finck static const SimpleChainStatusCheck simpleStatus27Broken[] = {
3450*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(elementStatus27Broken),
3451c2c66affSColin Finck    elementStatus27Broken },
3452c2c66affSColin Finck };
3453c2c66affSColin Finck static CONST_DATA_BLOB chain28[] = {
3454c2c66affSColin Finck  { sizeof(chain28_0), chain28_0 },
3455c2c66affSColin Finck  { sizeof(chain28_1), chain28_1 },
3456c2c66affSColin Finck };
3457c2c66affSColin Finck static const CERT_TRUST_STATUS elementStatus28[] = {
3458c2c66affSColin Finck  { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3459c2c66affSColin Finck  { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT,
3460c2c66affSColin Finck    CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3461c2c66affSColin Finck };
3462c2c66affSColin Finck static const SimpleChainStatusCheck simpleStatus28[] = {
3463*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(elementStatus28), elementStatus28 },
3464c2c66affSColin Finck };
3465c2c66affSColin Finck static CONST_DATA_BLOB chain29[] = {
3466c2c66affSColin Finck  { sizeof(chain0_0), chain0_0 },
3467c2c66affSColin Finck  { sizeof(chain29_1), chain29_1 },
3468c2c66affSColin Finck };
3469c2c66affSColin Finck static CONST_DATA_BLOB chain30[] = {
3470c2c66affSColin Finck  { sizeof(chain0_0), chain0_0 },
3471c2c66affSColin Finck  { sizeof(chain30_1), chain30_1 },
3472c2c66affSColin Finck  { sizeof(chain30_2), chain30_2 },
3473c2c66affSColin Finck };
3474c2c66affSColin Finck static const CERT_TRUST_STATUS elementStatus30[] = {
3475c2c66affSColin Finck  { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3476c2c66affSColin Finck  { CERT_TRUST_INVALID_EXTENSION | CERT_TRUST_HAS_NOT_SUPPORTED_CRITICAL_EXT,
3477c2c66affSColin Finck    CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3478c2c66affSColin Finck  { CERT_TRUST_IS_UNTRUSTED_ROOT,
3479c2c66affSColin Finck    CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3480c2c66affSColin Finck };
3481c2c66affSColin Finck static const SimpleChainStatusCheck simpleStatus30[] = {
3482*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(elementStatus30), elementStatus30 },
3483c2c66affSColin Finck };
3484c2c66affSColin Finck static CONST_DATA_BLOB chain31[] = {
3485c2c66affSColin Finck  { sizeof(chain0_0), chain0_0 },
3486c2c66affSColin Finck  { sizeof(chain31_1), chain31_1 },
3487c2c66affSColin Finck };
3488c2c66affSColin Finck static CONST_DATA_BLOB selfSignedChain[] = {
3489c2c66affSColin Finck  { sizeof(selfSignedCert), selfSignedCert }
3490c2c66affSColin Finck };
3491c2c66affSColin Finck static const CERT_TRUST_STATUS selfSignedElementStatus[] = {
3492c2c66affSColin Finck  { CERT_TRUST_IS_NOT_TIME_VALID | CERT_TRUST_IS_UNTRUSTED_ROOT,
3493c2c66affSColin Finck    CERT_TRUST_HAS_NAME_MATCH_ISSUER | CERT_TRUST_IS_SELF_SIGNED },
3494c2c66affSColin Finck };
3495c2c66affSColin Finck static const SimpleChainStatusCheck selfSignedSimpleStatus[] = {
3496*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(selfSignedElementStatus),
3497c2c66affSColin Finck    selfSignedElementStatus },
3498c2c66affSColin Finck };
3499c2c66affSColin Finck static CONST_DATA_BLOB googleChain[] = {
3500c2c66affSColin Finck  { sizeof(geotrust_global_ca), geotrust_global_ca },
3501c2c66affSColin Finck  { sizeof(google_internet_authority), google_internet_authority },
3502c2c66affSColin Finck  { sizeof(google_com), google_com },
3503c2c66affSColin Finck };
3504c2c66affSColin Finck /* The Google cert is only valid from 11/10/2016 to 2/2/2017, so with the date
3505c2c66affSColin Finck  * tested (October 2016) it's not time valid.
3506c2c66affSColin Finck  */
3507c2c66affSColin Finck static const CERT_TRUST_STATUS googleElementStatus[] = {
3508c2c66affSColin Finck  { CERT_TRUST_IS_NOT_TIME_VALID, CERT_TRUST_HAS_KEY_MATCH_ISSUER },
3509c2c66affSColin Finck  { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_KEY_MATCH_ISSUER },
3510c2c66affSColin Finck  { CERT_TRUST_NO_ERROR,
3511c2c66affSColin Finck    /* TODO_INFO */
3512c2c66affSColin Finck    CERT_TRUST_HAS_KEY_MATCH_ISSUER | CERT_TRUST_IS_SELF_SIGNED | CERT_TRUST_HAS_PREFERRED_ISSUER},
3513c2c66affSColin Finck };
3514c2c66affSColin Finck static const SimpleChainStatusCheck googleSimpleStatus[] = {
3515*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(googleElementStatus),
3516c2c66affSColin Finck    googleElementStatus },
3517c2c66affSColin Finck };
3518c2c66affSColin Finck static CONST_DATA_BLOB battlenetChain[] = {
3519c2c66affSColin Finck  { sizeof(thawte_primary_ca), thawte_primary_ca },
3520c2c66affSColin Finck  { sizeof(thawte_ssl_ca), thawte_ssl_ca },
3521c2c66affSColin Finck  { sizeof(battlenet), battlenet },
3522c2c66affSColin Finck };
3523c2c66affSColin Finck /* The openssl cert is only valid from 9/12/2008 to 9/13/2012, so with the date
3524c2c66affSColin Finck  * tested (October 2007) it's not time valid.
3525c2c66affSColin Finck  */
3526c2c66affSColin Finck static CONST_DATA_BLOB opensslChain[] = {
3527c2c66affSColin Finck  { sizeof(global_sign_root), global_sign_root },
3528c2c66affSColin Finck  { sizeof(global_sign_ca), global_sign_ca },
3529c2c66affSColin Finck  { sizeof(openssl_org), openssl_org },
3530c2c66affSColin Finck };
3531c2c66affSColin Finck static const CERT_TRUST_STATUS opensslElementStatus[] = {
3532c2c66affSColin Finck  { CERT_TRUST_IS_NOT_TIME_VALID, CERT_TRUST_HAS_KEY_MATCH_ISSUER },
3533c2c66affSColin Finck  { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_KEY_MATCH_ISSUER },
3534c2c66affSColin Finck  { CERT_TRUST_NO_ERROR,
3535c2c66affSColin Finck    CERT_TRUST_HAS_NAME_MATCH_ISSUER | CERT_TRUST_IS_SELF_SIGNED},
3536c2c66affSColin Finck };
3537c2c66affSColin Finck static const SimpleChainStatusCheck opensslSimpleStatus[] = {
3538*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(opensslElementStatus),
3539c2c66affSColin Finck    opensslElementStatus },
3540c2c66affSColin Finck };
3541c2c66affSColin Finck /* The OpenSSL chain may not have its root trusted, in which case the chain
3542c2c66affSColin Finck  * is truncated (on Win98).
3543c2c66affSColin Finck  */
3544c2c66affSColin Finck static CONST_DATA_BLOB incompleteOpensslChain[] = {
3545c2c66affSColin Finck  { sizeof(global_sign_ca), global_sign_ca },
3546c2c66affSColin Finck  { sizeof(openssl_org), openssl_org },
3547c2c66affSColin Finck };
3548c2c66affSColin Finck static const CERT_TRUST_STATUS incompleteOpensslElementStatus[] = {
3549c2c66affSColin Finck  { CERT_TRUST_IS_NOT_TIME_VALID, CERT_TRUST_HAS_KEY_MATCH_ISSUER },
3550c2c66affSColin Finck  { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_KEY_MATCH_ISSUER },
3551c2c66affSColin Finck };
3552c2c66affSColin Finck static const SimpleChainStatusCheck incompleteOpensslSimpleStatus[] = {
3553*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(incompleteOpensslElementStatus),
3554c2c66affSColin Finck    incompleteOpensslElementStatus },
3555c2c66affSColin Finck };
3556c2c66affSColin Finck /*
3557c2c66affSColin Finck  * USERTrust -> InCommon RSA CA -> cs.stanford.edu
3558c2c66affSColin Finck  * cs.stanford.edu's cert is only valid from 10/21/2016 to 10/22/2019, so with
3559c2c66affSColin Finck  * the date tested (October 1, 2016) it's not time valid.
3560c2c66affSColin Finck  */
3561c2c66affSColin Finck static CONST_DATA_BLOB stanfordChain[] = {
3562c2c66affSColin Finck  { sizeof(usertrust_ca), usertrust_ca },
3563c2c66affSColin Finck  { sizeof(incommon_rsa_ca), incommon_rsa_ca },
3564c2c66affSColin Finck  { sizeof(cs_stanford_edu), cs_stanford_edu },
3565c2c66affSColin Finck };
3566c2c66affSColin Finck static const CERT_TRUST_STATUS stanfordElementStatus[] = {
3567c2c66affSColin Finck  { CERT_TRUST_IS_NOT_TIME_VALID, CERT_TRUST_HAS_KEY_MATCH_ISSUER },
3568c2c66affSColin Finck  { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_KEY_MATCH_ISSUER },
3569c2c66affSColin Finck  { CERT_TRUST_NO_ERROR,
3570c2c66affSColin Finck    CERT_TRUST_HAS_NAME_MATCH_ISSUER | CERT_TRUST_IS_SELF_SIGNED},
3571c2c66affSColin Finck };
3572c2c66affSColin Finck static const SimpleChainStatusCheck stanfordSimpleStatus[] = {
3573*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(stanfordElementStatus),
3574c2c66affSColin Finck    stanfordElementStatus },
3575c2c66affSColin Finck };
3576c2c66affSColin Finck static ChainCheck chainCheck[] = {
3577c2c66affSColin Finck  /* Windows XP erroneously sets CERT_TRUST_HAS_PREFERRED_ISSUER on all
3578c2c66affSColin Finck   * elements, so ignore it.
3579c2c66affSColin Finck   * Windows 98/NT4 also set CERT_TRUST_IS_NOT_TIME_NESTED on chains they
3580c2c66affSColin Finck   * shouldn't, so ignore those too.
3581c2c66affSColin Finck   */
3582*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain0), chain0 },
3583c2c66affSColin Finck    { { CERT_TRUST_IS_NOT_TIME_NESTED, CERT_TRUST_HAS_PREFERRED_ISSUER },
3584c2c66affSColin Finck      { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_IS_NOT_TIME_VALID, 0 },
3585c2c66affSColin Finck      1, simpleStatus0 }, 0, &oct2007 },
3586*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain1), chain1 },
3587c2c66affSColin Finck    { { CERT_TRUST_IS_NOT_TIME_NESTED, CERT_TRUST_HAS_PREFERRED_ISSUER },
3588c2c66affSColin Finck      { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_IS_NOT_SIGNATURE_VALID |
3589c2c66affSColin Finck        CERT_TRUST_IS_NOT_TIME_VALID, 0 },
3590c2c66affSColin Finck      1, simpleStatus1 }, 0, &oct2007 },
3591*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain2), chain2 },
3592c2c66affSColin Finck    { { CERT_TRUST_IS_NOT_TIME_NESTED, CERT_TRUST_HAS_PREFERRED_ISSUER },
3593c2c66affSColin Finck      { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_IS_NOT_TIME_VALID, 0 },
3594c2c66affSColin Finck      1, simpleStatus2 }, 0, &oct2007 },
3595c2c66affSColin Finck  /* Earlier versions of Windows incorrectly don't set
3596c2c66affSColin Finck   * CERT_TRUST_INVALID_BASIC_CONSTRAINTS on this chain.
3597c2c66affSColin Finck   */
3598*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain3), chain3 },
3599c2c66affSColin Finck    { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_INVALID_BASIC_CONSTRAINTS,
3600c2c66affSColin Finck        CERT_TRUST_HAS_PREFERRED_ISSUER },
3601c2c66affSColin Finck      { CERT_TRUST_INVALID_BASIC_CONSTRAINTS | CERT_TRUST_IS_UNTRUSTED_ROOT |
3602c2c66affSColin Finck        CERT_TRUST_IS_NOT_TIME_VALID, 0 },
3603c2c66affSColin Finck      1, simpleStatus3 }, 0, &oct2007 },
3604c2c66affSColin Finck  /* Earlier versions of Windows incorrectly don't set
3605c2c66affSColin Finck   * CERT_TRUST_INVALID_BASIC_CONSTRAINTS on this chain.
3606c2c66affSColin Finck   */
3607*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain4), chain4 },
3608c2c66affSColin Finck    { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_INVALID_BASIC_CONSTRAINTS,
3609c2c66affSColin Finck        CERT_TRUST_HAS_PREFERRED_ISSUER },
3610c2c66affSColin Finck      { CERT_TRUST_INVALID_BASIC_CONSTRAINTS | CERT_TRUST_IS_UNTRUSTED_ROOT |
3611c2c66affSColin Finck        CERT_TRUST_IS_NOT_TIME_VALID, 0 },
3612c2c66affSColin Finck      1, simpleStatus4 }, 0, &oct2007 },
3613c2c66affSColin Finck  /* Windows versions prior to Vista/2008 incorrectly set
3614c2c66affSColin Finck   * CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT on this chain, so ignore it.
3615c2c66affSColin Finck   * Similarly, some older versions of Windows incorrectly set
3616c2c66affSColin Finck   * CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, ignore that too.
3617c2c66affSColin Finck   */
3618*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain5), chain5 },
3619c2c66affSColin Finck    { { CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT |
3620c2c66affSColin Finck        CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT,
3621c2c66affSColin Finck        CERT_TRUST_HAS_PREFERRED_ISSUER },
3622c2c66affSColin Finck      { CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT |
3623c2c66affSColin Finck        CERT_TRUST_IS_UNTRUSTED_ROOT, 0 }, 1, simpleStatus5 }, 0, &oct2007 },
3624*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain6), chain6 },
3625c2c66affSColin Finck    { { 0, CERT_TRUST_HAS_PREFERRED_ISSUER },
3626c2c66affSColin Finck      { CERT_TRUST_IS_UNTRUSTED_ROOT, 0 }, 1, simpleStatus6 }, 0, &oct2007 },
3627*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain7), chain7 },
3628c2c66affSColin Finck    { { 0, CERT_TRUST_HAS_PREFERRED_ISSUER },
3629c2c66affSColin Finck      { CERT_TRUST_IS_UNTRUSTED_ROOT, 0 }, 1, simpleStatus7 }, 0, &oct2007 },
3630c2c66affSColin Finck  /* Earlier versions of Windows incorrectly don't set
3631c2c66affSColin Finck   * CERT_TRUST_INVALID_BASIC_CONSTRAINTS on this chain.
3632c2c66affSColin Finck   */
3633*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain8), chain8 },
3634c2c66affSColin Finck    { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_INVALID_BASIC_CONSTRAINTS,
3635c2c66affSColin Finck        CERT_TRUST_HAS_PREFERRED_ISSUER },
3636c2c66affSColin Finck      { CERT_TRUST_INVALID_BASIC_CONSTRAINTS | CERT_TRUST_IS_UNTRUSTED_ROOT |
3637c2c66affSColin Finck        CERT_TRUST_IS_NOT_TIME_VALID, 0 },
3638c2c66affSColin Finck      1, simpleStatus8 }, 0, &oct2007 },
3639c2c66affSColin Finck  /* Earlier versions of Windows incorrectly don't set
3640c2c66affSColin Finck   * CERT_TRUST_INVALID_BASIC_CONSTRAINTS on this chain.
3641c2c66affSColin Finck   */
3642*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain9), chain9 },
3643c2c66affSColin Finck    { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_INVALID_BASIC_CONSTRAINTS,
3644c2c66affSColin Finck        CERT_TRUST_HAS_PREFERRED_ISSUER },
3645c2c66affSColin Finck      { CERT_TRUST_IS_PARTIAL_CHAIN |
3646c2c66affSColin Finck        CERT_TRUST_INVALID_BASIC_CONSTRAINTS | CERT_TRUST_IS_CYCLIC, 0 },
3647c2c66affSColin Finck      1, simpleStatus9 }, 0, &oct2007 },
3648*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain10), chain10 },
3649c2c66affSColin Finck    { { 0, CERT_TRUST_HAS_PREFERRED_ISSUER },
3650c2c66affSColin Finck      { CERT_TRUST_IS_UNTRUSTED_ROOT, 0 }, 1, simpleStatus10 }, 0, &oct2007 },
3651*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain11), chain11 },
3652c2c66affSColin Finck    { { 0, CERT_TRUST_HAS_PREFERRED_ISSUER },
3653c2c66affSColin Finck      { CERT_TRUST_IS_UNTRUSTED_ROOT, 0 }, 1, simpleStatus10 }, 0, &oct2007 },
3654*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain12), chain12 },
3655c2c66affSColin Finck    { { 0, CERT_TRUST_HAS_PREFERRED_ISSUER },
3656c2c66affSColin Finck      { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_IS_NOT_SIGNATURE_VALID, 0 },
3657c2c66affSColin Finck      1, simpleStatus12 }, 0, &oct2007 },
3658*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain13), chain13 },
3659c2c66affSColin Finck    { { CERT_TRUST_IS_NOT_TIME_NESTED, CERT_TRUST_HAS_PREFERRED_ISSUER },
3660c2c66affSColin Finck      { CERT_TRUST_IS_UNTRUSTED_ROOT, 0 }, 1, simpleStatus13 },
3661c2c66affSColin Finck    0, &oct2007 },
3662*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain14), chain14 },
3663c2c66affSColin Finck    { { CERT_TRUST_IS_NOT_TIME_NESTED, CERT_TRUST_HAS_PREFERRED_ISSUER },
3664c2c66affSColin Finck      { CERT_TRUST_IS_UNTRUSTED_ROOT, 0 }, 1, simpleStatus14 },
3665c2c66affSColin Finck    0, &oct2007 },
3666c2c66affSColin Finck  /* Earlier versions of crypt32 incorrectly do not complain that the end cert's
3667c2c66affSColin Finck   * key usage is invalid, so ignore that error.
3668c2c66affSColin Finck   */
3669*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain15), chain15 },
3670c2c66affSColin Finck    { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_IS_NOT_VALID_FOR_USAGE,
3671c2c66affSColin Finck        CERT_TRUST_HAS_PREFERRED_ISSUER },
3672c2c66affSColin Finck      { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_IS_NOT_VALID_FOR_USAGE, 0 },
3673c2c66affSColin Finck      1, simpleStatus15 },
3674c2c66affSColin Finck    0, &oct2007 },
3675*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain16), chain16 },
3676c2c66affSColin Finck    { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_IS_NOT_VALID_FOR_USAGE,
3677c2c66affSColin Finck        CERT_TRUST_HAS_PREFERRED_ISSUER },
3678c2c66affSColin Finck      { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_IS_NOT_VALID_FOR_USAGE, 0 },
3679c2c66affSColin Finck      1, simpleStatus16 },
3680c2c66affSColin Finck    0, &oct2007 },
3681*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain17), chain17 },
3682c2c66affSColin Finck    { { CERT_TRUST_IS_NOT_TIME_NESTED, CERT_TRUST_HAS_PREFERRED_ISSUER },
3683c2c66affSColin Finck      { CERT_TRUST_IS_UNTRUSTED_ROOT, 0 }, 1, simpleStatus17 },
3684c2c66affSColin Finck    0, &oct2007 },
3685*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain18), chain18 },
3686c2c66affSColin Finck    { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_IS_NOT_VALID_FOR_USAGE,
3687c2c66affSColin Finck        CERT_TRUST_HAS_PREFERRED_ISSUER },
3688c2c66affSColin Finck      { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_IS_NOT_VALID_FOR_USAGE, 0 },
3689c2c66affSColin Finck      1, simpleStatus18 },
3690c2c66affSColin Finck    0, &oct2007 },
3691c2c66affSColin Finck  /* Older versions of crypt32 set CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT
3692c2c66affSColin Finck   * even though the constraint and alt name match.
3693c2c66affSColin Finck   * They also do not set CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS, since they
3694c2c66affSColin Finck   * incorrectly find a name constraint error.
3695c2c66affSColin Finck   */
3696*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain19), chain19 },
3697c2c66affSColin Finck    { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_IS_NOT_VALID_FOR_USAGE |
3698c2c66affSColin Finck        CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT,
3699c2c66affSColin Finck        CERT_TRUST_HAS_PREFERRED_ISSUER | CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS
3700c2c66affSColin Finck      },
3701c2c66affSColin Finck      { CERT_TRUST_IS_UNTRUSTED_ROOT, CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS },
3702c2c66affSColin Finck      1, simpleStatus19 },
3703c2c66affSColin Finck    0, &oct2007 },
3704c2c66affSColin Finck  /* Older versions of crypt32 do not set
3705c2c66affSColin Finck   * CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, though they should.  So
3706c2c66affSColin Finck   * ignore it (on Windows) but require it (on Wine.)
3707c2c66affSColin Finck   */
3708*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain20), chain20 },
3709c2c66affSColin Finck    { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_IS_NOT_VALID_FOR_USAGE |
3710c2c66affSColin Finck        CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT |
3711c2c66affSColin Finck        CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT,
3712c2c66affSColin Finck        CERT_TRUST_HAS_PREFERRED_ISSUER },
3713c2c66affSColin Finck      { CERT_TRUST_IS_UNTRUSTED_ROOT |
3714c2c66affSColin Finck        CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, 0 },
3715c2c66affSColin Finck      1, simpleStatus20 },
3716c2c66affSColin Finck    0, &oct2007 },
3717*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain21), chain21 },
3718c2c66affSColin Finck    { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_IS_NOT_VALID_FOR_USAGE |
3719c2c66affSColin Finck        CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT,
3720c2c66affSColin Finck        CERT_TRUST_HAS_PREFERRED_ISSUER | CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS
3721c2c66affSColin Finck      },
3722c2c66affSColin Finck      { CERT_TRUST_IS_UNTRUSTED_ROOT, CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS },
3723c2c66affSColin Finck      1, simpleStatus21 },
3724c2c66affSColin Finck    0, &oct2007 },
3725*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain22), chain22 },
3726c2c66affSColin Finck    { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_IS_NOT_VALID_FOR_USAGE |
3727c2c66affSColin Finck        CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT |
3728c2c66affSColin Finck        CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT,
3729c2c66affSColin Finck        CERT_TRUST_HAS_PREFERRED_ISSUER },
3730c2c66affSColin Finck      { CERT_TRUST_IS_UNTRUSTED_ROOT |
3731c2c66affSColin Finck        CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, 0 },
3732c2c66affSColin Finck      1, simpleStatus22 },
3733c2c66affSColin Finck    0, &oct2007 },
3734*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain23), chain23 },
3735c2c66affSColin Finck    { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_IS_NOT_VALID_FOR_USAGE |
3736c2c66affSColin Finck        CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT |
3737c2c66affSColin Finck        CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT,
3738c2c66affSColin Finck        CERT_TRUST_HAS_PREFERRED_ISSUER },
3739c2c66affSColin Finck      { CERT_TRUST_IS_UNTRUSTED_ROOT |
3740c2c66affSColin Finck        CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, 0 },
3741c2c66affSColin Finck      1, simpleStatus23 },
3742c2c66affSColin Finck    0, &oct2007 },
3743*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain24), chain24 },
3744c2c66affSColin Finck    { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_IS_NOT_VALID_FOR_USAGE |
3745c2c66affSColin Finck        CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT |
3746c2c66affSColin Finck        CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT,
3747c2c66affSColin Finck        CERT_TRUST_HAS_PREFERRED_ISSUER },
3748c2c66affSColin Finck      { CERT_TRUST_IS_UNTRUSTED_ROOT |
3749c2c66affSColin Finck        CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, 0 },
3750c2c66affSColin Finck      1, simpleStatus24 },
3751c2c66affSColin Finck    0, &oct2007 },
3752*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain25), chain25 },
3753c2c66affSColin Finck    { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_IS_NOT_VALID_FOR_USAGE |
3754c2c66affSColin Finck        CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT |
3755c2c66affSColin Finck        CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT,
3756c2c66affSColin Finck        CERT_TRUST_HAS_PREFERRED_ISSUER },
3757c2c66affSColin Finck      { CERT_TRUST_IS_UNTRUSTED_ROOT |
3758c2c66affSColin Finck        CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, 0 },
3759c2c66affSColin Finck      1, simpleStatus25 },
3760c2c66affSColin Finck    0, &oct2007 },
3761*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain26), chain26 },
3762c2c66affSColin Finck    { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_IS_NOT_VALID_FOR_USAGE |
3763c2c66affSColin Finck        CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT |
3764c2c66affSColin Finck        CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT,
3765c2c66affSColin Finck        CERT_TRUST_HAS_PREFERRED_ISSUER },
3766c2c66affSColin Finck      { CERT_TRUST_IS_UNTRUSTED_ROOT |
3767c2c66affSColin Finck        CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, 0 },
3768c2c66affSColin Finck      1, simpleStatus26 },
3769c2c66affSColin Finck    0, &oct2007 },
3770c2c66affSColin Finck  /* chain27 is handled separately elsewhere */
3771*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain28), chain28 },
3772c2c66affSColin Finck    { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_IS_NOT_VALID_FOR_USAGE |
3773c2c66affSColin Finck        CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT |
3774c2c66affSColin Finck        CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT,
3775c2c66affSColin Finck        CERT_TRUST_HAS_PREFERRED_ISSUER },
3776c2c66affSColin Finck      { CERT_TRUST_IS_UNTRUSTED_ROOT |
3777c2c66affSColin Finck        CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT, 0 },
3778c2c66affSColin Finck      1, simpleStatus28 },
3779c2c66affSColin Finck    0, &oct2007 },
3780c2c66affSColin Finck  /* chain29 is handled separately elsewhere */
3781c2c66affSColin Finck  /* Microsoft incorrectly ignores unknown/unsupported critical extensions on
3782c2c66affSColin Finck   * older Windows versions, so ignore the error on Windows.
3783c2c66affSColin Finck   */
3784*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain30), chain30 },
3785c2c66affSColin Finck    { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_IS_NOT_VALID_FOR_USAGE |
3786c2c66affSColin Finck        CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT |
3787c2c66affSColin Finck        CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT |
3788c2c66affSColin Finck        CERT_TRUST_INVALID_EXTENSION |
3789c2c66affSColin Finck        CERT_TRUST_HAS_NOT_SUPPORTED_CRITICAL_EXT,
3790c2c66affSColin Finck        CERT_TRUST_HAS_PREFERRED_ISSUER },
3791c2c66affSColin Finck      { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_INVALID_EXTENSION |
3792c2c66affSColin Finck        CERT_TRUST_HAS_NOT_SUPPORTED_CRITICAL_EXT, 0 },
3793c2c66affSColin Finck      1, simpleStatus30 },
3794c2c66affSColin Finck    0, &oct2007 },
3795*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(selfSignedChain), selfSignedChain },
3796c2c66affSColin Finck    { { 0, CERT_TRUST_HAS_PREFERRED_ISSUER },
3797c2c66affSColin Finck      { CERT_TRUST_IS_NOT_TIME_VALID | CERT_TRUST_IS_UNTRUSTED_ROOT, 0 },
3798c2c66affSColin Finck      1, selfSignedSimpleStatus }, 0, &oct2007 },
3799c2c66affSColin Finck  /* The google chain may or may not have its root trusted, so ignore the error.
3800c2c66affSColin Finck   * The chain is also considered not time nested on Win98, so ignore that
3801c2c66affSColin Finck   * error too.
3802c2c66affSColin Finck   * TODO_INFO: If the root cert is considered self-signed, InfoStatus is hardcoded in Wine
3803c2c66affSColin Finck   * e.g. has always CERT_TRUST_HAS_NAME_MATCH_ISSUER flag
3804c2c66affSColin Finck   * @see CRYPT_CheckSimpleChain
3805c2c66affSColin Finck   */
3806*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(googleChain), googleChain },
3807c2c66affSColin Finck    { { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_IS_NOT_TIME_NESTED,
3808c2c66affSColin Finck        CERT_TRUST_HAS_PREFERRED_ISSUER },
3809c2c66affSColin Finck      { CERT_TRUST_IS_NOT_TIME_VALID, 0 },
3810c2c66affSColin Finck        1, googleSimpleStatus }, TODO_INFO, &oct2016 },
3811c2c66affSColin Finck  /* The stanford chain may or may not have its root trusted, so ignore the error
3812c2c66affSColin Finck   */
3813*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(stanfordChain), stanfordChain },
3814c2c66affSColin Finck    { { CERT_TRUST_IS_UNTRUSTED_ROOT, CERT_TRUST_HAS_PREFERRED_ISSUER },
3815c2c66affSColin Finck      { CERT_TRUST_IS_NOT_TIME_VALID, 0 },
3816c2c66affSColin Finck        1, stanfordSimpleStatus }, 0, &oct2016 },
3817c2c66affSColin Finck };
3818c2c66affSColin Finck 
3819c2c66affSColin Finck static const CERT_TRUST_STATUS elementStatus8NoStore[] = {
3820c2c66affSColin Finck  { CERT_TRUST_NO_ERROR, CERT_TRUST_HAS_NAME_MATCH_ISSUER },
3821c2c66affSColin Finck };
3822c2c66affSColin Finck static const SimpleChainStatusCheck simpleStatus8NoStore[] = {
3823*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(elementStatus8NoStore),
3824c2c66affSColin Finck    elementStatus8NoStore },
3825c2c66affSColin Finck };
3826c2c66affSColin Finck static ChainCheck chainCheckNoStore[] = {
3827*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(selfSignedChain), selfSignedChain },
3828c2c66affSColin Finck    { { 0, CERT_TRUST_HAS_PREFERRED_ISSUER },
3829c2c66affSColin Finck      { CERT_TRUST_IS_NOT_TIME_VALID | CERT_TRUST_IS_UNTRUSTED_ROOT, 0 },
3830c2c66affSColin Finck      1, selfSignedSimpleStatus },
3831c2c66affSColin Finck    0 },
3832*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain8), chain8 },
3833c2c66affSColin Finck    { { 0, CERT_TRUST_HAS_PREFERRED_ISSUER },
3834c2c66affSColin Finck      { CERT_TRUST_IS_PARTIAL_CHAIN, 0 },
3835c2c66affSColin Finck      1, simpleStatus8NoStore },
3836c2c66affSColin Finck    0 },
3837c2c66affSColin Finck };
3838c2c66affSColin Finck 
3839c2c66affSColin Finck  /* The openssl chain may or may not have its root trusted, so ignore the error
3840c2c66affSColin Finck   */
3841c2c66affSColin Finck static ChainCheck opensslChainCheck =
3842*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(opensslChain), opensslChain },
3843c2c66affSColin Finck    { { CERT_TRUST_IS_UNTRUSTED_ROOT, CERT_TRUST_HAS_PREFERRED_ISSUER },
3844c2c66affSColin Finck      { CERT_TRUST_IS_NOT_TIME_VALID, 0 },
3845c2c66affSColin Finck        1, opensslSimpleStatus }, 0 };
3846c2c66affSColin Finck static ChainCheck incompleteOpensslChainCheck =
3847*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(incompleteOpensslChain),
3848c2c66affSColin Finck      incompleteOpensslChain },
3849c2c66affSColin Finck    { { CERT_TRUST_IS_UNTRUSTED_ROOT, CERT_TRUST_HAS_PREFERRED_ISSUER },
3850c2c66affSColin Finck      { CERT_TRUST_IS_NOT_TIME_VALID | CERT_TRUST_IS_PARTIAL_CHAIN, 0 },
3851c2c66affSColin Finck        1, incompleteOpensslSimpleStatus }, 0 };
3852c2c66affSColin Finck 
3853c2c66affSColin Finck /* Chain27 checks a certificate with a subject alternate name containing an
3854c2c66affSColin Finck  * embedded NULL.  Newer crypt32 versions fail to decode such alternate names,
3855c2c66affSColin Finck  * correctly prohibiting them.  Older crypt32 versions do not.  Rather than
3856c2c66affSColin Finck  * ignoring the expected error bits, check each version separately depending
3857c2c66affSColin Finck  * on the chain's error status.
3858c2c66affSColin Finck  */
3859c2c66affSColin Finck static ChainCheck chainCheckEmbeddedNull = {
3860*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(chain27), chain27 },
3861c2c66affSColin Finck  { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_IS_NOT_VALID_FOR_USAGE,
3862c2c66affSColin Finck      CERT_TRUST_HAS_PREFERRED_ISSUER },
3863c2c66affSColin Finck    { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_INVALID_NAME_CONSTRAINTS |
3864c2c66affSColin Finck      CERT_TRUST_INVALID_EXTENSION, 0 },
3865c2c66affSColin Finck    1, simpleStatus27 },
3866c2c66affSColin Finck  0 };
3867c2c66affSColin Finck static ChainCheck chainCheckEmbeddedNullBroken = {
3868*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(chain27), chain27 },
3869c2c66affSColin Finck  { { CERT_TRUST_IS_NOT_TIME_NESTED | CERT_TRUST_IS_NOT_VALID_FOR_USAGE |
3870c2c66affSColin Finck      CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT,
3871c2c66affSColin Finck      CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS | CERT_TRUST_HAS_PREFERRED_ISSUER },
3872c2c66affSColin Finck    { CERT_TRUST_IS_UNTRUSTED_ROOT | CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT,
3873c2c66affSColin Finck      CERT_TRUST_HAS_VALID_NAME_CONSTRAINTS },
3874c2c66affSColin Finck    1, simpleStatus27Broken },
3875c2c66affSColin Finck  0 };
3876c2c66affSColin Finck 
3877c2c66affSColin Finck #define test_name_blob(a,b) _test_name_blob(__LINE__,a,b)
_test_name_blob(unsigned line,CERT_NAME_BLOB * blob,const char * exdata)3878c2c66affSColin Finck static void _test_name_blob(unsigned line, CERT_NAME_BLOB *blob, const char *exdata)
3879c2c66affSColin Finck {
3880c2c66affSColin Finck     char buf[1024];
3881c2c66affSColin Finck 
3882c2c66affSColin Finck     CertNameToStrA(CRYPT_ASN_ENCODING, blob, CERT_SIMPLE_NAME_STR, buf, sizeof(buf));
3883c2c66affSColin Finck     ok_(__FILE__,line)(!strcmp(buf, exdata), "got string %s, expected %s\n", buf, exdata);
3884c2c66affSColin Finck }
3885c2c66affSColin Finck 
testGetCertChain(void)3886c2c66affSColin Finck static void testGetCertChain(void)
3887c2c66affSColin Finck {
3888c2c66affSColin Finck     BOOL ret;
3889c2c66affSColin Finck     PCCERT_CONTEXT cert;
3890c2c66affSColin Finck     CERT_CHAIN_PARA para = { 0 };
3891c2c66affSColin Finck     PCCERT_CHAIN_CONTEXT chain;
3892c2c66affSColin Finck     const CERT_SIMPLE_CHAIN *simple_chain;
3893c2c66affSColin Finck     const CERT_CHAIN_ELEMENT *chain_elem;
3894c2c66affSColin Finck     FILETIME fileTime;
3895c2c66affSColin Finck     DWORD i;
3896c2c66affSColin Finck     HCERTSTORE store;
3897c2c66affSColin Finck     static char one_two_three[] = "1.2.3";
3898c2c66affSColin Finck     static char oid_server_auth[] = szOID_PKIX_KP_SERVER_AUTH;
3899c2c66affSColin Finck     LPSTR oids[2];
3900c2c66affSColin Finck 
3901c2c66affSColin Finck     /* Basic parameter checks */
3902c2c66affSColin Finck     if (0)
3903c2c66affSColin Finck     {
3904c2c66affSColin Finck         /* Crash on Vista */
3905c2c66affSColin Finck         ret = pCertGetCertificateChain(NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL);
3906c2c66affSColin Finck         ok(!ret && GetLastError() == E_INVALIDARG,
3907c2c66affSColin Finck          "Expected E_INVALIDARG, got %08x\n", GetLastError());
3908c2c66affSColin Finck     }
3909c2c66affSColin Finck     ret = pCertGetCertificateChain(NULL, NULL, NULL, NULL, NULL, 0, NULL,
3910c2c66affSColin Finck      &chain);
3911c2c66affSColin Finck     ok(!ret && GetLastError() == E_INVALIDARG,
3912c2c66affSColin Finck      "Expected E_INVALIDARG, got %08x\n", GetLastError());
3913c2c66affSColin Finck     /* Crash
3914c2c66affSColin Finck     ret = pCertGetCertificateChain(NULL, NULL, NULL, NULL, &para, 0, NULL, NULL);
3915c2c66affSColin Finck     ret = pCertGetCertificateChain(NULL, NULL, NULL, NULL, &para, 0, NULL,
3916c2c66affSColin Finck      &chain);
3917c2c66affSColin Finck      */
3918c2c66affSColin Finck     cert = CertCreateCertificateContext(X509_ASN_ENCODING, bigCert,
3919c2c66affSColin Finck      sizeof(bigCert));
3920c2c66affSColin Finck     if (0)
3921c2c66affSColin Finck     {
3922c2c66affSColin Finck         /* Crash on Vista */
3923c2c66affSColin Finck         ret = pCertGetCertificateChain(NULL, cert, NULL, NULL, NULL, 0, NULL, NULL);
3924c2c66affSColin Finck         ok(!ret && GetLastError() == E_INVALIDARG,
3925c2c66affSColin Finck          "Expected E_INVALIDARG, got %08x\n", GetLastError());
3926c2c66affSColin Finck     }
3927c2c66affSColin Finck     /* Crash
3928c2c66affSColin Finck     ret = pCertGetCertificateChain(NULL, cert, NULL, NULL, &para, 0, NULL, NULL);
3929c2c66affSColin Finck      */
3930c2c66affSColin Finck 
3931c2c66affSColin Finck     /* Tests with an invalid cert (one whose signature is bad) */
3932c2c66affSColin Finck     SetLastError(0xdeadbeef);
3933c2c66affSColin Finck     ret = pCertGetCertificateChain(NULL, cert, NULL, NULL, &para, 0, NULL,
3934c2c66affSColin Finck      &chain);
3935c2c66affSColin Finck     ok(!ret, "Expected failure\n");
3936c2c66affSColin Finck     ok(GetLastError() == ERROR_INVALID_DATA ||
3937c2c66affSColin Finck      GetLastError() == CRYPT_E_ASN1_BADTAG /* Vista */,
3938c2c66affSColin Finck      "Expected ERROR_INVALID_DATA or CRYPT_E_ASN1_BADTAG, got %d\n", GetLastError());
3939c2c66affSColin Finck     para.cbSize = sizeof(para);
3940c2c66affSColin Finck     SetLastError(0xdeadbeef);
3941c2c66affSColin Finck     ret = pCertGetCertificateChain(NULL, cert, NULL, NULL, &para, 0, NULL,
3942c2c66affSColin Finck      &chain);
3943c2c66affSColin Finck     ok(!ret, "Expected failure\n");
3944c2c66affSColin Finck     ok(GetLastError() == ERROR_INVALID_DATA ||
3945c2c66affSColin Finck      GetLastError() == CRYPT_E_ASN1_BADTAG /* Vista */,
3946c2c66affSColin Finck      "Expected ERROR_INVALID_DATA or CRYPT_E_ASN1_BADTAG, got %d\n", GetLastError());
3947c2c66affSColin Finck 
3948c2c66affSColin Finck     para.cbSize = 0;
3949c2c66affSColin Finck     SetLastError(0xdeadbeef);
3950c2c66affSColin Finck     ret = pCertGetCertificateChain(NULL, cert, NULL, NULL, &para, 0, NULL,
3951c2c66affSColin Finck      &chain);
3952c2c66affSColin Finck     ok(!ret, "Expected failure\n");
3953c2c66affSColin Finck     ok(GetLastError() == ERROR_INVALID_DATA ||
3954c2c66affSColin Finck      GetLastError() == CRYPT_E_ASN1_BADTAG, /* Vista and higher */
3955c2c66affSColin Finck      "Expected ERROR_INVALID_DATA or CRYPT_E_ASN1_BADTAG, got %d\n", GetLastError());
3956c2c66affSColin Finck 
3957c2c66affSColin Finck     CertFreeCertificateContext(cert);
3958c2c66affSColin Finck 
3959c2c66affSColin Finck     /* Test usage match with Google's cert */
3960c2c66affSColin Finck     store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0,
3961c2c66affSColin Finck      CERT_STORE_CREATE_NEW_FLAG, NULL);
3962c2c66affSColin Finck     CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING,
3963c2c66affSColin Finck      geotrust_global_ca, sizeof(geotrust_global_ca), CERT_STORE_ADD_ALWAYS, NULL);
3964c2c66affSColin Finck     CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING,
3965c2c66affSColin Finck      google_internet_authority, sizeof(google_internet_authority), CERT_STORE_ADD_ALWAYS, NULL);
3966c2c66affSColin Finck     cert = CertCreateCertificateContext(X509_ASN_ENCODING,
3967c2c66affSColin Finck      google_com, sizeof(google_com));
3968c2c66affSColin Finck     SystemTimeToFileTime(&oct2009, &fileTime);
3969c2c66affSColin Finck     memset(&para, 0, sizeof(para));
3970c2c66affSColin Finck     para.cbSize = sizeof(para);
3971c2c66affSColin Finck     oids[0] = one_two_three;
3972c2c66affSColin Finck     para.RequestedUsage.dwType = USAGE_MATCH_TYPE_AND;
3973c2c66affSColin Finck     para.RequestedUsage.Usage.rgpszUsageIdentifier = oids;
3974c2c66affSColin Finck     para.RequestedUsage.Usage.cUsageIdentifier = 1;
3975c2c66affSColin Finck     ret = pCertGetCertificateChain(NULL, cert, &fileTime, store, &para,
3976c2c66affSColin Finck      0, NULL, &chain);
3977c2c66affSColin Finck     ok(ret, "CertGetCertificateChain failed: %08x\n", GetLastError());
3978c2c66affSColin Finck     if (ret)
3979c2c66affSColin Finck     {
3980c2c66affSColin Finck         ok(chain->TrustStatus.dwErrorStatus & CERT_TRUST_IS_NOT_VALID_FOR_USAGE,
3981c2c66affSColin Finck          "expected CERT_TRUST_IS_NOT_VALID_FOR_USAGE\n");
3982c2c66affSColin Finck         pCertFreeCertificateChain(chain);
3983c2c66affSColin Finck     }
3984c2c66affSColin Finck     oids[0] = oid_server_auth;
3985c2c66affSColin Finck     ret = pCertGetCertificateChain(NULL, cert, &fileTime, store, &para,
3986c2c66affSColin Finck      0, NULL, &chain);
3987c2c66affSColin Finck     ok(ret, "CertGetCertificateChain failed: %08x\n", GetLastError());
3988c2c66affSColin Finck     if (ret)
3989c2c66affSColin Finck     {
3990c2c66affSColin Finck         ok(!(chain->TrustStatus.dwErrorStatus & CERT_TRUST_IS_NOT_VALID_FOR_USAGE),
3991c2c66affSColin Finck            "didn't expect CERT_TRUST_IS_NOT_VALID_FOR_USAGE, got %x\n", chain->TrustStatus.dwErrorStatus);
3992c2c66affSColin Finck         pCertFreeCertificateChain(chain);
3993c2c66affSColin Finck     }
3994c2c66affSColin Finck     oids[1] = one_two_three;
3995c2c66affSColin Finck     para.RequestedUsage.Usage.cUsageIdentifier = 2;
3996c2c66affSColin Finck     para.RequestedUsage.dwType = USAGE_MATCH_TYPE_AND;
3997c2c66affSColin Finck     ret = pCertGetCertificateChain(NULL, cert, &fileTime, store, &para,
3998c2c66affSColin Finck      0, NULL, &chain);
3999c2c66affSColin Finck     ok(ret, "CertGetCertificateChain failed: %08x\n", GetLastError());
4000c2c66affSColin Finck     if (ret)
4001c2c66affSColin Finck     {
4002c2c66affSColin Finck         ok(chain->TrustStatus.dwErrorStatus & CERT_TRUST_IS_NOT_VALID_FOR_USAGE,
4003c2c66affSColin Finck          "expected CERT_TRUST_IS_NOT_VALID_FOR_USAGE\n");
4004c2c66affSColin Finck         pCertFreeCertificateChain(chain);
4005c2c66affSColin Finck     }
4006c2c66affSColin Finck     para.RequestedUsage.dwType = USAGE_MATCH_TYPE_OR;
4007c2c66affSColin Finck     ret = pCertGetCertificateChain(NULL, cert, &fileTime, store, &para,
4008c2c66affSColin Finck      0, NULL, &chain);
4009c2c66affSColin Finck     ok(ret, "CertGetCertificateChain failed: %08x\n", GetLastError());
4010c2c66affSColin Finck     if (ret)
4011c2c66affSColin Finck     {
4012c2c66affSColin Finck         ok(!(chain->TrustStatus.dwErrorStatus &
4013c2c66affSColin Finck          CERT_TRUST_IS_NOT_VALID_FOR_USAGE),
4014c2c66affSColin Finck          "didn't expect CERT_TRUST_IS_NOT_VALID_FOR_USAGE\n");
4015c2c66affSColin Finck         pCertFreeCertificateChain(chain);
4016c2c66affSColin Finck     }
4017c2c66affSColin Finck     CertCloseStore(store, 0);
4018c2c66affSColin Finck     CertFreeCertificateContext(cert);
4019c2c66affSColin Finck 
4020*06fdb3e6SAmine Khaldi     for (i = 0; i < ARRAY_SIZE(chainCheck); i++)
4021c2c66affSColin Finck     {
4022c2c66affSColin Finck         chain = getChain(NULL, &chainCheck[i].certs, 0, TRUE, chainCheck[i].validfor,
4023c2c66affSColin Finck          chainCheck[i].todo, i);
4024c2c66affSColin Finck         if (chain)
4025c2c66affSColin Finck         {
4026c2c66affSColin Finck             checkChainStatus(chain, &chainCheck[i].status, chainCheck[i].todo,
4027c2c66affSColin Finck              "chainCheck", i);
4028c2c66affSColin Finck             pCertFreeCertificateChain(chain);
4029c2c66affSColin Finck         }
4030c2c66affSColin Finck     }
4031c2c66affSColin Finck     chain = getChain(NULL, &opensslChainCheck.certs, 0, TRUE, &oct2007,
4032c2c66affSColin Finck      opensslChainCheck.todo, 0);
4033c2c66affSColin Finck     if (chain)
4034c2c66affSColin Finck     {
4035c2c66affSColin Finck         ok(chain->TrustStatus.dwErrorStatus ==
4036c2c66affSColin Finck          opensslChainCheck.status.status.dwErrorStatus ||
4037c2c66affSColin Finck          broken((chain->TrustStatus.dwErrorStatus &
4038c2c66affSColin Finck          ~incompleteOpensslChainCheck.status.statusToIgnore.dwErrorStatus) ==
4039c2c66affSColin Finck          (incompleteOpensslChainCheck.status.status.dwErrorStatus &
4040c2c66affSColin Finck          ~incompleteOpensslChainCheck.status.statusToIgnore.dwErrorStatus)),
4041c2c66affSColin Finck          "unexpected chain error status %08x\n",
4042c2c66affSColin Finck          chain->TrustStatus.dwErrorStatus);
4043c2c66affSColin Finck         if (opensslChainCheck.status.status.dwErrorStatus ==
4044c2c66affSColin Finck          chain->TrustStatus.dwErrorStatus)
4045c2c66affSColin Finck             checkChainStatus(chain, &opensslChainCheck.status,
4046c2c66affSColin Finck              opensslChainCheck.todo, "opensslChainCheck", 0);
4047c2c66affSColin Finck         else
4048c2c66affSColin Finck             checkChainStatus(chain, &incompleteOpensslChainCheck.status,
4049c2c66affSColin Finck              incompleteOpensslChainCheck.todo, "incompleteOpensslChainCheck",
4050c2c66affSColin Finck              0);
4051c2c66affSColin Finck         pCertFreeCertificateChain(chain);
4052c2c66affSColin Finck     }
4053*06fdb3e6SAmine Khaldi     for (i = 0; i < ARRAY_SIZE(chainCheckNoStore); i++)
4054c2c66affSColin Finck     {
4055c2c66affSColin Finck         chain = getChain(NULL, &chainCheckNoStore[i].certs, 0, FALSE, &oct2007,
4056c2c66affSColin Finck          chainCheckNoStore[i].todo, i);
4057c2c66affSColin Finck         if (chain)
4058c2c66affSColin Finck         {
4059c2c66affSColin Finck             checkChainStatus(chain, &chainCheckNoStore[i].status,
4060c2c66affSColin Finck              chainCheckNoStore[i].todo, "chainCheckNoStore", i);
4061c2c66affSColin Finck             pCertFreeCertificateChain(chain);
4062c2c66affSColin Finck         }
4063c2c66affSColin Finck     }
4064c2c66affSColin Finck     chain = getChain(NULL, &chainCheckEmbeddedNull.certs, 0, TRUE, &oct2007,
4065c2c66affSColin Finck      chainCheckEmbeddedNull.todo, 0);
4066c2c66affSColin Finck     if (chain)
4067c2c66affSColin Finck     {
4068c2c66affSColin Finck         ok(chain->TrustStatus.dwErrorStatus ==
4069c2c66affSColin Finck          chainCheckEmbeddedNull.status.status.dwErrorStatus ||
4070c2c66affSColin Finck          broken((chain->TrustStatus.dwErrorStatus &
4071c2c66affSColin Finck          ~chainCheckEmbeddedNullBroken.status.statusToIgnore.dwErrorStatus) ==
4072c2c66affSColin Finck          (chainCheckEmbeddedNullBroken.status.status.dwErrorStatus &
4073c2c66affSColin Finck          ~chainCheckEmbeddedNullBroken.status.statusToIgnore.dwErrorStatus)),
4074c2c66affSColin Finck          "unexpected chain error status %08x\n",
4075c2c66affSColin Finck          chain->TrustStatus.dwErrorStatus);
4076c2c66affSColin Finck         if (chainCheckEmbeddedNull.status.status.dwErrorStatus ==
4077c2c66affSColin Finck          chain->TrustStatus.dwErrorStatus)
4078c2c66affSColin Finck             checkChainStatus(chain, &chainCheckEmbeddedNull.status,
4079c2c66affSColin Finck              chainCheckEmbeddedNull.todo, "chainCheckEmbeddedNull", 0);
4080c2c66affSColin Finck         else
4081c2c66affSColin Finck             checkChainStatus(chain, &chainCheckEmbeddedNullBroken.status,
4082c2c66affSColin Finck              chainCheckEmbeddedNullBroken.todo, "chainCheckEmbeddedNullBroken",
4083c2c66affSColin Finck              0);
4084c2c66affSColin Finck         pCertFreeCertificateChain(chain);
4085c2c66affSColin Finck     }
4086c2c66affSColin Finck 
4087c2c66affSColin Finck     store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0, CERT_STORE_CREATE_NEW_FLAG, NULL);
4088c2c66affSColin Finck     ok(store != NULL, "CertOpenStore failed: %u\n", GetLastError());
4089c2c66affSColin Finck 
4090c2c66affSColin Finck     ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, winehq_org, sizeof(winehq_org),
4091c2c66affSColin Finck             CERT_STORE_ADD_ALWAYS, &cert);
4092c2c66affSColin Finck     ok(ret, "CertAddEncodedCertificateToStore failed: %u\n", GetLastError());
4093c2c66affSColin Finck 
4094c2c66affSColin Finck     oids[0] = oid_server_auth;
4095c2c66affSColin Finck     memset(&para, 0, sizeof(para));
4096c2c66affSColin Finck     para.cbSize = sizeof(para);
4097c2c66affSColin Finck     para.RequestedUsage.Usage.cUsageIdentifier = 1;
4098c2c66affSColin Finck     para.RequestedUsage.Usage.rgpszUsageIdentifier = oids;
4099c2c66affSColin Finck     SystemTimeToFileTime(&jun2013, &fileTime);
4100c2c66affSColin Finck 
4101c2c66affSColin Finck     /* Pass store that does not contain all certs in chain. */
4102c2c66affSColin Finck     ret = CertGetCertificateChain(NULL, cert, &fileTime, store, &para, 0, NULL, &chain);
4103c2c66affSColin Finck     ok(ret, "CertGetCertificateChain failed: %u\n", GetLastError());
4104c2c66affSColin Finck 
4105c2c66affSColin Finck     if(chain->TrustStatus.dwErrorStatus == CERT_TRUST_IS_PARTIAL_CHAIN) { /* win2k */
4106c2c66affSColin Finck         win_skip("winehq cert reported as partial chain, skipping its tests\n");
4107c2c66affSColin Finck         pCertFreeCertificateChain(chain);
4108c2c66affSColin Finck         CertCloseStore(store, 0);
4109c2c66affSColin Finck         return;
4110c2c66affSColin Finck     }
4111c2c66affSColin Finck 
4112c2c66affSColin Finck     ok(!chain->TrustStatus.dwErrorStatus, "chain->TrustStatus.dwErrorStatus = %x\n", chain->TrustStatus.dwErrorStatus);
4113c2c66affSColin Finck     todo_wine
4114c2c66affSColin Finck     ok(chain->TrustStatus.dwInfoStatus == CERT_TRUST_HAS_PREFERRED_ISSUER, "chain->TrustStatus.dwInfoStatus = %x\n",
4115c2c66affSColin Finck        chain->TrustStatus.dwInfoStatus);
4116c2c66affSColin Finck 
4117c2c66affSColin Finck     ok(chain->cChain == 1, "chain->cChain = %d\n", chain->cChain);
4118c2c66affSColin Finck     ok(!chain->cLowerQualityChainContext, "chain->cLowerQualityChainContext = %x\n", chain->cLowerQualityChainContext);
4119c2c66affSColin Finck     ok(!chain->rgpLowerQualityChainContext, "chain->rgpLowerQualityChainContext =  %p\n", chain->rgpLowerQualityChainContext);
4120c2c66affSColin Finck 
4121c2c66affSColin Finck     simple_chain = *chain->rgpChain;
4122c2c66affSColin Finck     ok(simple_chain->cbSize == sizeof(*simple_chain), "simple_chain->cbSize = %u\n", simple_chain->cbSize);
4123c2c66affSColin Finck     ok(!simple_chain->TrustStatus.dwErrorStatus, "simple_chain->TrustStatus.dwErrorStatus = %x\n",
4124c2c66affSColin Finck        simple_chain->TrustStatus.dwErrorStatus);
4125c2c66affSColin Finck     todo_wine
4126c2c66affSColin Finck     ok(simple_chain->TrustStatus.dwInfoStatus == CERT_TRUST_HAS_PREFERRED_ISSUER,
4127c2c66affSColin Finck        "simple_chain->TrustStatus.dwInfoStatus = %x\n", simple_chain->TrustStatus.dwInfoStatus);
4128c2c66affSColin Finck     ok(simple_chain->cElement == 3, "simple_chain->cElement = %u\n", simple_chain->cElement);
4129c2c66affSColin Finck 
4130c2c66affSColin Finck     for(i=0; i < simple_chain->cElement; i++) {
4131c2c66affSColin Finck         chain_elem = simple_chain->rgpElement[i];
4132c2c66affSColin Finck         ok(chain_elem->cbSize == sizeof(*chain_elem), "chain_elem->cbSize = %u\n", chain_elem->cbSize);
4133c2c66affSColin Finck 
4134c2c66affSColin Finck         ok(!chain_elem->TrustStatus.dwErrorStatus, "chain_elem->TrustStatus.dwErrorStatus = %x\n",
4135c2c66affSColin Finck            chain_elem->TrustStatus.dwErrorStatus);
4136c2c66affSColin Finck         trace("info[%u] = %x\n", i, chain_elem->TrustStatus.dwInfoStatus);
4137c2c66affSColin Finck         ok(chain_elem->pCertContext->dwCertEncodingType == CRYPT_ASN_ENCODING,
4138c2c66affSColin Finck            "chain_elem->pCertContext->dwCertEncodingType = %x\n",
4139c2c66affSColin Finck            chain_elem->pCertContext->dwCertEncodingType);
4140c2c66affSColin Finck     }
4141c2c66affSColin Finck 
4142c2c66affSColin Finck     ok(simple_chain->rgpElement[0]->pCertContext == cert, "simple_chain->rgpElement[0]->pCertContext != cert\n");
4143c2c66affSColin Finck     test_name_blob(&simple_chain->rgpElement[1]->pCertContext->pCertInfo->Issuer, "US, GeoTrust Inc., GeoTrust Global CA");
4144c2c66affSColin Finck     test_name_blob(&simple_chain->rgpElement[1]->pCertContext->pCertInfo->Subject, "US, \"GeoTrust, Inc.\", RapidSSL CA");
4145c2c66affSColin Finck     test_name_blob(&simple_chain->rgpElement[2]->pCertContext->pCertInfo->Issuer, "US, GeoTrust Inc., GeoTrust Global CA");
4146c2c66affSColin Finck     test_name_blob(&simple_chain->rgpElement[2]->pCertContext->pCertInfo->Subject, "US, GeoTrust Inc., GeoTrust Global CA");
4147c2c66affSColin Finck 
4148c2c66affSColin Finck     pCertFreeCertificateChain(chain);
4149c2c66affSColin Finck 
4150*06fdb3e6SAmine Khaldi     /* Test revocation flags */
4151*06fdb3e6SAmine Khaldi     ret = CertGetCertificateChain(NULL, cert, &fileTime, store, &para, CERT_CHAIN_REVOCATION_CHECK_END_CERT, NULL,
4152*06fdb3e6SAmine Khaldi                                   &chain);
4153*06fdb3e6SAmine Khaldi     ok(ret, "CertGetCertificateChain failed: %u\n", GetLastError());
4154*06fdb3e6SAmine Khaldi     ok(!chain->TrustStatus.dwErrorStatus, "chain->TrustStatus.dwErrorStatus = %x\n", chain->TrustStatus.dwErrorStatus);
4155d03ac84fSAmine Khaldi     pCertFreeCertificateChain(chain);
4156*06fdb3e6SAmine Khaldi 
4157*06fdb3e6SAmine Khaldi     ret = CertGetCertificateChain(NULL, cert, &fileTime, store, &para, CERT_CHAIN_REVOCATION_CHECK_CHAIN, NULL, &chain);
4158*06fdb3e6SAmine Khaldi     ok(ret, "CertGetCertificateChain failed: %u\n", GetLastError());
4159*06fdb3e6SAmine Khaldi     ok(!chain->TrustStatus.dwErrorStatus
4160*06fdb3e6SAmine Khaldi            || broken(chain->TrustStatus.dwErrorStatus == CERT_TRUST_REVOCATION_STATUS_UNKNOWN), /* XP */
4161*06fdb3e6SAmine Khaldi        "chain->TrustStatus.dwErrorStatus = %x\n", chain->TrustStatus.dwErrorStatus);
4162*06fdb3e6SAmine Khaldi     pCertFreeCertificateChain(chain);
4163*06fdb3e6SAmine Khaldi 
4164*06fdb3e6SAmine Khaldi     ret = CertGetCertificateChain(NULL, cert, &fileTime, store, &para, CERT_CHAIN_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT,
4165*06fdb3e6SAmine Khaldi                                   NULL, &chain);
4166*06fdb3e6SAmine Khaldi     ok(ret, "CertGetCertificateChain failed: %u\n", GetLastError());
4167*06fdb3e6SAmine Khaldi     ok(!chain->TrustStatus.dwErrorStatus, "chain->TrustStatus.dwErrorStatus = %x\n", chain->TrustStatus.dwErrorStatus);
4168*06fdb3e6SAmine Khaldi     pCertFreeCertificateChain(chain);
4169d03ac84fSAmine Khaldi 
4170c2c66affSColin Finck     /* Test HCCE_LOCAL_MACHINE */
4171c2c66affSColin Finck     ret = CertGetCertificateChain(HCCE_LOCAL_MACHINE, cert, &fileTime, store, &para, 0, NULL, &chain);
4172c2c66affSColin Finck     ok(ret, "CertGetCertificateChain failed: %u\n", GetLastError());
4173c2c66affSColin Finck     pCertFreeCertificateChain(chain);
4174c2c66affSColin Finck 
4175c2c66affSColin Finck     CertFreeCertificateContext(cert);
4176c2c66affSColin Finck     CertCloseStore(store, 0);
4177c2c66affSColin Finck }
4178c2c66affSColin Finck 
test_CERT_CHAIN_PARA_cbSize(void)4179c2c66affSColin Finck static void test_CERT_CHAIN_PARA_cbSize(void)
4180c2c66affSColin Finck {
4181c2c66affSColin Finck     BOOL ret;
4182c2c66affSColin Finck     PCCERT_CONTEXT cert;
4183c2c66affSColin Finck     CERT_CHAIN_PARA para = { 0 };
4184c2c66affSColin Finck     PCCERT_CHAIN_CONTEXT chain;
4185c2c66affSColin Finck     HCERTSTORE store;
4186c2c66affSColin Finck     DWORD i;
4187c2c66affSColin Finck 
4188c2c66affSColin Finck     store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0,
4189c2c66affSColin Finck      CERT_STORE_CREATE_NEW_FLAG, NULL);
4190c2c66affSColin Finck 
4191c2c66affSColin Finck     ret = CertAddEncodedCertificateToStore(store,
4192c2c66affSColin Finck      X509_ASN_ENCODING, chain0_0, sizeof(chain0_0),
4193c2c66affSColin Finck      CERT_STORE_ADD_ALWAYS, NULL);
4194c2c66affSColin Finck     ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError());
4195c2c66affSColin Finck     ret = CertAddEncodedCertificateToStore(store,
4196c2c66affSColin Finck      X509_ASN_ENCODING, chain0_1, sizeof(chain0_1),
4197c2c66affSColin Finck      CERT_STORE_ADD_ALWAYS, &cert);
4198c2c66affSColin Finck     ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError());
4199c2c66affSColin Finck 
4200c2c66affSColin Finck     for (i = 0; i < sizeof(CERT_CHAIN_PARA) + 2; i++)
4201c2c66affSColin Finck     {
4202c2c66affSColin Finck         FILETIME fileTime;
4203c2c66affSColin Finck 
4204c2c66affSColin Finck         SystemTimeToFileTime(&oct2007, &fileTime);
4205c2c66affSColin Finck 
4206c2c66affSColin Finck         para.cbSize = i;
4207c2c66affSColin Finck         ret = pCertGetCertificateChain(NULL, cert, &fileTime,
4208c2c66affSColin Finck          NULL, &para, 0, NULL, &chain);
4209c2c66affSColin Finck         ok(ret, "CertGetCertificateChain failed %u\n", GetLastError());
4210c2c66affSColin Finck         pCertFreeCertificateChain(chain);
4211c2c66affSColin Finck     }
4212c2c66affSColin Finck 
4213c2c66affSColin Finck     CertFreeCertificateContext(cert);
4214c2c66affSColin Finck     CertCloseStore(store, 0);
4215c2c66affSColin Finck }
4216c2c66affSColin Finck 
4217c2c66affSColin Finck typedef struct _ChainPolicyCheck
4218c2c66affSColin Finck {
4219c2c66affSColin Finck     CONST_BLOB_ARRAY                certs;
4220c2c66affSColin Finck     CERT_CHAIN_POLICY_STATUS        status;
4221c2c66affSColin Finck     const CERT_CHAIN_POLICY_STATUS *brokenStatus;
4222c2c66affSColin Finck     DWORD                           todo;
4223c2c66affSColin Finck } ChainPolicyCheck;
4224c2c66affSColin Finck 
4225c2c66affSColin Finck static const ChainPolicyCheck basePolicyCheck[] = {
4226*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain0), chain0 },
4227c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4228*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain1), chain1 },
4229c2c66affSColin Finck    { 0, TRUST_E_CERT_SIGNATURE, 0, 0, NULL }, NULL, 0 },
4230*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain2), chain2 },
4231c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4232*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain3), chain3 },
4233c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4234*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain4), chain4 },
4235c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 2, NULL }, NULL, 0 },
4236*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain5), chain5 },
4237c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4238*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain6), chain6 },
4239c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4240*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain7), chain7 },
4241c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4242*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain8), chain8 },
4243c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 2, NULL }, NULL, 0 },
4244*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain9), chain9 },
4245c2c66affSColin Finck    { 0, CERT_E_CHAINING, 0, -1, NULL }, NULL, 0 },
4246*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain10), chain10 },
4247c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4248*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain11), chain11 },
4249c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4250*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain12), chain12 },
4251c2c66affSColin Finck    { 0, TRUST_E_CERT_SIGNATURE, 0, 1, NULL }, NULL, 0 },
4252*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain13), chain13 },
4253c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4254*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain14), chain14 },
4255c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4256*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain15), chain15 },
4257c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4258*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain16), chain16 },
4259c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4260*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain17), chain17 },
4261c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 2, NULL }, NULL, 0 },
4262*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain18), chain18 },
4263c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 2, NULL }, NULL, 0 },
4264*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(selfSignedChain), selfSignedChain },
4265c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 0, NULL }, NULL, 0 },
4266c2c66affSColin Finck };
4267c2c66affSColin Finck 
4268c2c66affSColin Finck /* Windows NT 4 has a different error code when the validity period doesn't
4269c2c66affSColin Finck  * nest.  (It's arguably more correct than other Windows versions, but since
4270c2c66affSColin Finck  * others do not emulate its behavior, we mark its behavior broken.)
4271c2c66affSColin Finck  */
4272c2c66affSColin Finck static const CERT_CHAIN_POLICY_STATUS badDateNestingStatus =
4273c2c66affSColin Finck  { 0, CERT_E_VALIDITYPERIODNESTING, 0, 0, NULL };
4274c2c66affSColin Finck 
4275c2c66affSColin Finck static const ChainPolicyCheck ignoredBadDateNestingBasePolicyCheck = {
4276*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(chain2), chain2 },
4277c2c66affSColin Finck  { 0, CERT_E_EXPIRED, 0, 1, NULL}, &badDateNestingStatus, TODO_ELEMENTS
4278c2c66affSColin Finck };
4279c2c66affSColin Finck 
4280c2c66affSColin Finck static const ChainPolicyCheck ignoredInvalidDateBasePolicyCheck = {
4281*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(googleChain), googleChain },
4282c2c66affSColin Finck  { 0, CERT_E_EXPIRED, 0, 1, NULL}, &badDateNestingStatus, TODO_ELEMENTS
4283c2c66affSColin Finck };
4284c2c66affSColin Finck 
4285c2c66affSColin Finck static const ChainPolicyCheck ignoredInvalidUsageBasePolicyCheck = {
4286*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(chain15), chain15 },
4287c2c66affSColin Finck  { 0, CERT_E_EXPIRED, 0, 1, NULL}, NULL, TODO_ERROR
4288c2c66affSColin Finck };
4289c2c66affSColin Finck 
4290c2c66affSColin Finck static const ChainPolicyCheck invalidUsageBasePolicyCheck = {
4291*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(chain15), chain15 },
4292c2c66affSColin Finck  { 0, CERT_E_WRONG_USAGE, 0, 1, NULL}, NULL, 0
4293c2c66affSColin Finck };
4294c2c66affSColin Finck 
4295c2c66affSColin Finck static const ChainPolicyCheck sslPolicyCheck[] = {
4296*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain0), chain0 },
4297c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4298*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain1), chain1 },
4299c2c66affSColin Finck    { 0, TRUST_E_CERT_SIGNATURE, 0, 0, NULL }, NULL, 0 },
4300*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain2), chain2 },
4301c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4302*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain3), chain3 },
4303c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4304*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain4), chain4 },
4305c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 2, NULL }, NULL, 0 },
4306*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain5), chain5 },
4307c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4308*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain6), chain6 },
4309c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4310*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain7), chain7 },
4311c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4312*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain8), chain8 },
4313c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 2, NULL }, NULL, 0 },
4314*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain9), chain9 },
4315c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, -1, NULL }, NULL, 0 },
4316*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain10), chain10 },
4317c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4318*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain11), chain11 },
4319c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4320*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain12), chain12 },
4321c2c66affSColin Finck    { 0, TRUST_E_CERT_SIGNATURE, 0, 1, NULL }, NULL, 0 },
4322*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain13), chain13 },
4323c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4324*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain14), chain14 },
4325c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4326*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain15), chain15 },
4327c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4328*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain16), chain16 },
4329c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4330*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain17), chain17 },
4331c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 2, NULL }, NULL, 0 },
4332*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain18), chain18 },
4333c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 2, NULL }, NULL, 0 },
4334*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(selfSignedChain), selfSignedChain },
4335c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 0, NULL }, NULL, 0 },
4336c2c66affSColin Finck };
4337c2c66affSColin Finck 
4338c2c66affSColin Finck static const ChainPolicyCheck ignoredUnknownCAPolicyCheck = {
4339*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(chain0), chain0 },
4340c2c66affSColin Finck  { 0, CERT_E_EXPIRED, 0, 0, NULL }, NULL, 0
4341c2c66affSColin Finck };
4342c2c66affSColin Finck 
4343c2c66affSColin Finck static const ChainPolicyCheck googlePolicyCheckWithMatchingNameExpired = {
4344*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(googleChain), googleChain },
4345c2c66affSColin Finck  { 0, CERT_E_EXPIRED, 0, 0, NULL}, NULL, 0
4346c2c66affSColin Finck };
4347c2c66affSColin Finck 
4348c2c66affSColin Finck /* Win98 sees the chain as expired, even though it isn't for the date tested */
4349c2c66affSColin Finck static const CERT_CHAIN_POLICY_STATUS expiredStatus =
4350c2c66affSColin Finck  { 0, CERT_E_EXPIRED, 0, 0, NULL };
4351c2c66affSColin Finck 
4352c2c66affSColin Finck static const ChainPolicyCheck googlePolicyCheckWithMatchingName = {
4353*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(googleChain), googleChain },
4354c2c66affSColin Finck  { 0, 0, -1, -1, NULL}, &expiredStatus, 0
4355c2c66affSColin Finck };
4356c2c66affSColin Finck 
4357c2c66affSColin Finck /* Win98 does not trust the root of the OpenSSL chain or the Stanford chain */
4358c2c66affSColin Finck static const CERT_CHAIN_POLICY_STATUS untrustedRootStatus =
4359c2c66affSColin Finck  { 0, CERT_E_UNTRUSTEDROOT, 0, 0, NULL };
4360c2c66affSColin Finck 
4361c2c66affSColin Finck static const ChainPolicyCheck opensslPolicyCheckWithMatchingName = {
4362*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(opensslChain), opensslChain },
4363c2c66affSColin Finck  { 0, 0, -1, -1, NULL}, &untrustedRootStatus, 0
4364c2c66affSColin Finck };
4365c2c66affSColin Finck 
4366c2c66affSColin Finck static const ChainPolicyCheck opensslPolicyCheckWithoutMatchingName = {
4367*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(opensslChain), opensslChain },
4368c2c66affSColin Finck  { 0, CERT_E_CN_NO_MATCH, 0, 0, NULL}, &untrustedRootStatus, 0
4369c2c66affSColin Finck };
4370c2c66affSColin Finck 
4371c2c66affSColin Finck static const ChainPolicyCheck winehqPolicyCheckWithMatchingName = {
4372*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(chain29), chain29 },
4373c2c66affSColin Finck  { 0, 0, -1, -1, NULL}, NULL, 0
4374c2c66affSColin Finck };
4375c2c66affSColin Finck 
4376c2c66affSColin Finck static const ChainPolicyCheck winehqPolicyCheckWithoutMatchingName = {
4377*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(chain29), chain29 },
4378c2c66affSColin Finck  { 0, CERT_E_CN_NO_MATCH, 0, 0, NULL}, NULL, 0
4379c2c66affSColin Finck };
4380c2c66affSColin Finck 
4381c2c66affSColin Finck static const ChainPolicyCheck stanfordPolicyCheckWithMatchingName = {
4382*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(stanfordChain), stanfordChain },
4383c2c66affSColin Finck  { 0, 0, -1, -1, NULL}, &untrustedRootStatus, 0
4384c2c66affSColin Finck };
4385c2c66affSColin Finck 
4386c2c66affSColin Finck static const ChainPolicyCheck stanfordPolicyCheckWithoutMatchingName = {
4387*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(stanfordChain), stanfordChain },
4388c2c66affSColin Finck  { 0, CERT_E_CN_NO_MATCH, 0, 0, NULL}, &untrustedRootStatus, 0
4389c2c66affSColin Finck };
4390c2c66affSColin Finck 
4391c2c66affSColin Finck static const ChainPolicyCheck nullTerminatedDomainComponentPolicyCheck = {
4392*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(battlenetChain), battlenetChain },
4393c2c66affSColin Finck  { 0, 0, -1, -1, NULL}, &untrustedRootStatus, 0
4394c2c66affSColin Finck };
4395c2c66affSColin Finck 
4396c2c66affSColin Finck static const ChainPolicyCheck invalidExtensionPolicyCheck = {
4397*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(chain30), chain30 },
4398c2c66affSColin Finck  { 0, CERT_E_CRITICAL, 0, 1, NULL}, &badDateNestingStatus, 0
4399c2c66affSColin Finck };
4400c2c66affSColin Finck 
4401c2c66affSColin Finck static const ChainPolicyCheck fooPolicyCheckWithMatchingName = {
4402*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(chain31), chain31 },
4403c2c66affSColin Finck  { 0, 0, -1, -1, NULL}, NULL, 0
4404c2c66affSColin Finck };
4405c2c66affSColin Finck 
4406c2c66affSColin Finck static const ChainPolicyCheck fooPolicyCheckWithoutMatchingName = {
4407*06fdb3e6SAmine Khaldi  { ARRAY_SIZE(chain31), chain31 },
4408c2c66affSColin Finck  { 0, CERT_E_CN_NO_MATCH, 0, 0, NULL}, NULL, 0
4409c2c66affSColin Finck };
4410c2c66affSColin Finck 
4411c2c66affSColin Finck static const ChainPolicyCheck authenticodePolicyCheck[] = {
4412*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain0), chain0 },
4413c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4414*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain1), chain1 },
4415c2c66affSColin Finck    { 0, TRUST_E_CERT_SIGNATURE, 0, 0, NULL }, NULL, 0 },
4416*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain2), chain2 },
4417c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4418*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain3), chain3 },
4419c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4420*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain4), chain4 },
4421c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 2, NULL }, NULL, 0 },
4422*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain5), chain5 },
4423c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4424*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain6), chain6 },
4425c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4426*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain7), chain7 },
4427c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4428*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain8), chain8 },
4429c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 2, NULL }, NULL, 0 },
4430*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain9), chain9 },
4431c2c66affSColin Finck    { 0, CERT_E_CHAINING, 0, -1, NULL }, NULL, 0 },
4432*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain10), chain10 },
4433c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4434*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain11), chain11 },
4435c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4436*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain12), chain12 },
4437c2c66affSColin Finck    { 0, TRUST_E_CERT_SIGNATURE, 0, 1, NULL }, NULL, 0 },
4438*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain13), chain13 },
4439c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4440*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain14), chain14 },
4441c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4442*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain15), chain15 },
4443c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4444*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain16), chain16 },
4445c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 1, NULL }, NULL, 0 },
4446*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain17), chain17 },
4447c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 2, NULL }, NULL, 0 },
4448*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain18), chain18 },
4449c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 2, NULL }, NULL, 0 },
4450*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(selfSignedChain), selfSignedChain },
4451c2c66affSColin Finck    { 0, CERT_E_UNTRUSTEDROOT, 0, 0, NULL }, NULL, 0 },
4452c2c66affSColin Finck };
4453c2c66affSColin Finck 
4454c2c66affSColin Finck /* On some older systems, the element index is set to 2 rather than 1 for
4455c2c66affSColin Finck  * chain 4, because they do not catch the basic constraints error in the
4456c2c66affSColin Finck  * chain, which occurs at element 1.
4457c2c66affSColin Finck  */
4458c2c66affSColin Finck static const CERT_CHAIN_POLICY_STATUS chain4BrokenStatus =
4459c2c66affSColin Finck  { 0, TRUST_E_BASIC_CONSTRAINTS, 0, 2, NULL };
4460c2c66affSColin Finck 
4461c2c66affSColin Finck static const ChainPolicyCheck basicConstraintsPolicyCheck[] = {
4462*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain0), chain0 },
4463c2c66affSColin Finck    { 0, 0, -1, -1, NULL }, NULL, 0 },
4464*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain1), chain1 },
4465c2c66affSColin Finck    { 0, 0, -1, -1, NULL }, NULL, 0 },
4466*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain2), chain2 },
4467c2c66affSColin Finck    { 0, 0, -1, -1, NULL }, NULL, 0 },
4468*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain3), chain3 },
4469c2c66affSColin Finck    { 0, TRUST_E_BASIC_CONSTRAINTS, 0, 1, NULL }, NULL, 0 },
4470*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain4), chain4 },
4471c2c66affSColin Finck    { 0, TRUST_E_BASIC_CONSTRAINTS, 0, 1, NULL }, &chain4BrokenStatus, 0 },
4472*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain5), chain5 },
4473c2c66affSColin Finck    { 0, 0, -1, -1, NULL }, NULL, 0 },
4474*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain6), chain6 },
4475c2c66affSColin Finck    { 0, 0, -1, -1, NULL }, NULL, 0 },
4476*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain7), chain7 },
4477c2c66affSColin Finck    { 0, 0, -1, -1, NULL }, NULL, 0 },
4478*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain8), chain8 },
4479c2c66affSColin Finck    { 0, TRUST_E_BASIC_CONSTRAINTS, 0, 1, NULL }, NULL, 0 },
4480*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain9), chain9 },
4481c2c66affSColin Finck    { 0, TRUST_E_BASIC_CONSTRAINTS, 0, 1, NULL }, NULL, 0 },
4482*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain10), chain10 },
4483c2c66affSColin Finck    { 0, 0, -1, -1, NULL }, NULL, 0 },
4484*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain11), chain11 },
4485c2c66affSColin Finck    { 0, 0, -1, -1, NULL }, NULL, 0 },
4486*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain12), chain12 },
4487c2c66affSColin Finck    { 0, 0, -1, -1, NULL }, NULL, 0 },
4488*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain13), chain13 },
4489c2c66affSColin Finck    { 0, 0, -1, -1, NULL }, NULL, 0 },
4490*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain14), chain14 },
4491c2c66affSColin Finck    { 0, 0, -1, -1, NULL }, NULL, 0 },
4492*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain15), chain15 },
4493c2c66affSColin Finck    { 0, 0, -1, -1, NULL }, NULL, 0 },
4494*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain16), chain16 },
4495c2c66affSColin Finck    { 0, 0, -1, -1, NULL }, NULL, 0 },
4496*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain17), chain17 },
4497c2c66affSColin Finck    { 0, 0, -1, -1, NULL }, NULL, 0 },
4498*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(chain18), chain18 },
4499c2c66affSColin Finck    { 0, 0, -1, -1, NULL }, NULL, 0 },
4500*06fdb3e6SAmine Khaldi  { { ARRAY_SIZE(selfSignedChain), selfSignedChain },
4501c2c66affSColin Finck    { 0, 0, -1, -1, NULL }, NULL, 0 },
4502c2c66affSColin Finck };
4503c2c66affSColin Finck 
num_to_str(WORD num)4504c2c66affSColin Finck static const char *num_to_str(WORD num)
4505c2c66affSColin Finck {
4506c2c66affSColin Finck     static char buf[6];
4507c2c66affSColin Finck 
4508c2c66affSColin Finck     sprintf(buf, "#%04X", num);
4509c2c66affSColin Finck     return buf;
4510c2c66affSColin Finck }
4511c2c66affSColin Finck 
checkChainPolicyStatus(LPCSTR policy,HCERTCHAINENGINE engine,const ChainPolicyCheck * check,LPCSTR testName,DWORD testIndex,SYSTEMTIME * sysTime,PCERT_CHAIN_POLICY_PARA para)4512c2c66affSColin Finck static void checkChainPolicyStatus(LPCSTR policy, HCERTCHAINENGINE engine,
4513c2c66affSColin Finck  const ChainPolicyCheck *check, LPCSTR testName, DWORD testIndex,
4514c2c66affSColin Finck  SYSTEMTIME *sysTime, PCERT_CHAIN_POLICY_PARA para)
4515c2c66affSColin Finck {
4516c2c66affSColin Finck     PCCERT_CHAIN_CONTEXT chain = getChain(engine, &check->certs, 0, TRUE,
4517c2c66affSColin Finck      sysTime, check->todo, testIndex);
4518c2c66affSColin Finck 
4519c2c66affSColin Finck     if (chain)
4520c2c66affSColin Finck     {
4521c2c66affSColin Finck         CERT_CHAIN_POLICY_STATUS policyStatus = { 0 };
4522c2c66affSColin Finck         BOOL ret = pCertVerifyCertificateChainPolicy(policy, chain, para,
4523c2c66affSColin Finck          &policyStatus);
4524c2c66affSColin Finck 
4525c2c66affSColin Finck         if (check->todo & TODO_POLICY)
4526c2c66affSColin Finck             todo_wine ok(ret,
4527c2c66affSColin Finck              "%s[%d](%s): CertVerifyCertificateChainPolicy failed: %08x\n",
4528c2c66affSColin Finck              testName, testIndex,
4529c2c66affSColin Finck              IS_INTOID(policy) ? num_to_str(LOWORD(policy)) : policy,
4530c2c66affSColin Finck              GetLastError());
4531c2c66affSColin Finck         else
4532c2c66affSColin Finck         {
4533c2c66affSColin Finck             if (!ret && GetLastError() == ERROR_FILE_NOT_FOUND)
4534c2c66affSColin Finck             {
4535c2c66affSColin Finck                 skip("%s[%d]: missing policy %s, skipping test\n",
4536c2c66affSColin Finck                  testName, testIndex,
4537c2c66affSColin Finck                  IS_INTOID(policy) ? num_to_str(LOWORD(policy)) : policy);
4538c2c66affSColin Finck                 pCertFreeCertificateChain(chain);
4539c2c66affSColin Finck                 return;
4540c2c66affSColin Finck             }
4541c2c66affSColin Finck             ok(ret, "%s[%d](%s): CertVerifyCertificateChainPolicy failed: %08x\n",
4542c2c66affSColin Finck              testName, testIndex,
4543c2c66affSColin Finck              IS_INTOID(policy) ? num_to_str(LOWORD(policy)) : policy,
4544c2c66affSColin Finck              GetLastError());
4545c2c66affSColin Finck         }
4546c2c66affSColin Finck         if (ret)
4547c2c66affSColin Finck         {
4548c2c66affSColin Finck             todo_wine_if (check->todo & TODO_ERROR)
4549c2c66affSColin Finck                 ok(policyStatus.dwError == check->status.dwError ||
4550c2c66affSColin Finck                  broken(policyStatus.dwError == CERT_TRUST_NO_ERROR) ||
4551c2c66affSColin Finck                  (check->brokenStatus && broken(policyStatus.dwError ==
4552c2c66affSColin Finck                  check->brokenStatus->dwError)),
4553c2c66affSColin Finck                  "%s[%d](%s): expected %08x, got %08x\n",
4554c2c66affSColin Finck                  testName, testIndex,
4555c2c66affSColin Finck                  IS_INTOID(policy) ? num_to_str(LOWORD(policy)) : policy,
4556c2c66affSColin Finck                  check->status.dwError, policyStatus.dwError);
4557c2c66affSColin Finck             if (policyStatus.dwError != check->status.dwError)
4558c2c66affSColin Finck             {
4559c2c66affSColin Finck                 skip("%s[%d](%s): error %08x doesn't match expected %08x, not checking indexes\n",
4560c2c66affSColin Finck                  testName, testIndex,
4561c2c66affSColin Finck                  IS_INTOID(policy) ? num_to_str(LOWORD(policy)) : policy,
4562c2c66affSColin Finck                  policyStatus.dwError, check->status.dwError);
4563c2c66affSColin Finck                 pCertFreeCertificateChain(chain);
4564c2c66affSColin Finck                 return;
4565c2c66affSColin Finck             }
4566c2c66affSColin Finck             todo_wine_if (check->todo & TODO_CHAINS)
4567c2c66affSColin Finck                 ok(policyStatus.lChainIndex == check->status.lChainIndex ||
4568c2c66affSColin Finck                  (check->brokenStatus && broken(policyStatus.lChainIndex ==
4569c2c66affSColin Finck                  check->brokenStatus->lChainIndex)),
4570c2c66affSColin Finck                  "%s[%d](%s): expected %d, got %d\n",
4571c2c66affSColin Finck                  testName, testIndex,
4572c2c66affSColin Finck                  IS_INTOID(policy) ? num_to_str(LOWORD(policy)) : policy,
4573c2c66affSColin Finck                  check->status.lChainIndex, policyStatus.lChainIndex);
4574c2c66affSColin Finck             todo_wine_if (check->todo & TODO_ELEMENTS)
4575c2c66affSColin Finck                 ok(policyStatus.lElementIndex == check->status.lElementIndex ||
4576c2c66affSColin Finck                  (check->brokenStatus && broken(policyStatus.lElementIndex ==
4577c2c66affSColin Finck                  check->brokenStatus->lElementIndex)),
4578c2c66affSColin Finck                  "%s[%d](%s): expected %d, got %d\n",
4579c2c66affSColin Finck                  testName, testIndex,
4580c2c66affSColin Finck                  IS_INTOID(policy) ? num_to_str(LOWORD(policy)) : policy,
4581c2c66affSColin Finck                  check->status.lElementIndex, policyStatus.lElementIndex);
4582c2c66affSColin Finck         }
4583c2c66affSColin Finck         pCertFreeCertificateChain(chain);
4584c2c66affSColin Finck     }
4585c2c66affSColin Finck }
4586c2c66affSColin Finck 
4587c2c66affSColin Finck #define CHECK_CHAIN_POLICY_STATUS_ARRAY(policy, engine, array, date, para) \
4588c2c66affSColin Finck     do { \
4589c2c66affSColin Finck         DWORD i; \
4590*06fdb3e6SAmine Khaldi         for (i = 0; i < ARRAY_SIZE(array); i++) \
4591c2c66affSColin Finck             checkChainPolicyStatus((policy), (engine), &(array)[i], \
4592c2c66affSColin Finck              #array, i, (date), (para)); \
4593c2c66affSColin Finck     } while(0)
4594c2c66affSColin Finck 
4595c2c66affSColin Finck #define CHECK_CHAIN_POLICY_STATUS(policy, engine, policyCheck, date, para) \
4596c2c66affSColin Finck     checkChainPolicyStatus((policy), (engine), &(policyCheck), \
4597c2c66affSColin Finck      #policyCheck, 0, (date), (para))
4598c2c66affSColin Finck 
check_base_policy(void)4599c2c66affSColin Finck static void check_base_policy(void)
4600c2c66affSColin Finck {
4601c2c66affSColin Finck     CERT_CHAIN_POLICY_PARA policyPara = { 0 };
4602c2c66affSColin Finck 
4603c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS_ARRAY(CERT_CHAIN_POLICY_BASE, NULL,
4604c2c66affSColin Finck      basePolicyCheck, &oct2007, NULL);
4605c2c66affSColin Finck     policyPara.cbSize = sizeof(policyPara);
4606c2c66affSColin Finck     policyPara.dwFlags = CERT_CHAIN_POLICY_ALLOW_UNKNOWN_CA_FLAG;
4607c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_BASE, NULL,
4608c2c66affSColin Finck      ignoredUnknownCAPolicyCheck, &oct2007, &policyPara);
4609c2c66affSColin Finck     policyPara.dwFlags = CERT_CHAIN_POLICY_ALLOW_UNKNOWN_CA_FLAG |
4610c2c66affSColin Finck      CERT_CHAIN_POLICY_IGNORE_NOT_TIME_VALID_FLAG;
4611c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_BASE, NULL,
4612c2c66affSColin Finck      ignoredBadDateNestingBasePolicyCheck, &oct2007, &policyPara);
4613c2c66affSColin Finck     policyPara.dwFlags = CERT_CHAIN_POLICY_IGNORE_NOT_TIME_VALID_FLAG;
4614c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_BASE, NULL,
4615c2c66affSColin Finck      ignoredInvalidDateBasePolicyCheck, &oct2007, &policyPara);
4616c2c66affSColin Finck     policyPara.dwFlags = CERT_CHAIN_POLICY_ALLOW_UNKNOWN_CA_FLAG |
4617c2c66affSColin Finck      CERT_CHAIN_POLICY_IGNORE_WRONG_USAGE_FLAG;
4618c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_BASE, NULL,
4619c2c66affSColin Finck      ignoredInvalidUsageBasePolicyCheck, &oct2007, &policyPara);
4620c2c66affSColin Finck     policyPara.dwFlags = CERT_CHAIN_POLICY_ALLOW_UNKNOWN_CA_FLAG |
4621c2c66affSColin Finck      CERT_CHAIN_POLICY_IGNORE_NOT_TIME_VALID_FLAG |
4622c2c66affSColin Finck      CERT_CHAIN_POLICY_IGNORE_WRONG_USAGE_FLAG;
4623c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_BASE, NULL,
4624c2c66affSColin Finck      ignoredInvalidUsageBasePolicyCheck, &oct2007, &policyPara);
4625c2c66affSColin Finck     policyPara.dwFlags = CERT_CHAIN_POLICY_ALLOW_UNKNOWN_CA_FLAG |
4626c2c66affSColin Finck      CERT_CHAIN_POLICY_IGNORE_NOT_TIME_VALID_FLAG;
4627c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_BASE, NULL,
4628c2c66affSColin Finck      invalidUsageBasePolicyCheck, &oct2007, &policyPara);
4629c2c66affSColin Finck     /* Test chain30, which has an invalid critical extension in an intermediate
4630c2c66affSColin Finck      * cert, against the base policy.
4631c2c66affSColin Finck      */
4632c2c66affSColin Finck     policyPara.dwFlags = CERT_CHAIN_POLICY_ALLOW_UNKNOWN_CA_FLAG;
4633c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_BASE, NULL,
4634c2c66affSColin Finck      invalidExtensionPolicyCheck, &oct2007, &policyPara);
4635c2c66affSColin Finck }
4636c2c66affSColin Finck 
check_authenticode_policy(void)4637c2c66affSColin Finck static void check_authenticode_policy(void)
4638c2c66affSColin Finck {
4639c2c66affSColin Finck     CERT_CHAIN_POLICY_PARA policyPara = { 0 };
4640c2c66affSColin Finck     SYSTEMTIME epochStart = { 0 };
4641c2c66affSColin Finck 
4642c2c66affSColin Finck     /* The authenticode policy doesn't seem to check anything beyond the base
4643c2c66affSColin Finck      * policy.  It might check for chains signed by the MS test cert, but none
4644c2c66affSColin Finck      * of these chains is.
4645c2c66affSColin Finck      */
4646c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS_ARRAY(CERT_CHAIN_POLICY_AUTHENTICODE, NULL,
4647c2c66affSColin Finck      authenticodePolicyCheck, &oct2007, NULL);
4648c2c66affSColin Finck     policyPara.cbSize = sizeof(policyPara);
4649c2c66affSColin Finck     policyPara.dwFlags = CERT_CHAIN_POLICY_ALLOW_UNKNOWN_CA_FLAG;
4650c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_AUTHENTICODE, NULL,
4651c2c66affSColin Finck      ignoredUnknownCAPolicyCheck, &oct2007, &policyPara);
4652c2c66affSColin Finck     epochStart.wDay = epochStart.wMonth = 1;
4653c2c66affSColin Finck     epochStart.wYear = 1601;
4654c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_AUTHENTICODE, NULL,
4655c2c66affSColin Finck      ignoredUnknownCAPolicyCheck, &epochStart, &policyPara);
4656c2c66affSColin Finck     policyPara.dwFlags = CERT_CHAIN_POLICY_IGNORE_NOT_TIME_VALID_FLAG;
4657c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_AUTHENTICODE, NULL,
4658c2c66affSColin Finck      ignoredInvalidDateBasePolicyCheck, &oct2007, &policyPara);
4659c2c66affSColin Finck }
4660c2c66affSColin Finck 
check_ssl_policy(void)4661c2c66affSColin Finck static void check_ssl_policy(void)
4662c2c66affSColin Finck {
4663c2c66affSColin Finck     CERT_CHAIN_POLICY_PARA policyPara = { 0 };
4664c2c66affSColin Finck     SSL_EXTRA_CERT_CHAIN_POLICY_PARA sslPolicyPara = { { 0 } };
4665c2c66affSColin Finck     WCHAR winehq[] = { 'w','i','n','e','h','q','.','o','r','g',0 };
4666c2c66affSColin Finck     WCHAR google_dot_com[] = { 'w','w','w','.','g','o','o','g','l','e','.',
4667c2c66affSColin Finck      'c','o','m',0 };
4668c2c66affSColin Finck     WCHAR battle_dot_net[] = { 'w','w','w','.','b','a','t','t','l','e','.',
4669c2c66affSColin Finck      'n','e','t',0 };
4670c2c66affSColin Finck     WCHAR a_dot_openssl_dot_org[] = { 'a','.','o','p','e','n','s','s','l','.',
4671c2c66affSColin Finck      'o','r','g',0 };
4672c2c66affSColin Finck     WCHAR openssl_dot_org[] = { 'o','p','e','n','s','s','l','.','o','r','g',0 };
4673c2c66affSColin Finck     WCHAR fopenssl_dot_org[] = { 'f','o','p','e','n','s','s','l','.',
4674c2c66affSColin Finck      'o','r','g',0 };
4675c2c66affSColin Finck     WCHAR a_dot_b_dot_openssl_dot_org[] = { 'a','.','b','.',
4676c2c66affSColin Finck      'o','p','e','n','s','s','l','.','o','r','g',0 };
4677c2c66affSColin Finck     WCHAR cs_dot_stanford_dot_edu[] = { 'c','s','.',
4678c2c66affSColin Finck      's','t','a','n','f','o','r','d','.','e','d','u',0 };
4679c2c66affSColin Finck     WCHAR www_dot_cs_dot_stanford_dot_edu[] = { 'w','w','w','.','c','s','.',
4680c2c66affSColin Finck      's','t','a','n','f','o','r','d','.','e','d','u',0 };
4681c2c66affSColin Finck     WCHAR a_dot_cs_dot_stanford_dot_edu[] = { 'a','.','c','s','.',
4682c2c66affSColin Finck      's','t','a','n','f','o','r','d','.','e','d','u',0 };
4683c2c66affSColin Finck     WCHAR test_dot_winehq_dot_org[] = { 't','e','s','t','.',
4684c2c66affSColin Finck      'w','i','n','e','h','q','.','o','r','g',0 };
4685c2c66affSColin Finck     WCHAR a_dot_b_dot_winehq_dot_org[] = { 'a','.','b','.',
4686c2c66affSColin Finck      'w','i','n','e','h','q','.','o','r','g',0 };
4687c2c66affSColin Finck     WCHAR foo_dot_com[] = { 'f','o','o','.','c','o','m',0 };
4688c2c66affSColin Finck     WCHAR afoo_dot_com[] = { 'a','f','o','o','.','c','o','m',0 };
4689c2c66affSColin Finck     WCHAR a_dot_foo_dot_com[] = { 'a','.','f','o','o','.','c','o','m',0 };
4690c2c66affSColin Finck     HCERTSTORE testRoot;
4691c2c66affSColin Finck     CERT_CHAIN_ENGINE_CONFIG engineConfig = { sizeof(engineConfig), 0 };
4692c2c66affSColin Finck     HCERTCHAINENGINE engine;
4693c2c66affSColin Finck 
4694c2c66affSColin Finck     /* Check ssl policy with no parameter */
4695c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS_ARRAY(CERT_CHAIN_POLICY_SSL, NULL, sslPolicyCheck,
4696c2c66affSColin Finck      &oct2007, NULL);
4697c2c66affSColin Finck     /* Check again with a policy parameter that specifies nothing */
4698c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS_ARRAY(CERT_CHAIN_POLICY_SSL, NULL, sslPolicyCheck,
4699c2c66affSColin Finck      &oct2007, &policyPara);
4700c2c66affSColin Finck     /* Check yet again, but specify an empty SSL_EXTRA_CERT_CHAIN_POLICY_PARA
4701c2c66affSColin Finck      * argument.
4702c2c66affSColin Finck      */
4703c2c66affSColin Finck     policyPara.pvExtraPolicyPara = &sslPolicyPara;
4704c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS_ARRAY(CERT_CHAIN_POLICY_SSL, NULL, sslPolicyCheck,
4705c2c66affSColin Finck      &oct2007, &policyPara);
4706c2c66affSColin Finck     /* And again, but specify the auth type as a client */
4707c2c66affSColin Finck     sslPolicyPara.dwAuthType = AUTHTYPE_CLIENT;
4708c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS_ARRAY(CERT_CHAIN_POLICY_SSL, NULL, sslPolicyCheck,
4709c2c66affSColin Finck      &oct2007, &policyPara);
4710c2c66affSColin Finck     /* And again, but specify the auth type as a server */
4711c2c66affSColin Finck     sslPolicyPara.dwAuthType = AUTHTYPE_SERVER;
4712c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS_ARRAY(CERT_CHAIN_POLICY_SSL, NULL, sslPolicyCheck,
4713c2c66affSColin Finck      &oct2007, &policyPara);
4714c2c66affSColin Finck     /* And again authenticating a client, but specify the size of the policy
4715c2c66affSColin Finck      * parameter.
4716c2c66affSColin Finck      */
4717c2c66affSColin Finck     U(sslPolicyPara).cbSize = sizeof(sslPolicyCheck);
4718c2c66affSColin Finck     sslPolicyPara.dwAuthType = AUTHTYPE_CLIENT;
4719c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS_ARRAY(CERT_CHAIN_POLICY_SSL, NULL, sslPolicyCheck,
4720c2c66affSColin Finck      &oct2007, &policyPara);
4721c2c66affSColin Finck     /* One more time authenticating a client, but specify winehq.org as the
4722c2c66affSColin Finck      * server name.
4723c2c66affSColin Finck      */
4724c2c66affSColin Finck     sslPolicyPara.pwszServerName = winehq;
4725c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS_ARRAY(CERT_CHAIN_POLICY_SSL, NULL, sslPolicyCheck,
4726c2c66affSColin Finck      &oct2007, &policyPara);
4727c2c66affSColin Finck     /* And again authenticating a server, still specifying winehq.org as the
4728c2c66affSColin Finck      * server name.
4729c2c66affSColin Finck      */
4730c2c66affSColin Finck     sslPolicyPara.dwAuthType = AUTHTYPE_SERVER;
4731c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS_ARRAY(CERT_CHAIN_POLICY_SSL, NULL, sslPolicyCheck,
4732c2c66affSColin Finck      &oct2007, &policyPara);
4733c2c66affSColin Finck     /* And again authenticating a server, this time specifying the size of the
4734c2c66affSColin Finck      * policy param.
4735c2c66affSColin Finck      */
4736c2c66affSColin Finck     policyPara.cbSize = sizeof(policyPara);
4737c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS_ARRAY(CERT_CHAIN_POLICY_SSL, NULL, sslPolicyCheck,
4738c2c66affSColin Finck      &oct2007, &policyPara);
4739c2c66affSColin Finck     /* And again, specifying a chain with an untrusted root, but ignoring
4740c2c66affSColin Finck      * unknown CAs.
4741c2c66affSColin Finck      */
4742c2c66affSColin Finck     sslPolicyPara.fdwChecks = SECURITY_FLAG_IGNORE_UNKNOWN_CA;
4743c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_SSL, NULL,
4744c2c66affSColin Finck      ignoredUnknownCAPolicyCheck, &oct2007, &policyPara);
4745c2c66affSColin Finck     sslPolicyPara.fdwChecks = 0;
4746c2c66affSColin Finck     /* And again, but checking the Google chain at a bad date */
4747c2c66affSColin Finck     sslPolicyPara.pwszServerName = google_dot_com;
4748c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_SSL, NULL,
4749c2c66affSColin Finck      googlePolicyCheckWithMatchingNameExpired, &oct2007, &policyPara);
4750c2c66affSColin Finck     /* Again checking the Google chain at a bad date, but ignoring date
4751c2c66affSColin Finck      * errors.
4752c2c66affSColin Finck      */
4753c2c66affSColin Finck     sslPolicyPara.fdwChecks = SECURITY_FLAG_IGNORE_CERT_DATE_INVALID;
4754c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_SSL, NULL,
4755c2c66affSColin Finck      googlePolicyCheckWithMatchingName, &oct2007, &policyPara);
4756c2c66affSColin Finck     sslPolicyPara.fdwChecks = 0;
4757c2c66affSColin Finck     /* And again, but checking the Google chain at a good date */
4758c2c66affSColin Finck     sslPolicyPara.pwszServerName = google_dot_com;
4759c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_SSL, NULL,
4760c2c66affSColin Finck      googlePolicyCheckWithMatchingName, &nov2016, &policyPara);
4761c2c66affSColin Finck 
4762c2c66affSColin Finck     /* Check again with the openssl cert, which has a wildcard in its name,
4763c2c66affSColin Finck      * with various combinations of matching and non-matching names.
4764c2c66affSColin Finck      * With "a.openssl.org": match
4765c2c66affSColin Finck      */
4766c2c66affSColin Finck     sslPolicyPara.pwszServerName = a_dot_openssl_dot_org;
4767c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_SSL, NULL,
4768c2c66affSColin Finck      opensslPolicyCheckWithMatchingName, &oct2009, &policyPara);
4769c2c66affSColin Finck     /* With "openssl.org": no match */
4770c2c66affSColin Finck     sslPolicyPara.pwszServerName = openssl_dot_org;
4771c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_SSL, NULL,
4772c2c66affSColin Finck      opensslPolicyCheckWithoutMatchingName, &oct2009, &policyPara);
4773c2c66affSColin Finck     /* With "fopenssl.org": no match */
4774c2c66affSColin Finck     sslPolicyPara.pwszServerName = fopenssl_dot_org;
4775c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_SSL, NULL,
4776c2c66affSColin Finck      opensslPolicyCheckWithoutMatchingName, &oct2009, &policyPara);
4777c2c66affSColin Finck     /* with "a.b.openssl.org": no match */
4778c2c66affSColin Finck     sslPolicyPara.pwszServerName = a_dot_b_dot_openssl_dot_org;
4779c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_SSL, NULL,
4780c2c66affSColin Finck      opensslPolicyCheckWithoutMatchingName, &oct2009, &policyPara);
4781c2c66affSColin Finck     /* Check again with the cs.stanford.edu, which has both cs.stanford.edu
4782c2c66affSColin Finck      * and www.cs.stanford.edu in its subject alternative name.
4783c2c66affSColin Finck      * With "cs.stanford.edu": match
4784c2c66affSColin Finck      */
4785c2c66affSColin Finck     sslPolicyPara.pwszServerName = cs_dot_stanford_dot_edu;
4786c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_SSL, NULL,
4787c2c66affSColin Finck      stanfordPolicyCheckWithMatchingName, &nov2016, &policyPara);
4788c2c66affSColin Finck     /* With "www.cs.stanford.edu": match */
4789c2c66affSColin Finck     sslPolicyPara.pwszServerName = www_dot_cs_dot_stanford_dot_edu;
4790c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_SSL, NULL,
4791c2c66affSColin Finck      stanfordPolicyCheckWithMatchingName, &nov2016, &policyPara);
4792c2c66affSColin Finck     /* With "a.cs.stanford.edu": no match */
4793c2c66affSColin Finck     sslPolicyPara.pwszServerName = a_dot_cs_dot_stanford_dot_edu;
4794c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_SSL, NULL,
4795c2c66affSColin Finck      stanfordPolicyCheckWithoutMatchingName, &nov2016, &policyPara);
4796c2c66affSColin Finck     /* Check chain29, which has a wildcard in its subject alternative name,
4797c2c66affSColin Finck      * but not in its distinguished name.
4798c2c66affSColin Finck      * Step 1: create a chain engine that trusts chain29's root.
4799c2c66affSColin Finck      */
4800c2c66affSColin Finck     testRoot = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0,
4801c2c66affSColin Finck      CERT_STORE_CREATE_NEW_FLAG, NULL);
4802c2c66affSColin Finck     CertAddEncodedCertificateToStore(testRoot, X509_ASN_ENCODING, chain0_0,
4803c2c66affSColin Finck      sizeof(chain0_0), CERT_STORE_ADD_ALWAYS, NULL);
4804c2c66affSColin Finck     engineConfig.hExclusiveRoot = testRoot;
4805c2c66affSColin Finck     if (!pCertCreateCertificateChainEngine(&engineConfig, &engine))
4806c2c66affSColin Finck     {
4807c2c66affSColin Finck         skip("Couldn't create chain engine\n");
4808c2c66affSColin Finck         return;
4809c2c66affSColin Finck     }
4810c2c66affSColin Finck     /* With "winehq.org": no match */
4811c2c66affSColin Finck     sslPolicyPara.pwszServerName = winehq;
4812c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_SSL, engine,
4813c2c66affSColin Finck      winehqPolicyCheckWithoutMatchingName, &oct2007, &policyPara);
4814c2c66affSColin Finck     /* With "test.winehq.org": match */
4815c2c66affSColin Finck     sslPolicyPara.pwszServerName = test_dot_winehq_dot_org;
4816c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_SSL, engine,
4817c2c66affSColin Finck      winehqPolicyCheckWithMatchingName, &oct2007, &policyPara);
4818c2c66affSColin Finck     /* With "a.b.winehq.org": no match */
4819c2c66affSColin Finck     sslPolicyPara.pwszServerName = a_dot_b_dot_winehq_dot_org;
4820c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_SSL, engine,
4821c2c66affSColin Finck      winehqPolicyCheckWithoutMatchingName, &oct2007, &policyPara);
4822c2c66affSColin Finck     /* When specifying to ignore name mismatch: match */
4823c2c66affSColin Finck     sslPolicyPara.fdwChecks |= SECURITY_FLAG_IGNORE_CERT_CN_INVALID;
4824c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_SSL, engine,
4825c2c66affSColin Finck      winehqPolicyCheckWithMatchingName, &oct2007, &policyPara);
4826c2c66affSColin Finck     pCertFreeCertificateChainEngine(engine);
4827c2c66affSColin Finck     CertCloseStore(testRoot, 0);
4828c2c66affSColin Finck     /* Test chain30, which has an invalid critical extension in an intermediate
4829c2c66affSColin Finck      * cert, against the SSL policy.
4830c2c66affSColin Finck      */
4831c2c66affSColin Finck     sslPolicyPara.fdwChecks = SECURITY_FLAG_IGNORE_UNKNOWN_CA;
4832c2c66affSColin Finck     sslPolicyPara.pwszServerName = NULL;
4833c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_SSL, NULL,
4834c2c66affSColin Finck      invalidExtensionPolicyCheck, &oct2007, &policyPara);
4835c2c66affSColin Finck     /* Test chain31, which has two CNs, "*.foo.com" and "foo.com", against
4836c2c66affSColin Finck      * some names that match one of the CNs:
4837c2c66affSColin Finck      */
4838c2c66affSColin Finck     sslPolicyPara.pwszServerName = foo_dot_com;
4839c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_SSL, NULL,
4840c2c66affSColin Finck      fooPolicyCheckWithMatchingName, &oct2007, &policyPara);
4841c2c66affSColin Finck     sslPolicyPara.pwszServerName = a_dot_foo_dot_com;
4842c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_SSL, NULL,
4843c2c66affSColin Finck      fooPolicyCheckWithMatchingName, &oct2007, &policyPara);
4844c2c66affSColin Finck     /* and against a name that doesn't match either CN: */
4845c2c66affSColin Finck     sslPolicyPara.pwszServerName = afoo_dot_com;
4846c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_SSL, NULL,
4847c2c66affSColin Finck      fooPolicyCheckWithoutMatchingName, &oct2007, &policyPara);
4848c2c66affSColin Finck     /* The Battle.Net chain checks a certificate with a domain component
4849c2c66affSColin Finck      * containing a terminating NULL.
4850c2c66affSColin Finck      */
4851c2c66affSColin Finck     sslPolicyPara.pwszServerName = battle_dot_net;
4852c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS(CERT_CHAIN_POLICY_SSL, NULL,
4853c2c66affSColin Finck      nullTerminatedDomainComponentPolicyCheck, &oct2010, &policyPara);
4854c2c66affSColin Finck }
4855c2c66affSColin Finck 
testVerifyCertChainPolicy(void)4856c2c66affSColin Finck static void testVerifyCertChainPolicy(void)
4857c2c66affSColin Finck {
4858c2c66affSColin Finck     BOOL ret;
4859c2c66affSColin Finck     PCCERT_CONTEXT cert;
4860c2c66affSColin Finck     CERT_CHAIN_PARA chainPara = { sizeof(CERT_CHAIN_PARA), { 0 } };
4861c2c66affSColin Finck     PCCERT_CHAIN_CONTEXT chain;
4862c2c66affSColin Finck     CERT_CHAIN_POLICY_STATUS policyStatus = { 0 };
4863c2c66affSColin Finck     CERT_CHAIN_POLICY_PARA policyPara = { 0 };
4864c2c66affSColin Finck 
4865c2c66affSColin Finck     if (!pCertVerifyCertificateChainPolicy)
4866c2c66affSColin Finck     {
4867c2c66affSColin Finck         win_skip("CertVerifyCertificateChainPolicy() is not available\n");
4868c2c66affSColin Finck         return;
4869c2c66affSColin Finck     }
4870c2c66affSColin Finck 
4871c2c66affSColin Finck     /* Crash
4872c2c66affSColin Finck     ret = pCertVerifyCertificateChainPolicy(NULL, NULL, NULL, NULL);
4873c2c66affSColin Finck     ret = pCertVerifyCertificateChainPolicy(CERT_CHAIN_POLICY_BASE, NULL, NULL,
4874c2c66affSColin Finck      NULL);
4875c2c66affSColin Finck     ret = pCertVerifyCertificateChainPolicy(CERT_CHAIN_POLICY_BASE, NULL,
4876c2c66affSColin Finck      &chainPara, NULL);
4877c2c66affSColin Finck      */
4878c2c66affSColin Finck     SetLastError(0xdeadbeef);
4879c2c66affSColin Finck     ret = pCertVerifyCertificateChainPolicy(NULL, NULL, NULL, &policyStatus);
4880c2c66affSColin Finck     ok(!ret && GetLastError() == ERROR_FILE_NOT_FOUND,
4881c2c66affSColin Finck      "Expected ERROR_FILE_NOT_FOUND, got %08x\n", GetLastError());
4882c2c66affSColin Finck     /* Crashes
4883c2c66affSColin Finck     ret = pCertVerifyCertificateChainPolicy(CERT_CHAIN_POLICY_BASE, NULL, NULL,
4884c2c66affSColin Finck      &policyStatus);
4885c2c66affSColin Finck      */
4886c2c66affSColin Finck     cert = CertCreateCertificateContext(X509_ASN_ENCODING, selfSignedCert,
4887c2c66affSColin Finck      sizeof(selfSignedCert));
4888c2c66affSColin Finck     pCertGetCertificateChain(NULL, cert, NULL, NULL, &chainPara, 0, NULL,
4889c2c66affSColin Finck      &chain);
4890c2c66affSColin Finck     /* Crash
4891c2c66affSColin Finck     ret = pCertVerifyCertificateChainPolicy(NULL, chain, NULL, NULL);
4892c2c66affSColin Finck     ret = pCertVerifyCertificateChainPolicy(CERT_CHAIN_POLICY_BASE, chain, NULL,
4893c2c66affSColin Finck      NULL);
4894c2c66affSColin Finck     ret = pCertVerifyCertificateChainPolicy(CERT_CHAIN_POLICY_BASE, chain,
4895c2c66affSColin Finck      &chainPara, NULL);
4896c2c66affSColin Finck      */
4897c2c66affSColin Finck     /* Size of policy status is apparently ignored, as is pChainPolicyPara */
4898c2c66affSColin Finck     ret = pCertVerifyCertificateChainPolicy(CERT_CHAIN_POLICY_BASE, chain, NULL,
4899c2c66affSColin Finck      &policyStatus);
4900c2c66affSColin Finck     ok(ret, "CertVerifyCertificateChainPolicy failed: %08x\n", GetLastError());
4901c2c66affSColin Finck     ok(policyStatus.dwError == CERT_E_UNTRUSTEDROOT ||
4902c2c66affSColin Finck         policyStatus.dwError == TRUST_E_CERT_SIGNATURE, /* win7 + win8 */
4903c2c66affSColin Finck         "Expected CERT_E_UNTRUSTEDROOT or TRUST_E_CERT_SIGNATURE, got %08x\n", policyStatus.dwError);
4904c2c66affSColin Finck     ok(policyStatus.lChainIndex == 0 && policyStatus.lElementIndex == 0,
4905c2c66affSColin Finck      "Expected both indexes 0, got %d, %d\n", policyStatus.lChainIndex,
4906c2c66affSColin Finck      policyStatus.lElementIndex);
4907c2c66affSColin Finck     ret = pCertVerifyCertificateChainPolicy(CERT_CHAIN_POLICY_BASE, chain,
4908c2c66affSColin Finck      &policyPara, &policyStatus);
4909c2c66affSColin Finck     ok(ret, "CertVerifyCertificateChainPolicy failed: %08x\n", GetLastError());
4910c2c66affSColin Finck     ok(policyStatus.dwError == CERT_E_UNTRUSTEDROOT ||
4911c2c66affSColin Finck         policyStatus.dwError == TRUST_E_CERT_SIGNATURE, /* win7 + win8 */
4912c2c66affSColin Finck         "Expected CERT_E_UNTRUSTEDROOT or TRUST_E_CERT_SIGNATURE, got %08x\n", policyStatus.dwError);
4913c2c66affSColin Finck     ok(policyStatus.lChainIndex == 0 && policyStatus.lElementIndex == 0,
4914c2c66affSColin Finck      "Expected both indexes 0, got %d, %d\n", policyStatus.lChainIndex,
4915c2c66affSColin Finck      policyStatus.lElementIndex);
4916c2c66affSColin Finck     pCertFreeCertificateChain(chain);
4917c2c66affSColin Finck     CertFreeCertificateContext(cert);
4918c2c66affSColin Finck 
4919c2c66affSColin Finck     check_base_policy();
4920c2c66affSColin Finck     check_ssl_policy();
4921c2c66affSColin Finck     check_authenticode_policy();
4922c2c66affSColin Finck     CHECK_CHAIN_POLICY_STATUS_ARRAY(CERT_CHAIN_POLICY_BASIC_CONSTRAINTS, NULL,
4923c2c66affSColin Finck      basicConstraintsPolicyCheck, &oct2007, NULL);
4924c2c66affSColin Finck }
4925c2c66affSColin Finck 
START_TEST(chain)4926c2c66affSColin Finck START_TEST(chain)
4927c2c66affSColin Finck {
4928c2c66affSColin Finck     HMODULE hCrypt32 = GetModuleHandleA("crypt32.dll");
4929c2c66affSColin Finck     pCertCreateCertificateChainEngine = (void*)GetProcAddress(hCrypt32, "CertCreateCertificateChainEngine");
4930c2c66affSColin Finck     pCertGetCertificateChain = (void*)GetProcAddress(hCrypt32, "CertGetCertificateChain");
4931c2c66affSColin Finck     pCertFreeCertificateChain = (void*)GetProcAddress(hCrypt32, "CertFreeCertificateChain");
4932c2c66affSColin Finck     pCertFreeCertificateChainEngine = (void*)GetProcAddress(hCrypt32, "CertFreeCertificateChainEngine");
4933c2c66affSColin Finck     pCertVerifyCertificateChainPolicy = (void*)GetProcAddress(hCrypt32, "CertVerifyCertificateChainPolicy");
4934c2c66affSColin Finck 
4935c2c66affSColin Finck     testCreateCertChainEngine();
4936c2c66affSColin Finck     if (!pCertGetCertificateChain || !pCertFreeCertificateChain)
4937c2c66affSColin Finck     {
4938c2c66affSColin Finck         win_skip("Cert*CertificateChain functions not available\n");
4939c2c66affSColin Finck     }
4940c2c66affSColin Finck     else
4941c2c66affSColin Finck     {
4942c2c66affSColin Finck         testVerifyCertChainPolicy();
4943c2c66affSColin Finck         testGetCertChain();
4944c2c66affSColin Finck         test_CERT_CHAIN_PARA_cbSize();
4945c2c66affSColin Finck     }
4946c2c66affSColin Finck }
4947