]> git.saurik.com Git - apple/security.git/blob - OSX/sec/Security/Regressions/secitem/si-15-certificate.c
Security-58286.260.20.tar.gz
[apple/security.git] / OSX / sec / Security / Regressions / secitem / si-15-certificate.c
1 /*
2 * Copyright (c) 2008-2010,2012 Apple Inc. All Rights Reserved.
3 */
4
5 #include <AssertMacros.h>
6 #include <CoreFoundation/CoreFoundation.h>
7 #include <Security/SecCertificate.h>
8 #include <Security/SecCertificatePriv.h>
9 #include <Security/SecPolicy.h>
10 #include <Security/SecTrust.h>
11 #include <utilities/SecCFRelease.h>
12 #include <stdlib.h>
13 #include <unistd.h>
14
15 #include "shared_regressions.h"
16
17 /*
18 Apple Inc. CA
19 */
20 static const uint8_t _c0[] = {
21 0x30, 0x82, 0x04, 0xbb, 0x30, 0x82, 0x03, 0xa3,
22 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x01, 0x02,
23 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86,
24 0xf7, 0x0d, 0x01, 0x01, 0x05, 0x05, 0x00, 0x30,
25 0x62, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
26 0x04, 0x06, 0x13, 0x02, 0x55, 0x53, 0x31, 0x13,
27 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13,
28 0x0a, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x20, 0x49,
29 0x6e, 0x63, 0x2e, 0x31, 0x26, 0x30, 0x24, 0x06,
30 0x03, 0x55, 0x04, 0x0b, 0x13, 0x1d, 0x41, 0x70,
31 0x70, 0x6c, 0x65, 0x20, 0x43, 0x65, 0x72, 0x74,
32 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
33 0x6e, 0x20, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72,
34 0x69, 0x74, 0x79, 0x31, 0x16, 0x30, 0x14, 0x06,
35 0x03, 0x55, 0x04, 0x03, 0x13, 0x0d, 0x41, 0x70,
36 0x70, 0x6c, 0x65, 0x20, 0x52, 0x6f, 0x6f, 0x74,
37 0x20, 0x43, 0x41, 0x30, 0x1e, 0x17, 0x0d, 0x30,
38 0x36, 0x30, 0x34, 0x32, 0x35, 0x32, 0x31, 0x34,
39 0x30, 0x33, 0x36, 0x5a, 0x17, 0x0d, 0x33, 0x35,
40 0x30, 0x32, 0x30, 0x39, 0x32, 0x31, 0x34, 0x30,
41 0x33, 0x36, 0x5a, 0x30, 0x62, 0x31, 0x0b, 0x30,
42 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02,
43 0x55, 0x53, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03,
44 0x55, 0x04, 0x0a, 0x13, 0x0a, 0x41, 0x70, 0x70,
45 0x6c, 0x65, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x31,
46 0x26, 0x30, 0x24, 0x06, 0x03, 0x55, 0x04, 0x0b,
47 0x13, 0x1d, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x20,
48 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63,
49 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x41, 0x75,
50 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x31,
51 0x16, 0x30, 0x14, 0x06, 0x03, 0x55, 0x04, 0x03,
52 0x13, 0x0d, 0x41, 0x70, 0x70, 0x6c, 0x65, 0x20,
53 0x52, 0x6f, 0x6f, 0x74, 0x20, 0x43, 0x41, 0x30,
54 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a,
55 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
56 0x05, 0x00, 0x03, 0x82, 0x01, 0x0f, 0x00, 0x30,
57 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00,
58 0xe4, 0x91, 0xa9, 0x09, 0x1f, 0x91, 0xdb, 0x1e,
59 0x47, 0x50, 0xeb, 0x05, 0xed, 0x5e, 0x79, 0x84,
60 0x2d, 0xeb, 0x36, 0xa2, 0x57, 0x4c, 0x55, 0xec,
61 0x8b, 0x19, 0x89, 0xde, 0xf9, 0x4b, 0x6c, 0xf5,
62 0x07, 0xab, 0x22, 0x30, 0x02, 0xe8, 0x18, 0x3e,
63 0xf8, 0x50, 0x09, 0xd3, 0x7f, 0x41, 0xa8, 0x98,
64 0xf9, 0xd1, 0xca, 0x66, 0x9c, 0x24, 0x6b, 0x11,
65 0xd0, 0xa3, 0xbb, 0xe4, 0x1b, 0x2a, 0xc3, 0x1f,
66 0x95, 0x9e, 0x7a, 0x0c, 0xa4, 0x47, 0x8b, 0x5b,
67 0xd4, 0x16, 0x37, 0x33, 0xcb, 0xc4, 0x0f, 0x4d,
68 0xce, 0x14, 0x69, 0xd1, 0xc9, 0x19, 0x72, 0xf5,
69 0x5d, 0x0e, 0xd5, 0x7f, 0x5f, 0x9b, 0xf2, 0x25,
70 0x03, 0xba, 0x55, 0x8f, 0x4d, 0x5d, 0x0d, 0xf1,
71 0x64, 0x35, 0x23, 0x15, 0x4b, 0x15, 0x59, 0x1d,
72 0xb3, 0x94, 0xf7, 0xf6, 0x9c, 0x9e, 0xcf, 0x50,
73 0xba, 0xc1, 0x58, 0x50, 0x67, 0x8f, 0x08, 0xb4,
74 0x20, 0xf7, 0xcb, 0xac, 0x2c, 0x20, 0x6f, 0x70,
75 0xb6, 0x3f, 0x01, 0x30, 0x8c, 0xb7, 0x43, 0xcf,
76 0x0f, 0x9d, 0x3d, 0xf3, 0x2b, 0x49, 0x28, 0x1a,
77 0xc8, 0xfe, 0xce, 0xb5, 0xb9, 0x0e, 0xd9, 0x5e,
78 0x1c, 0xd6, 0xcb, 0x3d, 0xb5, 0x3a, 0xad, 0xf4,
79 0x0f, 0x0e, 0x00, 0x92, 0x0b, 0xb1, 0x21, 0x16,
80 0x2e, 0x74, 0xd5, 0x3c, 0x0d, 0xdb, 0x62, 0x16,
81 0xab, 0xa3, 0x71, 0x92, 0x47, 0x53, 0x55, 0xc1,
82 0xaf, 0x2f, 0x41, 0xb3, 0xf8, 0xfb, 0xe3, 0x70,
83 0xcd, 0xe6, 0xa3, 0x4c, 0x45, 0x7e, 0x1f, 0x4c,
84 0x6b, 0x50, 0x96, 0x41, 0x89, 0xc4, 0x74, 0x62,
85 0x0b, 0x10, 0x83, 0x41, 0x87, 0x33, 0x8a, 0x81,
86 0xb1, 0x30, 0x58, 0xec, 0x5a, 0x04, 0x32, 0x8c,
87 0x68, 0xb3, 0x8f, 0x1d, 0xde, 0x65, 0x73, 0xff,
88 0x67, 0x5e, 0x65, 0xbc, 0x49, 0xd8, 0x76, 0x9f,
89 0x33, 0x14, 0x65, 0xa1, 0x77, 0x94, 0xc9, 0x2d,
90 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3, 0x82, 0x01,
91 0x7a, 0x30, 0x82, 0x01, 0x76, 0x30, 0x0e, 0x06,
92 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04,
93 0x04, 0x03, 0x02, 0x01, 0x06, 0x30, 0x0f, 0x06,
94 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04,
95 0x05, 0x30, 0x03, 0x01, 0x01, 0xff, 0x30, 0x1d,
96 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04,
97 0x14, 0x2b, 0xd0, 0x69, 0x47, 0x94, 0x76, 0x09,
98 0xfe, 0xf4, 0x6b, 0x8d, 0x2e, 0x40, 0xa6, 0xf7,
99 0x47, 0x4d, 0x7f, 0x08, 0x5e, 0x30, 0x1f, 0x06,
100 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16,
101 0x80, 0x14, 0x2b, 0xd0, 0x69, 0x47, 0x94, 0x76,
102 0x09, 0xfe, 0xf4, 0x6b, 0x8d, 0x2e, 0x40, 0xa6,
103 0xf7, 0x47, 0x4d, 0x7f, 0x08, 0x5e, 0x30, 0x82,
104 0x01, 0x11, 0x06, 0x03, 0x55, 0x1d, 0x20, 0x04,
105 0x82, 0x01, 0x08, 0x30, 0x82, 0x01, 0x04, 0x30,
106 0x82, 0x01, 0x00, 0x06, 0x09, 0x2a, 0x86, 0x48,
107 0x86, 0xf7, 0x63, 0x64, 0x05, 0x01, 0x30, 0x81,
108 0xf2, 0x30, 0x2a, 0x06, 0x08, 0x2b, 0x06, 0x01,
109 0x05, 0x05, 0x07, 0x02, 0x01, 0x16, 0x1e, 0x68,
110 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77,
111 0x77, 0x77, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x65,
112 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x70,
113 0x6c, 0x65, 0x63, 0x61, 0x2f, 0x30, 0x81, 0xc3,
114 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07,
115 0x02, 0x02, 0x30, 0x81, 0xb6, 0x1a, 0x81, 0xb3,
116 0x52, 0x65, 0x6c, 0x69, 0x61, 0x6e, 0x63, 0x65,
117 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x69, 0x73,
118 0x20, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69,
119 0x63, 0x61, 0x74, 0x65, 0x20, 0x62, 0x79, 0x20,
120 0x61, 0x6e, 0x79, 0x20, 0x70, 0x61, 0x72, 0x74,
121 0x79, 0x20, 0x61, 0x73, 0x73, 0x75, 0x6d, 0x65,
122 0x73, 0x20, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74,
123 0x61, 0x6e, 0x63, 0x65, 0x20, 0x6f, 0x66, 0x20,
124 0x74, 0x68, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e,
125 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61,
126 0x62, 0x6c, 0x65, 0x20, 0x73, 0x74, 0x61, 0x6e,
127 0x64, 0x61, 0x72, 0x64, 0x20, 0x74, 0x65, 0x72,
128 0x6d, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x63,
129 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e,
130 0x73, 0x20, 0x6f, 0x66, 0x20, 0x75, 0x73, 0x65,
131 0x2c, 0x20, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66,
132 0x69, 0x63, 0x61, 0x74, 0x65, 0x20, 0x70, 0x6f,
133 0x6c, 0x69, 0x63, 0x79, 0x20, 0x61, 0x6e, 0x64,
134 0x20, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69,
135 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x70,
136 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x20,
137 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e,
138 0x74, 0x73, 0x2e, 0x30, 0x0d, 0x06, 0x09, 0x2a,
139 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x05,
140 0x05, 0x00, 0x03, 0x82, 0x01, 0x01, 0x00, 0x5c,
141 0x36, 0x99, 0x4c, 0x2d, 0x78, 0xb7, 0xed, 0x8c,
142 0x9b, 0xdc, 0xf3, 0x77, 0x9b, 0xf2, 0x76, 0xd2,
143 0x77, 0x30, 0x4f, 0xc1, 0x1f, 0x85, 0x83, 0x85,
144 0x1b, 0x99, 0x3d, 0x47, 0x37, 0xf2, 0xa9, 0x9b,
145 0x40, 0x8e, 0x2c, 0xd4, 0xb1, 0x90, 0x12, 0xd8,
146 0xbe, 0xf4, 0x73, 0x9b, 0xee, 0xd2, 0x64, 0x0f,
147 0xcb, 0x79, 0x4f, 0x34, 0xd8, 0xa2, 0x3e, 0xf9,
148 0x78, 0xff, 0x6b, 0xc8, 0x07, 0xec, 0x7d, 0x39,
149 0x83, 0x8b, 0x53, 0x20, 0xd3, 0x38, 0xc4, 0xb1,
150 0xbf, 0x9a, 0x4f, 0x0a, 0x6b, 0xff, 0x2b, 0xfc,
151 0x59, 0xa7, 0x05, 0x09, 0x7c, 0x17, 0x40, 0x56,
152 0x11, 0x1e, 0x74, 0xd3, 0xb7, 0x8b, 0x23, 0x3b,
153 0x47, 0xa3, 0xd5, 0x6f, 0x24, 0xe2, 0xeb, 0xd1,
154 0xb7, 0x70, 0xdf, 0x0f, 0x45, 0xe1, 0x27, 0xca,
155 0xf1, 0x6d, 0x78, 0xed, 0xe7, 0xb5, 0x17, 0x17,
156 0xa8, 0xdc, 0x7e, 0x22, 0x35, 0xca, 0x25, 0xd5,
157 0xd9, 0x0f, 0xd6, 0x6b, 0xd4, 0xa2, 0x24, 0x23,
158 0x11, 0xf7, 0xa1, 0xac, 0x8f, 0x73, 0x81, 0x60,
159 0xc6, 0x1b, 0x5b, 0x09, 0x2f, 0x92, 0xb2, 0xf8,
160 0x44, 0x48, 0xf0, 0x60, 0x38, 0x9e, 0x15, 0xf5,
161 0x3d, 0x26, 0x67, 0x20, 0x8a, 0x33, 0x6a, 0xf7,
162 0x0d, 0x82, 0xcf, 0xde, 0xeb, 0xa3, 0x2f, 0xf9,
163 0x53, 0x6a, 0x5b, 0x64, 0xc0, 0x63, 0x33, 0x77,
164 0xf7, 0x3a, 0x07, 0x2c, 0x56, 0xeb, 0xda, 0x0f,
165 0x21, 0x0e, 0xda, 0xba, 0x73, 0x19, 0x4f, 0xb5,
166 0xd9, 0x36, 0x7f, 0xc1, 0x87, 0x55, 0xd9, 0xa7,
167 0x99, 0xb9, 0x32, 0x42, 0xfb, 0xd8, 0xd5, 0x71,
168 0x9e, 0x7e, 0xa1, 0x52, 0xb7, 0x1b, 0xbd, 0x93,
169 0x42, 0x24, 0x12, 0x2a, 0xc7, 0x0f, 0x1d, 0xb6,
170 0x4d, 0x9c, 0x5e, 0x63, 0xc8, 0x4b, 0x80, 0x17,
171 0x50, 0xaa, 0x8a, 0xd5, 0xda, 0xe4, 0xfc, 0xd0,
172 0x09, 0x07, 0x37, 0xb0, 0x75, 0x75, 0x21,
173 };
174
175 /*
176 subject= /O=VeriSign Trust Network/OU=VeriSign, Inc./OU=VeriSign International Server CA - Class 3/OU=www.verisign.com/CPS Incorp.by Ref. LIABILITY LTD.(c)97 VeriSign
177 issuer= /C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority
178 serial=254B8A853842CCE358F8C5DDAE226EA4
179 */
180 static const uint8_t _c1[] = {
181 0x30, 0x82, 0x03, 0x83, 0x30, 0x82, 0x02, 0xec,
182 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x10, 0x25,
183 0x4b, 0x8a, 0x85, 0x38, 0x42, 0xcc, 0xe3, 0x58,
184 0xf8, 0xc5, 0xdd, 0xae, 0x22, 0x6e, 0xa4, 0x30,
185 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7,
186 0x0d, 0x01, 0x01, 0x05, 0x05, 0x00, 0x30, 0x5f,
187 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04,
188 0x06, 0x13, 0x02, 0x55, 0x53, 0x31, 0x17, 0x30,
189 0x15, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x0e,
190 0x56, 0x65, 0x72, 0x69, 0x53, 0x69, 0x67, 0x6e,
191 0x2c, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x31, 0x37,
192 0x30, 0x35, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x13,
193 0x2e, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x20, 0x33,
194 0x20, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20,
195 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x20,
196 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63,
197 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x41, 0x75,
198 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x30,
199 0x1e, 0x17, 0x0d, 0x39, 0x37, 0x30, 0x34, 0x31,
200 0x37, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a,
201 0x17, 0x0d, 0x31, 0x31, 0x31, 0x30, 0x32, 0x34,
202 0x32, 0x33, 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30,
203 0x81, 0xba, 0x31, 0x1f, 0x30, 0x1d, 0x06, 0x03,
204 0x55, 0x04, 0x0a, 0x13, 0x16, 0x56, 0x65, 0x72,
205 0x69, 0x53, 0x69, 0x67, 0x6e, 0x20, 0x54, 0x72,
206 0x75, 0x73, 0x74, 0x20, 0x4e, 0x65, 0x74, 0x77,
207 0x6f, 0x72, 0x6b, 0x31, 0x17, 0x30, 0x15, 0x06,
208 0x03, 0x55, 0x04, 0x0b, 0x13, 0x0e, 0x56, 0x65,
209 0x72, 0x69, 0x53, 0x69, 0x67, 0x6e, 0x2c, 0x20,
210 0x49, 0x6e, 0x63, 0x2e, 0x31, 0x33, 0x30, 0x31,
211 0x06, 0x03, 0x55, 0x04, 0x0b, 0x13, 0x2a, 0x56,
212 0x65, 0x72, 0x69, 0x53, 0x69, 0x67, 0x6e, 0x20,
213 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74,
214 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x53, 0x65,
215 0x72, 0x76, 0x65, 0x72, 0x20, 0x43, 0x41, 0x20,
216 0x2d, 0x20, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x20,
217 0x33, 0x31, 0x49, 0x30, 0x47, 0x06, 0x03, 0x55,
218 0x04, 0x0b, 0x13, 0x40, 0x77, 0x77, 0x77, 0x2e,
219 0x76, 0x65, 0x72, 0x69, 0x73, 0x69, 0x67, 0x6e,
220 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x43, 0x50, 0x53,
221 0x20, 0x49, 0x6e, 0x63, 0x6f, 0x72, 0x70, 0x2e,
222 0x62, 0x79, 0x20, 0x52, 0x65, 0x66, 0x2e, 0x20,
223 0x4c, 0x49, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54,
224 0x59, 0x20, 0x4c, 0x54, 0x44, 0x2e, 0x28, 0x63,
225 0x29, 0x39, 0x37, 0x20, 0x56, 0x65, 0x72, 0x69,
226 0x53, 0x69, 0x67, 0x6e, 0x30, 0x81, 0x9f, 0x30,
227 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7,
228 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x81,
229 0x8d, 0x00, 0x30, 0x81, 0x89, 0x02, 0x81, 0x81,
230 0x00, 0xd8, 0x82, 0x80, 0xe8, 0xd6, 0x19, 0x02,
231 0x7d, 0x1f, 0x85, 0x18, 0x39, 0x25, 0xa2, 0x65,
232 0x2b, 0xe1, 0xbf, 0xd4, 0x05, 0xd3, 0xbc, 0xe6,
233 0x36, 0x3b, 0xaa, 0xf0, 0x4c, 0x6c, 0x5b, 0xb6,
234 0xe7, 0xaa, 0x3c, 0x73, 0x45, 0x55, 0xb2, 0xf1,
235 0xbd, 0xea, 0x97, 0x42, 0xed, 0x9a, 0x34, 0x0a,
236 0x15, 0xd4, 0xa9, 0x5c, 0xf5, 0x40, 0x25, 0xdd,
237 0xd9, 0x07, 0xc1, 0x32, 0xb2, 0x75, 0x6c, 0xc4,
238 0xca, 0xbb, 0xa3, 0xfe, 0x56, 0x27, 0x71, 0x43,
239 0xaa, 0x63, 0xf5, 0x30, 0x3e, 0x93, 0x28, 0xe5,
240 0xfa, 0xf1, 0x09, 0x3b, 0xf3, 0xb7, 0x4d, 0x4e,
241 0x39, 0xf7, 0x5c, 0x49, 0x5a, 0xb8, 0xc1, 0x1d,
242 0xd3, 0xb2, 0x8a, 0xfe, 0x70, 0x30, 0x95, 0x42,
243 0xcb, 0xfe, 0x2b, 0x51, 0x8b, 0x5a, 0x3c, 0x3a,
244 0xf9, 0x22, 0x4f, 0x90, 0xb2, 0x02, 0xa7, 0x53,
245 0x9c, 0x4f, 0x34, 0xe7, 0xab, 0x04, 0xb2, 0x7b,
246 0x6f, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3, 0x81,
247 0xe3, 0x30, 0x81, 0xe0, 0x30, 0x0f, 0x06, 0x03,
248 0x55, 0x1d, 0x13, 0x04, 0x08, 0x30, 0x06, 0x01,
249 0x01, 0xff, 0x02, 0x01, 0x00, 0x30, 0x44, 0x06,
250 0x03, 0x55, 0x1d, 0x20, 0x04, 0x3d, 0x30, 0x3b,
251 0x30, 0x39, 0x06, 0x0b, 0x60, 0x86, 0x48, 0x01,
252 0x86, 0xf8, 0x45, 0x01, 0x07, 0x01, 0x01, 0x30,
253 0x2a, 0x30, 0x28, 0x06, 0x08, 0x2b, 0x06, 0x01,
254 0x05, 0x05, 0x07, 0x02, 0x01, 0x16, 0x1c, 0x68,
255 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77,
256 0x77, 0x77, 0x2e, 0x76, 0x65, 0x72, 0x69, 0x73,
257 0x69, 0x67, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
258 0x43, 0x50, 0x53, 0x30, 0x34, 0x06, 0x03, 0x55,
259 0x1d, 0x25, 0x04, 0x2d, 0x30, 0x2b, 0x06, 0x08,
260 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x03, 0x01,
261 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07,
262 0x03, 0x02, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01,
263 0x86, 0xf8, 0x42, 0x04, 0x01, 0x06, 0x0a, 0x60,
264 0x86, 0x48, 0x01, 0x86, 0xf8, 0x45, 0x01, 0x08,
265 0x01, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x1d, 0x0f,
266 0x04, 0x04, 0x03, 0x02, 0x01, 0x06, 0x30, 0x11,
267 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x86, 0xf8,
268 0x42, 0x01, 0x01, 0x04, 0x04, 0x03, 0x02, 0x01,
269 0x06, 0x30, 0x31, 0x06, 0x03, 0x55, 0x1d, 0x1f,
270 0x04, 0x2a, 0x30, 0x28, 0x30, 0x26, 0xa0, 0x24,
271 0xa0, 0x22, 0x86, 0x20, 0x68, 0x74, 0x74, 0x70,
272 0x3a, 0x2f, 0x2f, 0x63, 0x72, 0x6c, 0x2e, 0x76,
273 0x65, 0x72, 0x69, 0x73, 0x69, 0x67, 0x6e, 0x2e,
274 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x63, 0x61, 0x33,
275 0x2e, 0x63, 0x72, 0x6c, 0x30, 0x0d, 0x06, 0x09,
276 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01,
277 0x05, 0x05, 0x00, 0x03, 0x81, 0x81, 0x00, 0x08,
278 0x01, 0xec, 0xe4, 0x68, 0x94, 0x03, 0x42, 0xf1,
279 0x73, 0xf1, 0x23, 0xa2, 0x3a, 0xde, 0xe9, 0xf1,
280 0xda, 0xc6, 0x54, 0xc4, 0x23, 0x3e, 0x86, 0xea,
281 0xcf, 0x6a, 0x3a, 0x33, 0xab, 0xea, 0x9c, 0x04,
282 0x14, 0x07, 0x36, 0x06, 0x0b, 0xf9, 0x88, 0x6f,
283 0xd5, 0x13, 0xee, 0x29, 0x2b, 0xc3, 0xe4, 0x72,
284 0x8d, 0x44, 0xed, 0xd1, 0xac, 0x20, 0x09, 0x2d,
285 0xe1, 0xf6, 0xe1, 0x19, 0x05, 0x38, 0xb0, 0x3d,
286 0x0f, 0x9f, 0x7f, 0xf8, 0x9e, 0x02, 0xdc, 0x86,
287 0x02, 0x86, 0x61, 0x4e, 0x26, 0x5f, 0x5e, 0x9f,
288 0x92, 0x1e, 0x0c, 0x24, 0xa4, 0xf5, 0xd0, 0x70,
289 0x13, 0xcf, 0x26, 0xc3, 0x43, 0x3d, 0x49, 0x1d,
290 0x9e, 0x82, 0x2e, 0x52, 0x5f, 0xbc, 0x3e, 0xc6,
291 0x66, 0x29, 0x01, 0x8e, 0x4e, 0x92, 0x2c, 0xbc,
292 0x46, 0x75, 0x03, 0x82, 0xac, 0x73, 0xe9, 0xd9,
293 0x7e, 0x0b, 0x67, 0xef, 0x54, 0x52, 0x1a
294 };
295
296
297 /*
298 subject= /C=US/O=University of Virginia/OU=UVA Standard PKI User/emailAddress=kmm6b@Virginia.EDU/CN=Keith M. Moores 10
299 issuer= /C=US/ST=Virginia/L=Charlottesville/O=University of Virginia/emailAddress=pkimaster@virginia.edu/CN=UVA Standard Assurance SKP 1
300 serial=0C6D
301 */
302 static const uint8_t _c2[] = {
303 0x30, 0x82, 0x05, 0x56, 0x30, 0x82, 0x04, 0xbf,
304 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x02, 0x0c,
305 0x6d, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48,
306 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x05, 0x05, 0x00,
307 0x30, 0x81, 0xa9, 0x31, 0x0b, 0x30, 0x09, 0x06,
308 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55, 0x53,
309 0x31, 0x11, 0x30, 0x0f, 0x06, 0x03, 0x55, 0x04,
310 0x08, 0x13, 0x08, 0x56, 0x69, 0x72, 0x67, 0x69,
311 0x6e, 0x69, 0x61, 0x31, 0x18, 0x30, 0x16, 0x06,
312 0x03, 0x55, 0x04, 0x07, 0x13, 0x0f, 0x43, 0x68,
313 0x61, 0x72, 0x6c, 0x6f, 0x74, 0x74, 0x65, 0x73,
314 0x76, 0x69, 0x6c, 0x6c, 0x65, 0x31, 0x1f, 0x30,
315 0x1d, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x16,
316 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x69,
317 0x74, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x56, 0x69,
318 0x72, 0x67, 0x69, 0x6e, 0x69, 0x61, 0x31, 0x25,
319 0x30, 0x23, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86,
320 0xf7, 0x0d, 0x01, 0x09, 0x01, 0x16, 0x16, 0x70,
321 0x6b, 0x69, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72,
322 0x40, 0x76, 0x69, 0x72, 0x67, 0x69, 0x6e, 0x69,
323 0x61, 0x2e, 0x65, 0x64, 0x75, 0x31, 0x25, 0x30,
324 0x23, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x1c,
325 0x55, 0x56, 0x41, 0x20, 0x53, 0x74, 0x61, 0x6e,
326 0x64, 0x61, 0x72, 0x64, 0x20, 0x41, 0x73, 0x73,
327 0x75, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x53,
328 0x4b, 0x50, 0x20, 0x31, 0x30, 0x1e, 0x17, 0x0d,
329 0x30, 0x34, 0x30, 0x31, 0x30, 0x38, 0x31, 0x37,
330 0x32, 0x35, 0x30, 0x30, 0x5a, 0x17, 0x0d, 0x30,
331 0x35, 0x30, 0x31, 0x30, 0x38, 0x31, 0x37, 0x32,
332 0x35, 0x30, 0x30, 0x5a, 0x30, 0x81, 0x8e, 0x31,
333 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06,
334 0x13, 0x02, 0x55, 0x53, 0x31, 0x1f, 0x30, 0x1d,
335 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x16, 0x55,
336 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x69, 0x74,
337 0x79, 0x20, 0x6f, 0x66, 0x20, 0x56, 0x69, 0x72,
338 0x67, 0x69, 0x6e, 0x69, 0x61, 0x31, 0x1e, 0x30,
339 0x1c, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x13, 0x15,
340 0x55, 0x56, 0x41, 0x20, 0x53, 0x74, 0x61, 0x6e,
341 0x64, 0x61, 0x72, 0x64, 0x20, 0x50, 0x4b, 0x49,
342 0x20, 0x55, 0x73, 0x65, 0x72, 0x31, 0x21, 0x30,
343 0x1f, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7,
344 0x0d, 0x01, 0x09, 0x01, 0x16, 0x12, 0x6b, 0x6d,
345 0x6d, 0x36, 0x62, 0x40, 0x56, 0x69, 0x72, 0x67,
346 0x69, 0x6e, 0x69, 0x61, 0x2e, 0x45, 0x44, 0x55,
347 0x31, 0x1b, 0x30, 0x19, 0x06, 0x03, 0x55, 0x04,
348 0x03, 0x13, 0x12, 0x4b, 0x65, 0x69, 0x74, 0x68,
349 0x20, 0x4d, 0x2e, 0x20, 0x4d, 0x6f, 0x6f, 0x72,
350 0x65, 0x73, 0x20, 0x31, 0x30, 0x30, 0x81, 0x9f,
351 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86,
352 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03,
353 0x81, 0x8d, 0x00, 0x30, 0x81, 0x89, 0x02, 0x81,
354 0x81, 0x00, 0xb4, 0xf9, 0x1b, 0xda, 0x10, 0x01,
355 0x47, 0x96, 0xb4, 0xea, 0xb2, 0x35, 0xbb, 0x7e,
356 0x69, 0x69, 0xd9, 0x49, 0x2c, 0x36, 0x3a, 0x27,
357 0x55, 0x6e, 0x11, 0xb1, 0xdf, 0x13, 0x54, 0xf2,
358 0x66, 0xa5, 0x98, 0x3a, 0xfd, 0x7e, 0xda, 0x6d,
359 0x12, 0xb7, 0x06, 0xaa, 0xde, 0x55, 0x50, 0x04,
360 0xf5, 0x91, 0x27, 0xc7, 0x4d, 0x85, 0x91, 0xd9,
361 0xc5, 0xd6, 0x88, 0xc6, 0x33, 0x40, 0x83, 0xc0,
362 0xe4, 0x83, 0xe2, 0x9f, 0x49, 0xfb, 0xc1, 0x1f,
363 0xdb, 0xd9, 0xf4, 0xd4, 0x32, 0x2e, 0x3a, 0xe9,
364 0xb4, 0x12, 0x5d, 0x58, 0x2a, 0x65, 0x4e, 0xc7,
365 0x09, 0x59, 0xfc, 0x2b, 0x0d, 0xda, 0x6a, 0xc3,
366 0x9f, 0x32, 0x7d, 0xf2, 0xfc, 0xf4, 0x3e, 0xb8,
367 0x63, 0xbc, 0x13, 0x74, 0xc6, 0x0e, 0x76, 0x3a,
368 0x7a, 0xe9, 0x93, 0x97, 0x7f, 0xc8, 0x2b, 0x33,
369 0x9f, 0xd8, 0x59, 0xef, 0xc0, 0x0a, 0x2e, 0xd3,
370 0xd9, 0x69, 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3,
371 0x82, 0x02, 0xa4, 0x30, 0x82, 0x02, 0xa0, 0x30,
372 0x0b, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x04, 0x04,
373 0x03, 0x02, 0x05, 0xa0, 0x30, 0x1d, 0x06, 0x03,
374 0x55, 0x1d, 0x25, 0x04, 0x16, 0x30, 0x14, 0x06,
375 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x03,
376 0x02, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05,
377 0x07, 0x03, 0x04, 0x30, 0x1d, 0x06, 0x03, 0x55,
378 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0x4d, 0xe0,
379 0xe1, 0x57, 0xb6, 0x91, 0x7a, 0x34, 0x99, 0x7a,
380 0xe5, 0x2a, 0xd6, 0xae, 0x0a, 0x75, 0x05, 0x73,
381 0x5d, 0x30, 0x30, 0x09, 0x06, 0x03, 0x55, 0x1d,
382 0x13, 0x04, 0x02, 0x30, 0x00, 0x30, 0x1f, 0x06,
383 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16,
384 0x80, 0x14, 0x2c, 0xb7, 0xe3, 0xa6, 0x09, 0x68,
385 0x85, 0x90, 0x58, 0x8e, 0x2d, 0xd5, 0x3a, 0xef,
386 0x93, 0x02, 0x2a, 0x4c, 0x85, 0x62, 0x30, 0x41,
387 0x06, 0x03, 0x55, 0x1d, 0x11, 0x04, 0x3a, 0x30,
388 0x38, 0xa0, 0x22, 0x06, 0x0a, 0x2b, 0x06, 0x01,
389 0x04, 0x01, 0x82, 0x37, 0x14, 0x02, 0x03, 0xa0,
390 0x14, 0x0c, 0x12, 0x6b, 0x6d, 0x6d, 0x36, 0x62,
391 0x40, 0x56, 0x69, 0x72, 0x67, 0x69, 0x6e, 0x69,
392 0x61, 0x2e, 0x45, 0x44, 0x55, 0x81, 0x12, 0x6b,
393 0x6d, 0x6d, 0x36, 0x62, 0x40, 0x56, 0x69, 0x72,
394 0x67, 0x69, 0x6e, 0x69, 0x61, 0x2e, 0x45, 0x44,
395 0x55, 0x30, 0x2f, 0x06, 0x03, 0x55, 0x1d, 0x12,
396 0x04, 0x28, 0x30, 0x26, 0x81, 0x16, 0x70, 0x6b,
397 0x69, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x40,
398 0x56, 0x69, 0x72, 0x67, 0x69, 0x6e, 0x69, 0x61,
399 0x2e, 0x45, 0x44, 0x55, 0x82, 0x0c, 0x56, 0x69,
400 0x72, 0x67, 0x69, 0x6e, 0x69, 0x61, 0x2e, 0x45,
401 0x44, 0x55, 0x30, 0x82, 0x01, 0x5c, 0x06, 0x03,
402 0x55, 0x1d, 0x1f, 0x04, 0x82, 0x01, 0x53, 0x30,
403 0x82, 0x01, 0x4f, 0x30, 0x74, 0xa0, 0x72, 0xa0,
404 0x70, 0x86, 0x6e, 0x6c, 0x64, 0x61, 0x70, 0x3a,
405 0x2f, 0x2f, 0x6c, 0x64, 0x61, 0x70, 0x2e, 0x70,
406 0x6b, 0x69, 0x2e, 0x76, 0x69, 0x72, 0x67, 0x69,
407 0x6e, 0x69, 0x61, 0x2e, 0x65, 0x64, 0x75, 0x2f,
408 0x63, 0x3d, 0x55, 0x53, 0x2c, 0x6f, 0x3d, 0x55,
409 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x69, 0x74,
410 0x79, 0x25, 0x32, 0x30, 0x6f, 0x66, 0x25, 0x32,
411 0x30, 0x56, 0x69, 0x72, 0x67, 0x69, 0x6e, 0x69,
412 0x61, 0x2c, 0x6f, 0x75, 0x3d, 0x55, 0x56, 0x41,
413 0x25, 0x32, 0x30, 0x53, 0x74, 0x61, 0x6e, 0x64,
414 0x61, 0x72, 0x64, 0x25, 0x32, 0x30, 0x41, 0x73,
415 0x73, 0x75, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x25,
416 0x32, 0x30, 0x53, 0x4b, 0x50, 0x25, 0x32, 0x30,
417 0x31, 0x2c, 0x63, 0x6e, 0x3d, 0x30, 0x43, 0x36,
418 0x44, 0x30, 0x74, 0xa0, 0x72, 0xa0, 0x70, 0x86,
419 0x6e, 0x6c, 0x64, 0x61, 0x70, 0x3a, 0x2f, 0x2f,
420 0x6c, 0x64, 0x61, 0x70, 0x2e, 0x70, 0x6b, 0x69,
421 0x2e, 0x76, 0x69, 0x72, 0x67, 0x69, 0x6e, 0x69,
422 0x61, 0x2e, 0x65, 0x64, 0x75, 0x2f, 0x63, 0x6e,
423 0x3d, 0x30, 0x43, 0x36, 0x44, 0x2c, 0x6f, 0x75,
424 0x3d, 0x55, 0x56, 0x41, 0x25, 0x32, 0x30, 0x53,
425 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x25,
426 0x32, 0x30, 0x41, 0x73, 0x73, 0x75, 0x72, 0x61,
427 0x6e, 0x63, 0x65, 0x25, 0x32, 0x30, 0x53, 0x4b,
428 0x50, 0x25, 0x32, 0x30, 0x31, 0x2c, 0x6f, 0x3d,
429 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x69,
430 0x74, 0x79, 0x25, 0x32, 0x30, 0x6f, 0x66, 0x25,
431 0x32, 0x30, 0x56, 0x69, 0x72, 0x67, 0x69, 0x6e,
432 0x69, 0x61, 0x2c, 0x63, 0x3d, 0x55, 0x53, 0x30,
433 0x61, 0xa0, 0x5f, 0xa0, 0x5d, 0x86, 0x5b, 0x68,
434 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77,
435 0x77, 0x2e, 0x70, 0x6b, 0x69, 0x2e, 0x76, 0x69,
436 0x72, 0x67, 0x69, 0x6e, 0x69, 0x61, 0x2e, 0x65,
437 0x64, 0x75, 0x2f, 0x63, 0x67, 0x69, 0x2d, 0x62,
438 0x69, 0x6e, 0x2f, 0x67, 0x65, 0x74, 0x2d, 0x63,
439 0x72, 0x6c, 0x3f, 0x6f, 0x75, 0x3d, 0x55, 0x56,
440 0x41, 0x25, 0x32, 0x30, 0x53, 0x74, 0x61, 0x6e,
441 0x64, 0x61, 0x72, 0x64, 0x25, 0x32, 0x30, 0x41,
442 0x73, 0x73, 0x75, 0x72, 0x61, 0x6e, 0x63, 0x65,
443 0x25, 0x32, 0x30, 0x53, 0x4b, 0x50, 0x25, 0x32,
444 0x30, 0x31, 0x26, 0x63, 0x6e, 0x3d, 0x30, 0x43,
445 0x36, 0x44, 0x30, 0x53, 0x06, 0x03, 0x55, 0x1d,
446 0x20, 0x04, 0x4c, 0x30, 0x4a, 0x30, 0x48, 0x06,
447 0x09, 0x2b, 0x06, 0x01, 0x04, 0x01, 0xb4, 0x76,
448 0x01, 0x01, 0x30, 0x3b, 0x30, 0x39, 0x06, 0x08,
449 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x02, 0x01,
450 0x16, 0x2d, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f,
451 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x70, 0x6b, 0x69,
452 0x2e, 0x76, 0x69, 0x72, 0x67, 0x69, 0x6e, 0x69,
453 0x61, 0x2e, 0x65, 0x64, 0x75, 0x2f, 0x73, 0x74,
454 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x2f, 0x63,
455 0x70, 0x73, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x30,
456 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7,
457 0x0d, 0x01, 0x01, 0x05, 0x05, 0x00, 0x03, 0x81,
458 0x81, 0x00, 0x9f, 0xf2, 0x7f, 0x51, 0x97, 0x2c,
459 0xe6, 0x8f, 0x50, 0xba, 0x75, 0xd8, 0x9c, 0x77,
460 0x5e, 0x2a, 0xe9, 0xbe, 0x18, 0x37, 0x7f, 0x18,
461 0x86, 0xbb, 0x9d, 0x22, 0xf2, 0xf9, 0x3e, 0x22,
462 0x00, 0x0b, 0xf2, 0x41, 0x6b, 0x08, 0x17, 0xbc,
463 0x7a, 0xc4, 0xc9, 0x99, 0xa0, 0xbd, 0x53, 0x8d,
464 0x52, 0xdb, 0xcc, 0xd0, 0x88, 0x14, 0x2a, 0x05,
465 0x93, 0xcd, 0xf3, 0xa0, 0xf3, 0xb9, 0xdb, 0x35,
466 0x5c, 0xec, 0x24, 0xe8, 0x08, 0xbe, 0x4e, 0xa1,
467 0xa2, 0x54, 0x41, 0xbc, 0xbe, 0x7b, 0x22, 0xf4,
468 0x03, 0x7d, 0xd0, 0xfb, 0x25, 0x8d, 0xf5, 0xa9,
469 0x04, 0x14, 0xe9, 0xe3, 0x3e, 0x3f, 0x13, 0x6f,
470 0x89, 0x72, 0x76, 0x41, 0x67, 0x8a, 0x48, 0x2a,
471 0x36, 0xf0, 0xe6, 0xb9, 0x33, 0x35, 0x88, 0xda,
472 0x27, 0x9d, 0xf9, 0x5d, 0x42, 0x04, 0x6f, 0x7d,
473 0x60, 0x53, 0x86, 0xf2, 0xf4, 0x3b, 0x3d, 0xbe,
474 0x1d, 0x99,
475 };
476
477 /* subject:/C=US/O=Apple Computer, Inc./OU=mac.com/CN=phased/description=.Mac Sharing Certificate */
478 /* issuer :/C=US/O=Apple Computer, Inc./OU=Apple Computer Certificate Authority/CN=Apple .Mac Certificate Authority */
479 static unsigned char _phased_c3[1376]={
480 0x30,0x82,0x05,0x5C,0x30,0x82,0x04,0x44,0xA0,0x03,0x02,0x01,0x02,0x02,0x03,0x20,
481 0x7D,0xC7,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,0x05,
482 0x00,0x30,0x81,0x86,0x31,0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,
483 0x53,0x31,0x1D,0x30,0x1B,0x06,0x03,0x55,0x04,0x0A,0x13,0x14,0x41,0x70,0x70,0x6C,
484 0x65,0x20,0x43,0x6F,0x6D,0x70,0x75,0x74,0x65,0x72,0x2C,0x20,0x49,0x6E,0x63,0x2E,
485 0x31,0x2D,0x30,0x2B,0x06,0x03,0x55,0x04,0x0B,0x13,0x24,0x41,0x70,0x70,0x6C,0x65,
486 0x20,0x43,0x6F,0x6D,0x70,0x75,0x74,0x65,0x72,0x20,0x43,0x65,0x72,0x74,0x69,0x66,
487 0x69,0x63,0x61,0x74,0x65,0x20,0x41,0x75,0x74,0x68,0x6F,0x72,0x69,0x74,0x79,0x31,
488 0x29,0x30,0x27,0x06,0x03,0x55,0x04,0x03,0x13,0x20,0x41,0x70,0x70,0x6C,0x65,0x20,
489 0x2E,0x4D,0x61,0x63,0x20,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x65,
490 0x20,0x41,0x75,0x74,0x68,0x6F,0x72,0x69,0x74,0x79,0x30,0x1E,0x17,0x0D,0x30,0x37,
491 0x31,0x30,0x32,0x38,0x31,0x38,0x35,0x34,0x35,0x33,0x5A,0x17,0x0D,0x30,0x38,0x31,
492 0x30,0x32,0x38,0x31,0x38,0x35,0x34,0x35,0x33,0x5A,0x30,0x72,0x31,0x0B,0x30,0x09,
493 0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x1D,0x30,0x1B,0x06,0x03,0x55,
494 0x04,0x0A,0x13,0x14,0x41,0x70,0x70,0x6C,0x65,0x20,0x43,0x6F,0x6D,0x70,0x75,0x74,
495 0x65,0x72,0x2C,0x20,0x49,0x6E,0x63,0x2E,0x31,0x10,0x30,0x0E,0x06,0x03,0x55,0x04,
496 0x0B,0x13,0x07,0x6D,0x61,0x63,0x2E,0x63,0x6F,0x6D,0x31,0x0F,0x30,0x0D,0x06,0x03,
497 0x55,0x04,0x03,0x13,0x06,0x70,0x68,0x61,0x73,0x65,0x64,0x31,0x21,0x30,0x1F,0x06,
498 0x03,0x55,0x04,0x0D,0x13,0x18,0x2E,0x4D,0x61,0x63,0x20,0x53,0x68,0x61,0x72,0x69,
499 0x6E,0x67,0x20,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x65,0x30,0x81,
500 0x9F,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x01,0x05,0x00,
501 0x03,0x81,0x8D,0x00,0x30,0x81,0x89,0x02,0x81,0x81,0x00,0xC0,0xFB,0x0E,0x62,0xD3,
502 0xE2,0xCC,0xC7,0x54,0x6A,0x4F,0x9C,0x4E,0x40,0x9D,0x30,0x3D,0x60,0x86,0x00,0x7C,
503 0x33,0x0C,0x2E,0x2E,0x45,0xDF,0xBE,0xEB,0x94,0xE7,0xD6,0xBE,0x6B,0x0F,0x7B,0x88,
504 0x3C,0x02,0xA7,0x25,0x5E,0x18,0xC6,0x97,0xF0,0x0C,0xDD,0x89,0x22,0x27,0x9C,0x85,
505 0x25,0x36,0x95,0x61,0x26,0xE7,0x6C,0x7E,0x41,0xDE,0xFF,0x5D,0x77,0xCB,0xE6,0x05,
506 0xB0,0xAD,0x77,0xC9,0xFC,0xA5,0xF1,0x82,0x1A,0xB4,0xE4,0x26,0x8D,0x1B,0xC3,0xE2,
507 0xEF,0x6A,0xE0,0xEE,0xF3,0x38,0x27,0xE1,0x73,0x9E,0xD0,0x93,0x6A,0xA6,0xD5,0xD1,
508 0xEC,0xE5,0x0D,0x4B,0x3A,0x42,0x8C,0xF1,0xE1,0x24,0x0A,0x02,0x0D,0x22,0xAE,0xEC,
509 0x47,0xDA,0xFA,0x6B,0x12,0x50,0x47,0x2E,0x4A,0xD8,0x9F,0x02,0x03,0x01,0x00,0x01,
510 0xA3,0x82,0x02,0x68,0x30,0x82,0x02,0x64,0x30,0x0C,0x06,0x03,0x55,0x1D,0x13,0x01,
511 0x01,0xFF,0x04,0x02,0x30,0x00,0x30,0x0E,0x06,0x03,0x55,0x1D,0x0F,0x01,0x01,0xFF,
512 0x04,0x04,0x03,0x02,0x03,0x88,0x30,0x28,0x06,0x03,0x55,0x1D,0x25,0x04,0x21,0x30,
513 0x1F,0x06,0x08,0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x02,0x06,0x0A,0x2A,0x86,0x48,
514 0x86,0xF7,0x63,0x64,0x03,0x02,0x01,0x06,0x07,0x2B,0x06,0x01,0x05,0x02,0x03,0x04,
515 0x30,0x1D,0x06,0x03,0x55,0x1D,0x0E,0x04,0x16,0x04,0x14,0x3D,0xD9,0xDD,0x8F,0x5B,
516 0x5E,0xA3,0x3A,0x8C,0x89,0x7F,0x8A,0x85,0x26,0xA7,0x84,0x0E,0xF3,0x0D,0x82,0x30,
517 0x1F,0x06,0x03,0x55,0x1D,0x23,0x04,0x18,0x30,0x16,0x80,0x14,0x7A,0x7D,0x90,0xB1,
518 0x30,0x59,0x08,0x92,0x91,0xF9,0x53,0xB9,0x71,0x1D,0x35,0x33,0x67,0x34,0x8B,0xD5,
519 0x30,0x81,0xAD,0x06,0x08,0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x01,0x04,0x81,0xA0,
520 0x30,0x81,0x9D,0x30,0x28,0x06,0x08,0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,0x86,
521 0x1C,0x68,0x74,0x74,0x70,0x3A,0x2F,0x2F,0x63,0x65,0x72,0x74,0x69,0x6E,0x66,0x6F,
522 0x2E,0x6D,0x61,0x63,0x2E,0x63,0x6F,0x6D,0x2F,0x6F,0x63,0x73,0x70,0x30,0x44,0x06,
523 0x08,0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x02,0x86,0x38,0x68,0x74,0x74,0x70,0x3A,
524 0x2F,0x2F,0x77,0x77,0x77,0x2E,0x61,0x70,0x70,0x6C,0x65,0x2E,0x63,0x6F,0x6D,0x2F,
525 0x63,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x65,0x61,0x75,0x74,0x68,0x6F,
526 0x72,0x69,0x74,0x79,0x2F,0x63,0x61,0x73,0x69,0x67,0x6E,0x65,0x72,0x73,0x2E,0x68,
527 0x74,0x6D,0x6C,0x30,0x2B,0x06,0x03,0x55,0x1D,0x12,0x86,0x24,0x68,0x74,0x74,0x70,
528 0x3A,0x2F,0x2F,0x63,0x65,0x72,0x74,0x69,0x6E,0x66,0x6F,0x2E,0x6D,0x61,0x63,0x2E,
529 0x63,0x6F,0x6D,0x2F,0x64,0x6F,0x74,0x4D,0x61,0x63,0x43,0x41,0x2E,0x63,0x65,0x72,
530 0x30,0x82,0x01,0x28,0x06,0x03,0x55,0x1D,0x20,0x04,0x82,0x01,0x1F,0x30,0x82,0x01,
531 0x1B,0x30,0x82,0x01,0x17,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x63,0x64,0x05,0x02,
532 0x30,0x82,0x01,0x08,0x30,0x40,0x06,0x08,0x2B,0x06,0x01,0x05,0x05,0x07,0x02,0x01,
533 0x16,0x34,0x68,0x74,0x74,0x70,0x3A,0x2F,0x2F,0x77,0x77,0x77,0x2E,0x61,0x70,0x70,
534 0x6C,0x65,0x2E,0x63,0x6F,0x6D,0x2F,0x63,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,
535 0x74,0x65,0x61,0x75,0x74,0x68,0x6F,0x72,0x69,0x74,0x79,0x2F,0x74,0x65,0x72,0x6D,
536 0x73,0x2E,0x68,0x74,0x6D,0x6C,0x30,0x81,0xC3,0x06,0x08,0x2B,0x06,0x01,0x05,0x05,
537 0x07,0x02,0x02,0x30,0x81,0xB6,0x1A,0x81,0xB3,0x52,0x65,0x6C,0x69,0x61,0x6E,0x63,
538 0x65,0x20,0x6F,0x6E,0x20,0x74,0x68,0x69,0x73,0x20,0x63,0x65,0x72,0x74,0x69,0x66,
539 0x69,0x63,0x61,0x74,0x65,0x20,0x62,0x79,0x20,0x61,0x6E,0x79,0x20,0x70,0x61,0x72,
540 0x74,0x79,0x20,0x61,0x73,0x73,0x75,0x6D,0x65,0x73,0x20,0x61,0x63,0x63,0x65,0x70,
541 0x74,0x61,0x6E,0x63,0x65,0x20,0x6F,0x66,0x20,0x74,0x68,0x65,0x20,0x74,0x68,0x65,
542 0x6E,0x20,0x61,0x70,0x70,0x6C,0x69,0x63,0x61,0x62,0x6C,0x65,0x20,0x73,0x74,0x61,
543 0x6E,0x64,0x61,0x72,0x64,0x20,0x74,0x65,0x72,0x6D,0x73,0x20,0x61,0x6E,0x64,0x20,
544 0x63,0x6F,0x6E,0x64,0x69,0x74,0x69,0x6F,0x6E,0x73,0x20,0x6F,0x66,0x20,0x75,0x73,
545 0x65,0x2C,0x20,0x63,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x65,0x20,0x70,
546 0x6F,0x6C,0x69,0x63,0x79,0x20,0x61,0x6E,0x64,0x20,0x63,0x65,0x72,0x74,0x69,0x66,
547 0x69,0x63,0x61,0x74,0x69,0x6F,0x6E,0x20,0x70,0x72,0x61,0x63,0x74,0x69,0x63,0x65,
548 0x20,0x73,0x74,0x61,0x74,0x65,0x6D,0x65,0x6E,0x74,0x73,0x2E,0x30,0x0D,0x06,0x09,
549 0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,0x03,0x82,0x01,0x01,0x00,
550 0x30,0x48,0x04,0xA8,0x63,0x5A,0x7A,0xF9,0xEA,0x8B,0xF7,0x7F,0xF6,0x27,0x21,0x02,
551 0xE2,0x83,0xC8,0x64,0x99,0xB3,0x40,0x71,0x97,0x30,0xE2,0x92,0xD4,0x58,0xB8,0xD8,
552 0xF1,0xAA,0x30,0x59,0x75,0x4C,0x67,0x16,0xF8,0x38,0xBD,0xD7,0xF4,0xEA,0x03,0xB5,
553 0xE6,0x42,0xF8,0x95,0xBA,0x5B,0xE4,0x3C,0xA8,0x75,0x6C,0x05,0xFB,0x3C,0x3C,0xE3,
554 0x08,0x90,0x5F,0x6D,0x7E,0x3A,0xEA,0xBD,0x19,0x52,0x82,0x3B,0x9C,0x7F,0x64,0x15,
555 0x3A,0xCA,0x54,0x52,0x57,0xEB,0x53,0x09,0xE8,0x05,0x53,0x79,0xB9,0x7D,0x51,0xA3,
556 0x8E,0x31,0xF1,0xE5,0x5E,0xC6,0xA6,0x81,0x11,0x68,0x0A,0x17,0xD5,0xA0,0xBB,0x49,
557 0xF3,0x4E,0x59,0x1D,0xCB,0xCA,0x3E,0x09,0x64,0x2F,0x27,0x6C,0xCA,0x39,0x50,0x73,
558 0x42,0x5C,0x9D,0xE2,0x92,0x45,0x37,0x7F,0x02,0xF0,0x2B,0xA0,0xDD,0x1C,0x02,0xDC,
559 0x77,0xA9,0x0C,0xEA,0x14,0xAE,0xDE,0x81,0xDF,0x3E,0x31,0x59,0xF6,0xF7,0xE5,0x7F,
560 0xBC,0x7C,0xFD,0xE8,0x22,0xBE,0x9A,0x78,0xDD,0xFD,0x32,0x7F,0xE0,0xEC,0x0F,0x8D,
561 0x4D,0xB5,0xDE,0xF6,0x91,0x4B,0xAD,0xDB,0x7D,0xF9,0x07,0xB8,0x2B,0x0E,0xB5,0x58,
562 0x05,0xA2,0x85,0xF6,0x72,0x0E,0xCB,0x63,0x4E,0x8F,0xBF,0xD6,0x33,0x6F,0xF3,0xC2,
563 0x53,0xFA,0x67,0x5D,0x19,0xA8,0x49,0x1C,0x05,0x5D,0xAF,0x6C,0xDC,0x14,0x37,0xD5,
564 0x65,0x42,0x24,0x3B,0x69,0xC9,0x78,0x3F,0x4B,0x0E,0xAF,0x13,0x37,0x00,0x1E,0x6B,
565 0xCE,0xB9,0xCC,0xAA,0x99,0x1A,0xB7,0x5A,0x27,0xB9,0xE9,0xD6,0x87,0x0A,0xEB,0x77,
566 };
567
568 static unsigned char pem[] = "\n"
569 "-----BEGIN CERTIFICATE-----\n"
570 "MIIDSzCCAjOgAwIBAgIJAPsB+wAAAAABMA0GCSqGSIb3DQEBBQUAMH4xCzAJBgNV\n"
571 "BAYTAlVTMRMwEQYDVQQKEwpBcHBsZSBJbmMuMSYwJAYDVQQLEx1BcHBsZSBDZXJ0\n"
572 "aWZpY2F0aW9uIEF1dGhvcml0eTEyMDAGA1UEAxMpQXBwbGUgU2VjdXJlIEJvb3Qg\n"
573 "Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDcwMTA2MDUyMDUyWhcNMTcwMTA2\n"
574 "MDUyMDUyWjB0MQswCQYDVQQGEwJVUzETMBEGA1UEChMKQXBwbGUgSW5jLjEyMDAG\n"
575 "A1UECxMpQXBwbGUgU2VjdXJlIEJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkx\n"
576 "HDAaBgNVBAMTE1M1TDg5MDAgU2VjdXJlIEJvb3QwgZ8wDQYJKoZIhvcNAQEBBQAD\n"
577 "gY0AMIGJAoGBAMSrg/5uSm6EaOPbN2sedX5F31i+4x5BLd8cVbopszz/9OJZz/RD\n"
578 "tWbVkSh2O7PZbvfYwwHB6D3pebAA1S9rakwaKO7hKyKzHqpHeiqu+ECdmPGBRhFf\n"
579 "16zQL/pXzEnHn4IBfHcG5O49VqI8TK9pMZiqOQ4nh5H5mYIBImcaQ7frAgMBAAGj\n"
580 "WjBYMAsGA1UdDwQEAwIHgDAJBgNVHRMEAjAAMB0GA1UdDgQWBBQZ39dDpsNXFu2G\n"
581 "Qt2ylAihau3f3jAfBgNVHSMEGDAWgBRJPTZTydcV4YZhTqyrqxhWY13DxjANBgkq\n"
582 "hkiG9w0BAQUFAAOCAQEAlAHI8JncOxR8kSzIuN6jCY22DgiZYahvO7H3f68w3QO3\n"
583 "NE8Cp/UCECv+pQmlMuJPMAYzfLwGtoLhpq6BlCQXEc4KYhjGh5aicdXBkZDf+rA0\n"
584 "p1KphAd8c2UEIAWBbqU87q1FbDSJBw3YKN7C/I4qGnzUrWSpBbq6musM0QzO/uUZ\n"
585 "3R1QsfpicZ+nT/1WmlJSAwtoQsBjNAgMauhRLAJc/fCPi8TqONju/xxbGDYJ/cQs\n"
586 "bCGfszrUSeGYu4ryxeyNuu2L8gluHUKbhfZ7J1XYgIsvoCnk5E5hWJDhpIyywylb\n"
587 "9F/uRNib8zb0L80S64vAWC4m4QUJ3iLmTfIsk+NYPQ==\n"
588 "-----END CERTIFICATE-----\n";
589
590 static unsigned char _elektron_v1_cert_der[] = {
591 0x30, 0x82, 0x02, 0x71, 0x30, 0x82, 0x01, 0xda, 0x02, 0x01, 0x01, 0x30,
592 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x05,
593 0x05, 0x00, 0x30, 0x81, 0x80, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55,
594 0x04, 0x06, 0x13, 0x02, 0x55, 0x53, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03,
595 0x55, 0x04, 0x08, 0x13, 0x02, 0x63, 0x61, 0x31, 0x11, 0x30, 0x0f, 0x06,
596 0x03, 0x55, 0x04, 0x07, 0x13, 0x08, 0x73, 0x61, 0x6e, 0x20, 0x6a, 0x6f,
597 0x73, 0x65, 0x31, 0x0d, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13,
598 0x04, 0x62, 0x72, 0x61, 0x64, 0x31, 0x27, 0x30, 0x25, 0x06, 0x03, 0x55,
599 0x04, 0x0b, 0x13, 0x1e, 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64,
600 0x20, 0x62, 0x79, 0x20, 0x45, 0x6c, 0x65, 0x6b, 0x74, 0x72, 0x6f, 0x6e,
601 0x20, 0x76, 0x32, 0x2e, 0x30, 0x2e, 0x31, 0x38, 0x35, 0x32, 0x31, 0x19,
602 0x30, 0x17, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x10, 0x62, 0x72, 0x61,
603 0x64, 0x20, 0x45, 0x6c, 0x65, 0x6b, 0x74, 0x72, 0x6f, 0x6e, 0x20, 0x43,
604 0x41, 0x30, 0x1e, 0x17, 0x0d, 0x30, 0x33, 0x31, 0x32, 0x32, 0x33, 0x31,
605 0x31, 0x34, 0x36, 0x30, 0x37, 0x5a, 0x17, 0x0d, 0x31, 0x33, 0x31, 0x32,
606 0x32, 0x32, 0x31, 0x31, 0x34, 0x36, 0x30, 0x37, 0x5a, 0x30, 0x81, 0x80,
607 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55,
608 0x53, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x08, 0x13, 0x02,
609 0x63, 0x61, 0x31, 0x11, 0x30, 0x0f, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13,
610 0x08, 0x73, 0x61, 0x6e, 0x20, 0x6a, 0x6f, 0x73, 0x65, 0x31, 0x0d, 0x30,
611 0x0b, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x04, 0x62, 0x72, 0x61, 0x64,
612 0x31, 0x27, 0x30, 0x25, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x13, 0x1e, 0x50,
613 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x45,
614 0x6c, 0x65, 0x6b, 0x74, 0x72, 0x6f, 0x6e, 0x20, 0x76, 0x32, 0x2e, 0x30,
615 0x2e, 0x31, 0x38, 0x35, 0x32, 0x31, 0x19, 0x30, 0x17, 0x06, 0x03, 0x55,
616 0x04, 0x03, 0x13, 0x10, 0x62, 0x72, 0x61, 0x64, 0x20, 0x45, 0x6c, 0x65,
617 0x6b, 0x74, 0x72, 0x6f, 0x6e, 0x20, 0x43, 0x41, 0x30, 0x81, 0x9f, 0x30,
618 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01,
619 0x05, 0x00, 0x03, 0x81, 0x8d, 0x00, 0x30, 0x81, 0x89, 0x02, 0x81, 0x81,
620 0x00, 0xe0, 0xab, 0x3a, 0x05, 0x8d, 0xed, 0x81, 0x73, 0xa8, 0x76, 0x9c,
621 0x14, 0x07, 0x50, 0x4b, 0x56, 0x8f, 0xfe, 0x88, 0xba, 0xec, 0xde, 0xab,
622 0x9a, 0x5d, 0x49, 0x23, 0x3b, 0x87, 0x4f, 0x50, 0x59, 0x8d, 0x0f, 0x78,
623 0xd0, 0x61, 0x98, 0x28, 0x9d, 0x1d, 0x39, 0xbf, 0x92, 0x62, 0xda, 0x21,
624 0xf7, 0xb1, 0x32, 0x6a, 0x5d, 0x73, 0x1c, 0x1d, 0x36, 0xba, 0xf7, 0x3c,
625 0xff, 0xda, 0xd9, 0xff, 0xf0, 0xbd, 0x62, 0x1d, 0xde, 0x6d, 0xc7, 0x76,
626 0x93, 0xdd, 0x3a, 0x90, 0x2b, 0x97, 0xab, 0x86, 0xea, 0x48, 0xb5, 0x70,
627 0xe7, 0xe1, 0xa2, 0x5c, 0x61, 0x1a, 0x7d, 0x48, 0x4d, 0x83, 0x42, 0x73,
628 0x70, 0xaf, 0x5d, 0xcf, 0x8c, 0x26, 0xb4, 0x83, 0xff, 0x77, 0xd5, 0x64,
629 0xe0, 0x14, 0x52, 0x20, 0xa2, 0xe9, 0xc5, 0x8c, 0x70, 0xb5, 0x6f, 0xf5,
630 0x6d, 0x31, 0x2b, 0xcb, 0x1d, 0xad, 0xf4, 0xb2, 0x27, 0x02, 0x03, 0x01,
631 0x00, 0x01, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d,
632 0x01, 0x01, 0x05, 0x05, 0x00, 0x03, 0x81, 0x81, 0x00, 0x74, 0x49, 0x79,
633 0x14, 0xc0, 0x68, 0xd7, 0x9d, 0xfd, 0x35, 0x6a, 0xda, 0xa0, 0x1d, 0x46,
634 0x0a, 0xc6, 0x1b, 0x51, 0x4b, 0xdf, 0x27, 0xd6, 0x14, 0x1a, 0xcf, 0xf1,
635 0xd0, 0xe2, 0x1b, 0x92, 0x39, 0x33, 0x98, 0x13, 0xc2, 0x6e, 0x97, 0xed,
636 0x2b, 0x1b, 0xfc, 0x28, 0x8a, 0x93, 0xf9, 0xe5, 0xe1, 0xf0, 0xbf, 0xf8,
637 0xa3, 0x5e, 0x08, 0x9c, 0x9f, 0x61, 0x7d, 0xb9, 0xe7, 0x14, 0x0e, 0x6d,
638 0x07, 0x3e, 0x35, 0x12, 0xd4, 0x98, 0x2e, 0x0a, 0x9c, 0x5c, 0xb9, 0xbf,
639 0x20, 0x29, 0x01, 0x55, 0x82, 0x86, 0xa7, 0xcb, 0x97, 0x8f, 0xbb, 0xd8,
640 0x2b, 0xbd, 0x40, 0xd3, 0x1a, 0xa7, 0xb1, 0x66, 0x5c, 0xe5, 0x9a, 0x7b,
641 0x39, 0xb7, 0x73, 0x49, 0x2c, 0x44, 0x8c, 0x79, 0x5b, 0xb5, 0x18, 0x41,
642 0xd0, 0xf1, 0x4b, 0x6d, 0xc5, 0x1a, 0xf8, 0x51, 0xea, 0x99, 0x0d, 0x85,
643 0x1b, 0xbe, 0x16, 0x56, 0x18
644 };
645
646 #if 0 // currently unused.
647 static unsigned int _elektron_v1_cert_der_len = 629;
648 #endif
649
650 static unsigned char _wapi_as_der[] = {
651 0x30, 0x82, 0x01, 0xb7, 0x30, 0x82, 0x01, 0x6c, 0xa0, 0x03, 0x02, 0x01,
652 0x02, 0x02, 0x01, 0x12, 0x30, 0x0c, 0x06, 0x08, 0x2a, 0x81, 0x1c, 0xd7,
653 0x63, 0x01, 0x01, 0x01, 0x05, 0x00, 0x30, 0x1d, 0x31, 0x0c, 0x30, 0x0a,
654 0x06, 0x03, 0x55, 0x04, 0x0b, 0x13, 0x03, 0x54, 0x4d, 0x43, 0x31, 0x0d,
655 0x30, 0x0b, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x04, 0x57, 0x41, 0x50,
656 0x49, 0x30, 0x1e, 0x17, 0x0d, 0x37, 0x30, 0x30, 0x31, 0x30, 0x31, 0x30,
657 0x30, 0x30, 0x30, 0x31, 0x38, 0x5a, 0x17, 0x0d, 0x39, 0x30, 0x30, 0x31,
658 0x30, 0x31, 0x30, 0x30, 0x30, 0x30, 0x31, 0x38, 0x5a, 0x30, 0x1d, 0x31,
659 0x0c, 0x30, 0x0a, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x13, 0x03, 0x54, 0x4d,
660 0x43, 0x31, 0x0d, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x04,
661 0x57, 0x41, 0x50, 0x49, 0x30, 0x4a, 0x30, 0x14, 0x06, 0x07, 0x2a, 0x86,
662 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x09, 0x2a, 0x81, 0x1c, 0xd7, 0x63,
663 0x01, 0x01, 0x02, 0x01, 0x03, 0x32, 0x00, 0x04, 0x74, 0xd9, 0x78, 0x91,
664 0xc4, 0xd3, 0xb5, 0x9e, 0xb0, 0xa9, 0x9e, 0xf1, 0x01, 0x5b, 0xd7, 0x7f,
665 0x79, 0x9a, 0x02, 0xe5, 0x87, 0x65, 0xa1, 0x0d, 0x04, 0xc9, 0x06, 0xdb,
666 0xf6, 0x12, 0x24, 0x05, 0x9d, 0x1c, 0x51, 0x00, 0x75, 0x58, 0x46, 0x11,
667 0xe3, 0xdc, 0x71, 0x02, 0x69, 0x43, 0x37, 0x61, 0xa3, 0x81, 0xa9, 0x30,
668 0x81, 0xa6, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04,
669 0x14, 0x08, 0xa9, 0x47, 0x65, 0xf2, 0x39, 0xa9, 0xe8, 0x8b, 0xd1, 0x75,
670 0x43, 0xce, 0x8c, 0x1c, 0xc0, 0xec, 0x99, 0xae, 0xad, 0x30, 0x45, 0x06,
671 0x03, 0x55, 0x1d, 0x23, 0x04, 0x3e, 0x30, 0x3c, 0x80, 0x14, 0x08, 0xa9,
672 0x47, 0x65, 0xf2, 0x39, 0xa9, 0xe8, 0x8b, 0xd1, 0x75, 0x43, 0xce, 0x8c,
673 0x1c, 0xc0, 0xec, 0x99, 0xae, 0xad, 0xa1, 0x21, 0xa4, 0x1f, 0x30, 0x1d,
674 0x31, 0x0c, 0x30, 0x0a, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x13, 0x03, 0x54,
675 0x4d, 0x43, 0x31, 0x0d, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13,
676 0x04, 0x57, 0x41, 0x50, 0x49, 0x82, 0x01, 0x12, 0x30, 0x31, 0x06, 0x03,
677 0x55, 0x1d, 0x1f, 0x04, 0x2a, 0x30, 0x28, 0x30, 0x26, 0xa0, 0x24, 0xa0,
678 0x22, 0x86, 0x20, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x31, 0x39,
679 0x32, 0x2e, 0x31, 0x36, 0x38, 0x2e, 0x31, 0x2e, 0x32, 0x30, 0x30, 0x3a,
680 0x38, 0x30, 0x38, 0x30, 0x2f, 0x61, 0x73, 0x2e, 0x63, 0x72, 0x6c, 0x30,
681 0x0b, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x04, 0x04, 0x03, 0x02, 0x07, 0x80,
682 0x30, 0x0c, 0x06, 0x08, 0x2a, 0x81, 0x1c, 0xd7, 0x63, 0x01, 0x01, 0x01,
683 0x05, 0x00, 0x03, 0x37, 0x00, 0x30, 0x34, 0x02, 0x18, 0x23, 0xc5, 0x39,
684 0xc9, 0x91, 0x89, 0x3d, 0xe5, 0xae, 0x95, 0x75, 0x88, 0x68, 0xf6, 0x11,
685 0x64, 0xb1, 0x71, 0xe7, 0x67, 0x1f, 0xa1, 0x58, 0x77, 0x02, 0x18, 0x15,
686 0xef, 0x5a, 0x62, 0x7f, 0x7d, 0x9d, 0x6e, 0x6d, 0x91, 0x2b, 0x61, 0x15,
687 0x4d, 0x5a, 0xbe, 0xc8, 0x8d, 0xdc, 0x85, 0x00, 0xa9, 0x7d, 0x99
688 };
689
690 #if 0 // currently unused.
691 static unsigned int _wapi_as_der_len = 443;
692 #endif
693
694 /* subject:/DC=com/DC=outsidevpntest/CN=Users/CN=certxauthsplit */
695 /* issuer :/DC=com/DC=outsidevpntest/CN=outsidevpntest-SERVER02-CA */
696 static uint8_t two_common_names[1427]={
697 0x30,0x82,0x05,0x8F,0x30,0x82,0x04,0x77,0xA0,0x03,0x02,0x01,0x02,0x02,0x0A,0x45,
698 0x0F,0xA6,0x09,0x00,0x00,0x00,0x00,0x00,0x16,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,
699 0x86,0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,0x30,0x5A,0x31,0x13,0x30,0x11,0x06,0x0A,
700 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x19,0x16,0x03,0x63,0x6F,0x6D,0x31,
701 0x1E,0x30,0x1C,0x06,0x0A,0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x19,0x16,
702 0x0E,0x6F,0x75,0x74,0x73,0x69,0x64,0x65,0x76,0x70,0x6E,0x74,0x65,0x73,0x74,0x31,
703 0x23,0x30,0x21,0x06,0x03,0x55,0x04,0x03,0x13,0x1A,0x6F,0x75,0x74,0x73,0x69,0x64,
704 0x65,0x76,0x70,0x6E,0x74,0x65,0x73,0x74,0x2D,0x53,0x45,0x52,0x56,0x45,0x52,0x30,
705 0x32,0x2D,0x43,0x41,0x30,0x1E,0x17,0x0D,0x31,0x32,0x30,0x39,0x30,0x36,0x30,0x33,
706 0x30,0x32,0x30,0x30,0x5A,0x17,0x0D,0x31,0x33,0x30,0x39,0x30,0x36,0x30,0x33,0x30,
707 0x32,0x30,0x30,0x5A,0x30,0x5E,0x31,0x13,0x30,0x11,0x06,0x0A,0x09,0x92,0x26,0x89,
708 0x93,0xF2,0x2C,0x64,0x01,0x19,0x16,0x03,0x63,0x6F,0x6D,0x31,0x1E,0x30,0x1C,0x06,
709 0x0A,0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x19,0x16,0x0E,0x6F,0x75,0x74,
710 0x73,0x69,0x64,0x65,0x76,0x70,0x6E,0x74,0x65,0x73,0x74,0x31,0x0E,0x30,0x0C,0x06,
711 0x03,0x55,0x04,0x03,0x13,0x05,0x55,0x73,0x65,0x72,0x73,0x31,0x17,0x30,0x15,0x06,
712 0x03,0x55,0x04,0x03,0x13,0x0E,0x63,0x65,0x72,0x74,0x78,0x61,0x75,0x74,0x68,0x73,
713 0x70,0x6C,0x69,0x74,0x30,0x81,0x9F,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,
714 0x0D,0x01,0x01,0x01,0x05,0x00,0x03,0x81,0x8D,0x00,0x30,0x81,0x89,0x02,0x81,0x81,
715 0x00,0xB9,0xC7,0x0A,0x4A,0x2D,0xA4,0xD4,0x8F,0x0A,0xC3,0x49,0xDC,0xA0,0xE2,0x36,
716 0x67,0x2E,0x0E,0xD2,0x02,0xA8,0x3B,0x23,0xDF,0xE4,0x67,0xCA,0x98,0xB9,0x37,0x10,
717 0xF9,0x7D,0x76,0x40,0x3F,0xED,0xBE,0x0E,0x8C,0x3B,0x1A,0x91,0x61,0x37,0x5B,0x8E,
718 0xDA,0xB5,0x98,0xD0,0x4A,0x2E,0x1B,0xB4,0xF8,0xBC,0xAB,0x5B,0x90,0xE7,0x46,0x3C,
719 0xDC,0x62,0x0F,0xD0,0x97,0x28,0x15,0x91,0x2F,0xD5,0x33,0x63,0xA5,0x4F,0xD2,0x84,
720 0x0D,0x7C,0xD0,0x8A,0x5B,0x20,0x23,0xF3,0xAA,0x1E,0xAC,0xB4,0x31,0xE3,0xAF,0x6C,
721 0x51,0xBE,0xC1,0xBE,0xCE,0x12,0x34,0x6E,0x6D,0x09,0xB3,0x9D,0x88,0x6D,0x35,0x37,
722 0xCB,0xDB,0x08,0xF3,0x55,0x98,0x62,0x75,0x93,0x6B,0x15,0xD0,0xF1,0xFC,0x59,0xB4,
723 0x37,0x02,0x03,0x01,0x00,0x01,0xA3,0x82,0x02,0xD5,0x30,0x82,0x02,0xD1,0x30,0x0E,
724 0x06,0x03,0x55,0x1D,0x0F,0x01,0x01,0xFF,0x04,0x04,0x03,0x02,0x05,0xA0,0x30,0x44,
725 0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x09,0x0F,0x04,0x37,0x30,0x35,0x30,
726 0x0E,0x06,0x08,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x03,0x02,0x02,0x02,0x00,0x80,0x30,
727 0x0E,0x06,0x08,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x03,0x04,0x02,0x02,0x00,0x80,0x30,
728 0x07,0x06,0x05,0x2B,0x0E,0x03,0x02,0x07,0x30,0x0A,0x06,0x08,0x2A,0x86,0x48,0x86,
729 0xF7,0x0D,0x03,0x07,0x30,0x1D,0x06,0x03,0x55,0x1D,0x0E,0x04,0x16,0x04,0x14,0xDD,
730 0x63,0xE5,0xA8,0xBE,0x94,0x8D,0x3B,0xCF,0xDB,0x51,0x4A,0xAB,0x63,0xDC,0x5A,0x30,
731 0x12,0x66,0x16,0x30,0x17,0x06,0x09,0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x14,0x02,
732 0x04,0x0A,0x1E,0x08,0x00,0x55,0x00,0x73,0x00,0x65,0x00,0x72,0x30,0x1F,0x06,0x03,
733 0x55,0x1D,0x23,0x04,0x18,0x30,0x16,0x80,0x14,0x13,0x9B,0xAB,0x61,0x39,0x5F,0x45,
734 0x84,0xDB,0x37,0x72,0xD7,0xAC,0x67,0x19,0x26,0xBD,0x85,0x33,0xC0,0x30,0x81,0xE0,
735 0x06,0x03,0x55,0x1D,0x1F,0x04,0x81,0xD8,0x30,0x81,0xD5,0x30,0x81,0xD2,0xA0,0x81,
736 0xCF,0xA0,0x81,0xCC,0x86,0x81,0xC9,0x6C,0x64,0x61,0x70,0x3A,0x2F,0x2F,0x2F,0x43,
737 0x4E,0x3D,0x6F,0x75,0x74,0x73,0x69,0x64,0x65,0x76,0x70,0x6E,0x74,0x65,0x73,0x74,
738 0x2D,0x53,0x45,0x52,0x56,0x45,0x52,0x30,0x32,0x2D,0x43,0x41,0x2C,0x43,0x4E,0x3D,
739 0x73,0x65,0x72,0x76,0x65,0x72,0x30,0x32,0x2C,0x43,0x4E,0x3D,0x43,0x44,0x50,0x2C,
740 0x43,0x4E,0x3D,0x50,0x75,0x62,0x6C,0x69,0x63,0x25,0x32,0x30,0x4B,0x65,0x79,0x25,
741 0x32,0x30,0x53,0x65,0x72,0x76,0x69,0x63,0x65,0x73,0x2C,0x43,0x4E,0x3D,0x53,0x65,
742 0x72,0x76,0x69,0x63,0x65,0x73,0x2C,0x43,0x4E,0x3D,0x43,0x6F,0x6E,0x66,0x69,0x67,
743 0x75,0x72,0x61,0x74,0x69,0x6F,0x6E,0x2C,0x44,0x43,0x3D,0x6F,0x75,0x74,0x73,0x69,
744 0x64,0x65,0x76,0x70,0x6E,0x74,0x65,0x73,0x74,0x2C,0x44,0x43,0x3D,0x63,0x6F,0x6D,
745 0x3F,0x63,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x65,0x52,0x65,0x76,0x6F,
746 0x63,0x61,0x74,0x69,0x6F,0x6E,0x4C,0x69,0x73,0x74,0x3F,0x62,0x61,0x73,0x65,0x3F,
747 0x6F,0x62,0x6A,0x65,0x63,0x74,0x43,0x6C,0x61,0x73,0x73,0x3D,0x63,0x52,0x4C,0x44,
748 0x69,0x73,0x74,0x72,0x69,0x62,0x75,0x74,0x69,0x6F,0x6E,0x50,0x6F,0x69,0x6E,0x74,
749 0x30,0x81,0xD3,0x06,0x08,0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x01,0x04,0x81,0xC6,
750 0x30,0x81,0xC3,0x30,0x81,0xC0,0x06,0x08,0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x02,
751 0x86,0x81,0xB3,0x6C,0x64,0x61,0x70,0x3A,0x2F,0x2F,0x2F,0x43,0x4E,0x3D,0x6F,0x75,
752 0x74,0x73,0x69,0x64,0x65,0x76,0x70,0x6E,0x74,0x65,0x73,0x74,0x2D,0x53,0x45,0x52,
753 0x56,0x45,0x52,0x30,0x32,0x2D,0x43,0x41,0x2C,0x43,0x4E,0x3D,0x41,0x49,0x41,0x2C,
754 0x43,0x4E,0x3D,0x50,0x75,0x62,0x6C,0x69,0x63,0x25,0x32,0x30,0x4B,0x65,0x79,0x25,
755 0x32,0x30,0x53,0x65,0x72,0x76,0x69,0x63,0x65,0x73,0x2C,0x43,0x4E,0x3D,0x53,0x65,
756 0x72,0x76,0x69,0x63,0x65,0x73,0x2C,0x43,0x4E,0x3D,0x43,0x6F,0x6E,0x66,0x69,0x67,
757 0x75,0x72,0x61,0x74,0x69,0x6F,0x6E,0x2C,0x44,0x43,0x3D,0x6F,0x75,0x74,0x73,0x69,
758 0x64,0x65,0x76,0x70,0x6E,0x74,0x65,0x73,0x74,0x2C,0x44,0x43,0x3D,0x63,0x6F,0x6D,
759 0x3F,0x63,0x41,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x65,0x3F,0x62,
760 0x61,0x73,0x65,0x3F,0x6F,0x62,0x6A,0x65,0x63,0x74,0x43,0x6C,0x61,0x73,0x73,0x3D,
761 0x63,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6F,0x6E,0x41,0x75,0x74,
762 0x68,0x6F,0x72,0x69,0x74,0x79,0x30,0x29,0x06,0x03,0x55,0x1D,0x25,0x04,0x22,0x30,
763 0x20,0x06,0x0A,0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x0A,0x03,0x04,0x06,0x08,0x2B,
764 0x06,0x01,0x05,0x05,0x07,0x03,0x04,0x06,0x08,0x2B,0x06,0x01,0x05,0x05,0x07,0x03,
765 0x02,0x30,0x3C,0x06,0x03,0x55,0x1D,0x11,0x04,0x35,0x30,0x33,0xA0,0x31,0x06,0x0A,
766 0x2B,0x06,0x01,0x04,0x01,0x82,0x37,0x14,0x02,0x03,0xA0,0x23,0x0C,0x21,0x63,0x65,
767 0x72,0x74,0x78,0x61,0x75,0x74,0x68,0x73,0x70,0x6C,0x69,0x74,0x40,0x6F,0x75,0x74,
768 0x73,0x69,0x64,0x65,0x76,0x70,0x6E,0x74,0x65,0x73,0x74,0x2E,0x63,0x6F,0x6D,0x30,
769 0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x05,0x05,0x00,0x03,0x82,
770 0x01,0x01,0x00,0x98,0xD5,0x24,0x83,0x28,0xC0,0xB5,0xE2,0xF9,0x22,0xE6,0xED,0x9C,
771 0xC8,0xFB,0x07,0xB0,0x23,0x16,0xD0,0x62,0x32,0xF4,0xCC,0x71,0x00,0x31,0x48,0x8A,
772 0x5D,0xFA,0xDC,0x80,0x49,0x35,0x38,0x16,0x81,0xA8,0xA8,0x01,0x69,0xC1,0x64,0xD9,
773 0x64,0x72,0xC4,0xB3,0x24,0x02,0x7C,0xB8,0xD9,0x92,0xAA,0x28,0xB0,0x87,0x63,0x73,
774 0x21,0xD7,0x4D,0x68,0x2D,0x99,0xF5,0x9B,0x10,0xD1,0x6B,0xF3,0xF8,0x1B,0x7B,0x73,
775 0x2E,0x06,0xF1,0x17,0xCA,0xEE,0xAA,0xD7,0x6B,0x14,0x72,0x2E,0xA5,0x3C,0xC3,0x4A,
776 0xFA,0x1C,0x28,0x72,0x16,0x08,0x33,0xF7,0x94,0xA1,0x30,0x94,0x37,0xF0,0xB3,0xAF,
777 0xA5,0x49,0xD1,0x87,0xEB,0xD7,0xA0,0x3F,0xA7,0xDA,0x4D,0x70,0xFD,0xA9,0x53,0x82,
778 0x1B,0xA7,0x6A,0xC8,0x3A,0x9D,0x9C,0x09,0x4D,0xD5,0xB1,0x71,0xFC,0xC4,0xC6,0x9D,
779 0x9F,0xC5,0x16,0x13,0x7F,0x53,0x7C,0x5E,0x83,0xB0,0x8F,0xFA,0x24,0x9F,0xD3,0x2A,
780 0x64,0x7E,0xA2,0x98,0x30,0x5B,0x7F,0x41,0x6C,0xE3,0xD4,0xE8,0x1E,0x18,0x2A,0x83,
781 0x05,0x0F,0x0C,0x6A,0xF6,0x03,0xEB,0xF9,0x77,0x67,0xB9,0x4C,0xF7,0x98,0x45,0xC6,
782 0x52,0x7E,0xF0,0xFA,0xAD,0x96,0xCC,0xA3,0x19,0xA7,0xF5,0x06,0x35,0x28,0x5E,0xE4,
783 0xAC,0x8E,0x06,0x32,0xCC,0xEB,0xA6,0x0C,0x39,0xD3,0xF8,0xCF,0xA5,0xEC,0x87,0x74,
784 0x58,0xFA,0xBE,0xB7,0x89,0xA3,0x4A,0xD6,0x62,0x9D,0x3E,0x37,0x5E,0x1E,0xC1,0x9F,
785 0xBC,0xE0,0xF7,0x86,0xE2,0x6D,0xFF,0x71,0x9B,0x93,0xA8,0xEE,0xD8,0xA0,0x8C,0x1B,
786 0x99,0x58,0xFC,
787 };
788
789 /* Test basic add delete update copy matching stuff. */
790 static void tests(void)
791 {
792 SecCertificateRef cert0, cert1, cert2, cert3, cert4, cert5, cert6;
793 isnt(cert0 = SecCertificateCreateWithBytes(NULL, _c0, sizeof(_c0)),
794 NULL, "create cert0");
795 isnt(cert1 = SecCertificateCreateWithBytes(NULL, _c1, sizeof(_c1)),
796 NULL, "create cert1");
797
798 CFDataRef cert2Data = CFDataCreateWithBytesNoCopy(kCFAllocatorDefault,
799 _c2, sizeof(_c2), kCFAllocatorNull);
800 isnt(cert2 = SecCertificateCreateWithData(kCFAllocatorDefault, cert2Data),
801 NULL, "create cert2");
802 CFReleaseNull(cert2Data);
803
804 isnt(cert3 = SecCertificateCreateWithBytes(NULL, _phased_c3, sizeof(_phased_c3)),
805 NULL, "create cert3");
806
807 CFDataRef cert4data = CFDataCreateWithBytesNoCopy(kCFAllocatorDefault,
808 pem, sizeof(pem), kCFAllocatorNull);
809 ok(cert4 = SecCertificateCreateWithPEM(NULL, cert4data), "create cert from pem");
810 CFReleaseNull(cert4data);
811
812 isnt(cert5 = SecCertificateCreateWithBytes(NULL, _elektron_v1_cert_der,
813 sizeof(_elektron_v1_cert_der)), NULL, "create cert5");
814
815 isnt(cert6 = SecCertificateCreateWithBytes(NULL, _wapi_as_der,
816 sizeof(_wapi_as_der)), NULL, "create cert6");
817
818 if (!cert0 || !cert1 || !cert2 || !cert3 || !cert4 || !cert5 || !cert6) {
819 goto errOut;
820 }
821
822 ok(SecCertificateIsSelfSignedCA(cert0), "cert0 is CA");
823 ok(!SecCertificateIsSelfSignedCA(cert1), "cert1 is not CA");
824 ok(SecCertificateIsSelfSignedCA(cert5), "cert5 is v1 CA");
825
826 CFStringRef subjectSummary, issuerSummary;
827 isnt(subjectSummary = SecCertificateCopySubjectSummary(cert1), NULL,
828 "cert1 has a subject summary");
829 isnt(issuerSummary = SecCertificateCopyIssuerSummary(cert1), NULL,
830 "cert1 has an issuer summary");
831
832 ok(subjectSummary && CFEqual(subjectSummary, CFSTR("www.verisign.com/CPS Incorp.by Ref. LIABILITY LTD.(c)97 VeriSign, VeriSign International Server CA - Class 3, VeriSign, Inc.")),
833 "subject summary is \"www.verisign.com/CPS Incorp.by Ref. LIABILITY LTD.(c)97 VeriSign, VeriSign International Server CA - Class 3, VeriSign, Inc.\"");
834 ok(issuerSummary && CFEqual(issuerSummary,
835 CFSTR("Class 3 Public Primary Certification Authority")),
836 "issuer summary is \"Class 3 Public Primary Certification Authority\"");
837
838 CFArrayRef ntPrincipalNames;
839 ok(ntPrincipalNames = SecCertificateCopyNTPrincipalNames(cert2),
840 "SecCertificateCopyNTPrincipalNames");
841 is(CFArrayGetCount(ntPrincipalNames), 1, "we got 1 princialname back");
842 CFStringRef principal = (CFStringRef)CFArrayGetValueAtIndex(ntPrincipalNames, 0);
843 ok(CFEqual(principal, CFSTR("kmm6b@Virginia.EDU")),
844 "first principal is kmm6b@Virginia.EDU");
845 CFReleaseSafe(ntPrincipalNames);
846
847 CFReleaseSafe(subjectSummary);
848 CFReleaseSafe(issuerSummary);
849
850 isnt(subjectSummary = SecCertificateCopySubjectSummary(cert3), NULL,
851 "cert3 has a subject summary");
852 /* @@@ this causes a double free without an extra retain in obtainSummaryFromX501Name():
853 summary->description = string = copyDERThingDescription(kCFAllocatorDefault, value, true); */
854 CFReleaseSafe(subjectSummary);
855
856 isnt(subjectSummary = SecCertificateCopySubjectSummary(cert4), NULL,
857 "cert4 has a subject summary");
858 ok(subjectSummary && CFEqual(subjectSummary, CFSTR("S5L8900 Secure Boot")),
859 "cert4 is S5L8900 Secure Boot");
860 CFReleaseSafe(subjectSummary);
861
862 CFStringRef desc = NULL;
863 ok(desc = CFCopyDescription(cert4), "cert4 CFCopyDescription works");
864 CFReleaseNull(desc);
865
866 CFDataRef spki1Hash = SecCertificateCopySubjectPublicKeyInfoSHA1Digest(cert0);
867 isnt(spki1Hash, NULL, "cert0 has a SHA-1 subject public key info hash");
868 CFReleaseSafe(spki1Hash);
869
870 CFDataRef spki2Hash = SecCertificateCopySubjectPublicKeyInfoSHA256Digest(cert0);
871 isnt(spki2Hash, NULL, "cert0 has a SHA-256 subject public key info hash");
872 CFReleaseSafe(spki2Hash);
873
874 errOut:
875 CFReleaseSafe(cert0);
876 CFReleaseSafe(cert1);
877 CFReleaseSafe(cert2);
878 CFReleaseSafe(cert3);
879 CFReleaseSafe(cert4);
880 CFReleaseSafe(cert5);
881 CFReleaseSafe(cert6);
882 }
883
884 static void test_common_name(void) {
885 SecCertificateRef cert = NULL;
886 CFStringRef commonName = NULL;
887
888 require(cert = SecCertificateCreateWithBytes(NULL, two_common_names, sizeof(two_common_names)), errOut);
889 require_noerr(SecCertificateCopyCommonName(cert, &commonName), errOut);
890 is(CFStringCompare(commonName, CFSTR("certxauthsplit"), 0), kCFCompareEqualTo, "copy common name got the wrong name");
891
892 errOut:
893 CFReleaseSafe(commonName);
894 CFReleaseSafe(cert);
895 }
896
897 const uint8_t mail_google_com [] = {
898 0x30, 0x82, 0x03, 0x22, 0x30, 0x82, 0x02, 0x8b, 0xa0, 0x03, 0x02, 0x01,
899 0x02, 0x02, 0x10, 0x2b, 0x9f, 0x7e, 0xe5, 0xca, 0x25, 0xa6, 0x25, 0x14,
900 0x20, 0x47, 0x82, 0x75, 0x3a, 0x9b, 0xb9, 0x30, 0x0d, 0x06, 0x09, 0x2a,
901 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x05, 0x05, 0x00, 0x30, 0x4c,
902 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x5a,
903 0x41, 0x31, 0x25, 0x30, 0x23, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x1c,
904 0x54, 0x68, 0x61, 0x77, 0x74, 0x65, 0x20, 0x43, 0x6f, 0x6e, 0x73, 0x75,
905 0x6c, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x28, 0x50, 0x74, 0x79, 0x29, 0x20,
906 0x4c, 0x74, 0x64, 0x2e, 0x31, 0x16, 0x30, 0x14, 0x06, 0x03, 0x55, 0x04,
907 0x03, 0x13, 0x0d, 0x54, 0x68, 0x61, 0x77, 0x74, 0x65, 0x20, 0x53, 0x47,
908 0x43, 0x20, 0x43, 0x41, 0x30, 0x1e, 0x17, 0x0d, 0x31, 0x31, 0x31, 0x30,
909 0x32, 0x36, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x17, 0x0d, 0x31,
910 0x33, 0x30, 0x39, 0x33, 0x30, 0x32, 0x33, 0x35, 0x39, 0x35, 0x39, 0x5a,
911 0x30, 0x69, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13,
912 0x02, 0x55, 0x53, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x08,
913 0x13, 0x0a, 0x43, 0x61, 0x6c, 0x69, 0x66, 0x6f, 0x72, 0x6e, 0x69, 0x61,
914 0x31, 0x16, 0x30, 0x14, 0x06, 0x03, 0x55, 0x04, 0x07, 0x14, 0x0d, 0x4d,
915 0x6f, 0x75, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x56, 0x69, 0x65, 0x77,
916 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x14, 0x0a, 0x47,
917 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x49, 0x6e, 0x63, 0x31, 0x18, 0x30,
918 0x16, 0x06, 0x03, 0x55, 0x04, 0x03, 0x14, 0x0f, 0x6d, 0x61, 0x69, 0x6c,
919 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x30,
920 0x81, 0x9f, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d,
921 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x81, 0x8d, 0x00, 0x30, 0x81, 0x89,
922 0x02, 0x81, 0x81, 0x00, 0xaf, 0x39, 0x15, 0x98, 0x68, 0xe4, 0x92, 0xfe,
923 0x4f, 0x4f, 0xf1, 0xbb, 0xff, 0x0d, 0x2e, 0xb0, 0xfe, 0x25, 0xaa, 0xbd,
924 0x68, 0x04, 0x67, 0x27, 0xea, 0x6c, 0x43, 0x4c, 0xa7, 0x6d, 0xcb, 0xc8,
925 0x8f, 0x7e, 0x81, 0xee, 0x87, 0x26, 0x25, 0x10, 0x12, 0x54, 0x33, 0x9e,
926 0xaa, 0x3d, 0x9b, 0x8f, 0x8e, 0x92, 0xb3, 0x4b, 0x01, 0xe3, 0xf9, 0x4a,
927 0x29, 0xc3, 0x0f, 0xfd, 0xac, 0xb7, 0xd3, 0x4c, 0x97, 0x29, 0x3f, 0x69,
928 0x55, 0xcf, 0x70, 0x83, 0x04, 0xaf, 0x2e, 0x04, 0x6e, 0x74, 0xd6, 0x0f,
929 0x17, 0x09, 0xfe, 0x9e, 0x20, 0x24, 0x24, 0xe3, 0xc7, 0x68, 0x9c, 0xac,
930 0x11, 0xbd, 0x92, 0xe4, 0xb2, 0x1b, 0x09, 0xf2, 0x02, 0x32, 0xbb, 0x55,
931 0x1b, 0x2d, 0x16, 0x5f, 0x30, 0x12, 0x23, 0xe2, 0x4c, 0x4a, 0x8d, 0xc2,
932 0xda, 0x3f, 0xe1, 0xb8, 0xbf, 0xf7, 0x3a, 0xb1, 0x86, 0xbe, 0xf0, 0xc5,
933 0x02, 0x03, 0x01, 0x00, 0x01, 0xa3, 0x81, 0xe7, 0x30, 0x81, 0xe4, 0x30,
934 0x0c, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x02, 0x30,
935 0x00, 0x30, 0x36, 0x06, 0x03, 0x55, 0x1d, 0x1f, 0x04, 0x2f, 0x30, 0x2d,
936 0x30, 0x2b, 0xa0, 0x29, 0xa0, 0x27, 0x86, 0x25, 0x68, 0x74, 0x74, 0x70,
937 0x3a, 0x2f, 0x2f, 0x63, 0x72, 0x6c, 0x2e, 0x74, 0x68, 0x61, 0x77, 0x74,
938 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x68, 0x61, 0x77, 0x74, 0x65,
939 0x53, 0x47, 0x43, 0x43, 0x41, 0x2e, 0x63, 0x72, 0x6c, 0x30, 0x28, 0x06,
940 0x03, 0x55, 0x1d, 0x25, 0x04, 0x21, 0x30, 0x1f, 0x06, 0x08, 0x2b, 0x06,
941 0x01, 0x05, 0x05, 0x07, 0x03, 0x01, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05,
942 0x05, 0x07, 0x03, 0x02, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x86, 0xf8,
943 0x42, 0x04, 0x01, 0x30, 0x72, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05,
944 0x07, 0x01, 0x01, 0x04, 0x66, 0x30, 0x64, 0x30, 0x22, 0x06, 0x08, 0x2b,
945 0x06, 0x01, 0x05, 0x05, 0x07, 0x30, 0x01, 0x86, 0x16, 0x68, 0x74, 0x74,
946 0x70, 0x3a, 0x2f, 0x2f, 0x6f, 0x63, 0x73, 0x70, 0x2e, 0x74, 0x68, 0x61,
947 0x77, 0x74, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x30, 0x3e, 0x06, 0x08, 0x2b,
948 0x06, 0x01, 0x05, 0x05, 0x07, 0x30, 0x02, 0x86, 0x32, 0x68, 0x74, 0x74,
949 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x74, 0x68, 0x61, 0x77,
950 0x74, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73,
951 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x54, 0x68, 0x61, 0x77, 0x74, 0x65,
952 0x5f, 0x53, 0x47, 0x43, 0x5f, 0x43, 0x41, 0x2e, 0x63, 0x72, 0x74, 0x30,
953 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x05,
954 0x05, 0x00, 0x03, 0x81, 0x81, 0x00, 0x35, 0x80, 0x11, 0xcd, 0x52, 0x3e,
955 0x84, 0x29, 0xfb, 0xc1, 0x28, 0xe1, 0x20, 0xe5, 0x02, 0x8f, 0x5f, 0x71,
956 0x65, 0x58, 0x1d, 0x62, 0x72, 0x57, 0x3c, 0xe6, 0x5e, 0x25, 0x61, 0xd3,
957 0xcb, 0xad, 0x22, 0xf8, 0xd8, 0x81, 0xa4, 0xe7, 0xf4, 0xae, 0x7c, 0xd9,
958 0xc1, 0x6d, 0xaa, 0x93, 0x0d, 0x62, 0x07, 0x9f, 0xf2, 0x67, 0x47, 0x99,
959 0x34, 0x33, 0x4f, 0x3d, 0x02, 0x74, 0xf4, 0x81, 0xd6, 0x38, 0x08, 0x21,
960 0xe8, 0xe2, 0xa1, 0xfa, 0x05, 0x41, 0x9c, 0x9c, 0xc9, 0xf9, 0xf3, 0xc8,
961 0xa3, 0xee, 0x0d, 0xa5, 0xd7, 0x50, 0x54, 0x5e, 0x2f, 0x7d, 0x79, 0xb7,
962 0x7e, 0x0a, 0x7c, 0xb6, 0xe2, 0x2c, 0xa8, 0xae, 0xfe, 0x94, 0xd7, 0xcd,
963 0x16, 0x30, 0x71, 0x04, 0xaa, 0x9e, 0x79, 0xc3, 0xd2, 0xb6, 0x24, 0xa7,
964 0x25, 0xab, 0xf0, 0x48, 0x8e, 0x2f, 0xc3, 0xa7, 0xbb, 0x50, 0xdd, 0x0f,
965 0xcf, 0xb0, };
966
967 static void test_copy_email_addresses(void) {
968 SecCertificateRef cert = SecCertificateCreateWithBytes(NULL, mail_google_com, sizeof (mail_google_com));
969 CFArrayRef array = NULL;
970 CFStringRef name = NULL;
971
972 ok_status(SecCertificateCopyCommonName(cert, &name), "Failed to get common name from cert");
973 ok(name, "Failed to get common name");
974 ok(CFEqual(name, CFSTR("mail.google.com")), "Got wrong common name");
975
976 ok_status(SecCertificateCopyEmailAddresses (cert, &array), "Failed to get email addresses from cert");
977 ok(array, "Failed to get email address array");
978 is(CFArrayGetCount(array), 0, "Found unexpected email addresses");
979
980 CFReleaseNull(cert);
981 CFReleaseNull(name);
982 CFReleaseNull(array);
983 }
984
985 static void test_copy_extension_value(void) {
986 SecCertificateRef cert = SecCertificateCreateWithBytes(NULL, mail_google_com, sizeof(mail_google_com));
987 CFDataRef extension = NULL, expected = NULL, oid = NULL;
988 bool critical = false;
989
990 /* parameter fails */
991 is(extension = SecCertificateCopyExtensionValue(NULL, CFSTR("1.2.3.4"), &critical), NULL,
992 "NULL cert input succeeded");
993 is(extension = SecCertificateCopyExtensionValue(cert, NULL, &critical), NULL,
994 "NULL OID input succeeded");
995
996 /* Extension not present */
997 is(extension = SecCertificateCopyExtensionValue(cert, CFSTR("1.2.3.4"), &critical), NULL,
998 "Got extension value for non-present extension OID");
999
1000 /* Using decimal OID, extension present and critical */
1001 isnt(extension = SecCertificateCopyExtensionValue(cert, CFSTR("2.5.29.19"), &critical), NULL,
1002 "Failed to get extension for present extension OID");
1003 is(critical, true, "Got wrong criticality for critical extension");
1004 uint8_t basic_constraints_value[2] = { 0x30, 0x00 };
1005 expected = CFDataCreate(NULL, basic_constraints_value, sizeof(basic_constraints_value));
1006 ok(CFEqual(extension, expected), "Got wrong extension value for basic constraints");
1007 CFReleaseNull(extension);
1008 CFReleaseNull(expected);
1009
1010 /* Using binary OID, extension present and non critical */
1011 uint8_t oidExtendedKeyUsage[3] = { 0x55, 0x01d, 0x25 };
1012 oid = CFDataCreate(NULL, oidExtendedKeyUsage, sizeof(oidExtendedKeyUsage));
1013 isnt(extension = SecCertificateCopyExtensionValue(cert, oid, &critical), NULL,
1014 "Failed to get extension for present extension OID");
1015 is(critical, false, "Got wrong criticality for non-critical extension");
1016 uint8_t eku_value[] = {
1017 0x30, 0x1f, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x03, 0x01, 0x06, 0x08, 0x2b, 0x06,
1018 0x01, 0x05, 0x05, 0x07, 0x03, 0x02, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x86, 0xf8, 0x42, 0x04,
1019 0x01
1020 };
1021 expected = CFDataCreate(NULL, eku_value, sizeof(eku_value));
1022 ok(CFEqual(extension, expected), "Got wrong extension value for extended key usage");
1023 CFReleaseNull(oid);
1024 CFReleaseNull(extension);
1025 CFReleaseNull(expected);
1026
1027 /* No critical output */
1028 isnt(extension = SecCertificateCopyExtensionValue(cert, CFSTR("2.5.29.19"), NULL), NULL,
1029 "Failed to get extension for present extension OID");
1030 CFReleaseNull(extension);
1031
1032 /* messed up binary OIDs */
1033 is(extension = SecCertificateCopyExtensionValue(cert, CFSTR("abcd"), NULL), NULL,
1034 "letters in OID");
1035 is(extension = SecCertificateCopyExtensionValue(cert, CFSTR("8.1.1.2"), NULL), NULL,
1036 "bad first arc");
1037 is(extension = SecCertificateCopyExtensionValue(cert, CFSTR("10.1.1.1"), NULL), NULL,
1038 "longer bad first arc");
1039 is(extension = SecCertificateCopyExtensionValue(cert, CFSTR(""), NULL), NULL,
1040 "empty string");
1041 is(extension = SecCertificateCopyExtensionValue(cert, CFSTR("1.2.1099511627776."), NULL), NULL,
1042 "six byte component");
1043
1044 CFReleaseNull(cert);
1045 }
1046
1047 /* subject:/UID=372S63A2R8/CN=Developer ID Application: John Brayton/OU=372S63A2R8/O=John Brayton/C=US */
1048 /* issuer :/CN=Developer ID Certification Authority/OU=Apple Certification Authority/O=Apple Inc./C=US */
1049 const uint8_t _old_developer_cert[] = {
1050 0x30,0x82,0x05,0x65,0x30,0x82,0x04,0x4D,0xA0,0x03,0x02,0x01,0x02,0x02,0x08,0x3B,
1051 0x8B,0xC9,0x83,0xCC,0x57,0x54,0x95,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,
1052 0x0D,0x01,0x01,0x0B,0x05,0x00,0x30,0x79,0x31,0x2D,0x30,0x2B,0x06,0x03,0x55,0x04,
1053 0x03,0x0C,0x24,0x44,0x65,0x76,0x65,0x6C,0x6F,0x70,0x65,0x72,0x20,0x49,0x44,0x20,
1054 0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6F,0x6E,0x20,0x41,0x75,
1055 0x74,0x68,0x6F,0x72,0x69,0x74,0x79,0x31,0x26,0x30,0x24,0x06,0x03,0x55,0x04,0x0B,
1056 0x0C,0x1D,0x41,0x70,0x70,0x6C,0x65,0x20,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,
1057 0x61,0x74,0x69,0x6F,0x6E,0x20,0x41,0x75,0x74,0x68,0x6F,0x72,0x69,0x74,0x79,0x31,
1058 0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x0A,0x0C,0x0A,0x41,0x70,0x70,0x6C,0x65,0x20,
1059 0x49,0x6E,0x63,0x2E,0x31,0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,
1060 0x53,0x30,0x1E,0x17,0x0D,0x31,0x32,0x30,0x34,0x32,0x31,0x31,0x39,0x33,0x39,0x33,
1061 0x30,0x5A,0x17,0x0D,0x31,0x37,0x30,0x34,0x32,0x32,0x31,0x39,0x33,0x39,0x33,0x30,
1062 0x5A,0x30,0x81,0x86,0x31,0x1A,0x30,0x18,0x06,0x0A,0x09,0x92,0x26,0x89,0x93,0xF2,
1063 0x2C,0x64,0x01,0x01,0x0C,0x0A,0x33,0x37,0x32,0x53,0x36,0x33,0x41,0x32,0x52,0x38,
1064 0x31,0x2F,0x30,0x2D,0x06,0x03,0x55,0x04,0x03,0x0C,0x26,0x44,0x65,0x76,0x65,0x6C,
1065 0x6F,0x70,0x65,0x72,0x20,0x49,0x44,0x20,0x41,0x70,0x70,0x6C,0x69,0x63,0x61,0x74,
1066 0x69,0x6F,0x6E,0x3A,0x20,0x4A,0x6F,0x68,0x6E,0x20,0x42,0x72,0x61,0x79,0x74,0x6F,
1067 0x6E,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x0B,0x0C,0x0A,0x33,0x37,0x32,0x53,
1068 0x36,0x33,0x41,0x32,0x52,0x38,0x31,0x15,0x30,0x13,0x06,0x03,0x55,0x04,0x0A,0x0C,
1069 0x0C,0x4A,0x6F,0x68,0x6E,0x20,0x42,0x72,0x61,0x79,0x74,0x6F,0x6E,0x31,0x0B,0x30,
1070 0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x30,0x82,0x01,0x22,0x30,0x0D,
1071 0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x01,0x05,0x00,0x03,0x82,0x01,
1072 0x0F,0x00,0x30,0x82,0x01,0x0A,0x02,0x82,0x01,0x01,0x00,0xDE,0x02,0xD5,0xBC,0x79,
1073 0x03,0x44,0x44,0xA0,0xCC,0x53,0xB9,0x4D,0xF6,0xF7,0x59,0xCF,0xA4,0x71,0x8A,0x20,
1074 0x72,0xA2,0x60,0xEA,0x45,0x26,0x52,0x39,0xA7,0xBD,0xFF,0x0A,0x45,0x0E,0xA2,0xE4,
1075 0x42,0x8C,0x0D,0x4B,0xF5,0x96,0x73,0xB3,0x56,0x0E,0xAA,0x2B,0x3F,0xBB,0x69,0x93,
1076 0xD5,0xC1,0x20,0xF2,0x40,0x38,0xB6,0x6C,0xB1,0xA0,0x4C,0x1B,0xA6,0xF1,0xE5,0x34,
1077 0xD4,0xD8,0xB0,0xF0,0x34,0x8C,0x2B,0xA4,0xBF,0x1E,0x8F,0x64,0xF0,0x25,0x9F,0x5D,
1078 0x65,0x1E,0x61,0xBA,0x63,0x68,0x16,0x67,0xDE,0x0B,0x76,0x25,0xFD,0xAF,0xB3,0xBF,
1079 0x1D,0xEA,0x82,0x85,0xE5,0x80,0xC7,0x62,0x1B,0x17,0xB3,0x5E,0x56,0xEA,0xD4,0x39,
1080 0x9C,0xA7,0x39,0x9B,0x1F,0xAD,0xD7,0xE1,0x7D,0x71,0x48,0xE5,0x19,0x53,0x98,0x6A,
1081 0x01,0x14,0x21,0x53,0xE4,0x69,0x69,0x3F,0xF3,0xC0,0x6C,0x2D,0x82,0x78,0x63,0x4E,
1082 0xAA,0xE4,0x0C,0xEF,0xC3,0x99,0x53,0xCA,0x1A,0x08,0xF4,0x95,0x48,0x23,0x8F,0xC9,
1083 0x13,0xCA,0xA7,0x0C,0xDC,0xB8,0x34,0x67,0x46,0x68,0x72,0x04,0x7E,0x17,0xC1,0x73,
1084 0x38,0x21,0xB8,0x52,0x35,0x3F,0x15,0x4D,0x60,0x82,0x63,0xEE,0x37,0xCC,0xF6,0x1F,
1085 0xF8,0xBC,0xA3,0xF6,0x1F,0xE1,0x9F,0x45,0xFA,0x5A,0xF6,0xC1,0x06,0x16,0xF8,0x03,
1086 0x84,0x7E,0x2F,0xE3,0x0D,0xEC,0x3E,0x05,0xF5,0xC0,0x0C,0x57,0x84,0x4C,0xCB,0x25,
1087 0x81,0x4C,0x59,0x2C,0xDC,0x63,0xA7,0xA0,0xA6,0x6C,0xC3,0xDC,0x7F,0x1E,0xAA,0x1E,
1088 0xD8,0x31,0x7D,0x08,0x8C,0x2F,0x85,0xB9,0x09,0xFF,0xD9,0x02,0x03,0x01,0x00,0x01,
1089 0xA3,0x82,0x01,0xE1,0x30,0x82,0x01,0xDD,0x30,0x3E,0x06,0x08,0x2B,0x06,0x01,0x05,
1090 0x05,0x07,0x01,0x01,0x04,0x32,0x30,0x30,0x30,0x2E,0x06,0x08,0x2B,0x06,0x01,0x05,
1091 0x05,0x07,0x30,0x01,0x86,0x22,0x68,0x74,0x74,0x70,0x3A,0x2F,0x2F,0x6F,0x63,0x73,
1092 0x70,0x2E,0x61,0x70,0x70,0x6C,0x65,0x2E,0x63,0x6F,0x6D,0x2F,0x6F,0x63,0x73,0x70,
1093 0x2D,0x64,0x65,0x76,0x69,0x64,0x30,0x31,0x30,0x1D,0x06,0x03,0x55,0x1D,0x0E,0x04,
1094 0x16,0x04,0x14,0xB1,0x95,0xE5,0x40,0x5D,0xE0,0x7B,0x76,0xF6,0x2B,0xD4,0x5B,0x16,
1095 0x6F,0x90,0x52,0x43,0x9C,0x8E,0xEA,0x30,0x0C,0x06,0x03,0x55,0x1D,0x13,0x01,0x01,
1096 0xFF,0x04,0x02,0x30,0x00,0x30,0x1F,0x06,0x03,0x55,0x1D,0x23,0x04,0x18,0x30,0x16,
1097 0x80,0x14,0x57,0x17,0xED,0xA2,0xCF,0xDC,0x7C,0x98,0xA1,0x10,0xE0,0xFC,0xBE,0x87,
1098 0x2D,0x2C,0xF2,0xE3,0x17,0x54,0x30,0x82,0x01,0x0E,0x06,0x03,0x55,0x1D,0x20,0x04,
1099 0x82,0x01,0x05,0x30,0x82,0x01,0x01,0x30,0x81,0xFE,0x06,0x09,0x2A,0x86,0x48,0x86,
1100 0xF7,0x63,0x64,0x05,0x01,0x30,0x81,0xF0,0x30,0x28,0x06,0x08,0x2B,0x06,0x01,0x05,
1101 0x05,0x07,0x02,0x01,0x16,0x1C,0x68,0x74,0x74,0x70,0x3A,0x2F,0x2F,0x77,0x77,0x77,
1102 0x2E,0x61,0x70,0x70,0x6C,0x65,0x2E,0x63,0x6F,0x6D,0x2F,0x61,0x70,0x70,0x6C,0x65,
1103 0x63,0x61,0x30,0x81,0xC3,0x06,0x08,0x2B,0x06,0x01,0x05,0x05,0x07,0x02,0x02,0x30,
1104 0x81,0xB6,0x0C,0x81,0xB3,0x52,0x65,0x6C,0x69,0x61,0x6E,0x63,0x65,0x20,0x6F,0x6E,
1105 0x20,0x74,0x68,0x69,0x73,0x20,0x63,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,
1106 0x65,0x20,0x62,0x79,0x20,0x61,0x6E,0x79,0x20,0x70,0x61,0x72,0x74,0x79,0x20,0x61,
1107 0x73,0x73,0x75,0x6D,0x65,0x73,0x20,0x61,0x63,0x63,0x65,0x70,0x74,0x61,0x6E,0x63,
1108 0x65,0x20,0x6F,0x66,0x20,0x74,0x68,0x65,0x20,0x74,0x68,0x65,0x6E,0x20,0x61,0x70,
1109 0x70,0x6C,0x69,0x63,0x61,0x62,0x6C,0x65,0x20,0x73,0x74,0x61,0x6E,0x64,0x61,0x72,
1110 0x64,0x20,0x74,0x65,0x72,0x6D,0x73,0x20,0x61,0x6E,0x64,0x20,0x63,0x6F,0x6E,0x64,
1111 0x69,0x74,0x69,0x6F,0x6E,0x73,0x20,0x6F,0x66,0x20,0x75,0x73,0x65,0x2C,0x20,0x63,
1112 0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x65,0x20,0x70,0x6F,0x6C,0x69,0x63,
1113 0x79,0x20,0x61,0x6E,0x64,0x20,0x63,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,
1114 0x69,0x6F,0x6E,0x20,0x70,0x72,0x61,0x63,0x74,0x69,0x63,0x65,0x20,0x73,0x74,0x61,
1115 0x74,0x65,0x6D,0x65,0x6E,0x74,0x73,0x2E,0x30,0x0E,0x06,0x03,0x55,0x1D,0x0F,0x01,
1116 0x01,0xFF,0x04,0x04,0x03,0x02,0x07,0x80,0x30,0x16,0x06,0x03,0x55,0x1D,0x25,0x01,
1117 0x01,0xFF,0x04,0x0C,0x30,0x0A,0x06,0x08,0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x03,
1118 0x30,0x13,0x06,0x0A,0x2A,0x86,0x48,0x86,0xF7,0x63,0x64,0x06,0x01,0x0D,0x01,0x01,
1119 0xFF,0x04,0x02,0x05,0x00,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,
1120 0x01,0x0B,0x05,0x00,0x03,0x82,0x01,0x01,0x00,0x53,0x09,0xBD,0xA3,0xB5,0xE0,0x63,
1121 0x49,0x02,0x71,0x3C,0x3A,0xF3,0xC9,0x08,0xF0,0xF9,0xCA,0x4E,0x70,0xD4,0x8D,0x3F,
1122 0xE5,0x9C,0x67,0xED,0x49,0xB4,0x7C,0xA3,0x5D,0x44,0xDE,0xF0,0x48,0xB9,0xDD,0x54,
1123 0x4F,0x56,0x7D,0xFD,0x08,0x14,0x3C,0x15,0xB8,0xFF,0x54,0x23,0x9A,0x48,0xC5,0x6C,
1124 0x48,0x72,0xE4,0x30,0xA6,0xC6,0xE8,0x42,0x62,0x29,0xA5,0x13,0x72,0x1C,0x04,0x6C,
1125 0x91,0x92,0xC3,0x3A,0x53,0x0A,0x52,0xDC,0x26,0x88,0xDE,0x42,0xA1,0x57,0xC2,0x03,
1126 0x3A,0xD7,0xE3,0x9B,0x2A,0x1F,0x48,0x65,0xFD,0x7F,0x81,0xEF,0x8E,0x39,0x64,0xB8,
1127 0x36,0x2B,0x60,0xCC,0x6A,0x50,0x0C,0x79,0xAD,0x75,0xD2,0x44,0x43,0xA1,0x31,0x5A,
1128 0x27,0xEC,0xB1,0xF5,0xC2,0x32,0x0D,0x35,0xF8,0x70,0x45,0x66,0xA3,0x6A,0x29,0x1F,
1129 0x60,0x7E,0xEE,0x34,0xF7,0x0F,0xBE,0x23,0x1D,0x97,0x3F,0x6C,0xE4,0xA6,0xF6,0x59,
1130 0x73,0x51,0x1B,0x13,0x38,0x04,0x98,0x59,0x8F,0xBF,0x8D,0xB8,0x0E,0xC7,0x57,0x00,
1131 0x8D,0x14,0x3A,0xA5,0xD9,0x4F,0xD9,0x4E,0xFF,0x75,0x83,0x15,0xA6,0x0E,0x1A,0xD3,
1132 0x0D,0xBC,0x0B,0x7E,0x99,0x3A,0xB9,0x73,0xAE,0x84,0x49,0xEE,0x8B,0x26,0x8E,0xD3,
1133 0xE9,0x36,0xCD,0xAD,0xC1,0xA9,0x00,0xC0,0x91,0x8B,0x3E,0x7E,0x7B,0x25,0x7F,0x7F,
1134 0x0D,0x4B,0xA4,0xE4,0xAD,0x67,0x4D,0x6A,0xF1,0xF7,0xF4,0xC0,0x5F,0x4B,0x9A,0xB4,
1135 0x2D,0x9B,0x91,0x3B,0x5A,0x67,0x9B,0xC5,0x64,0x99,0x04,0xA0,0x01,0xCF,0x52,0xE0,
1136 0xBB,0xA1,0xC9,0xDD,0xD6,0x75,0x2E,0xE8,0x04,
1137 };
1138
1139 /* subject:/UID=PV45XFU466/CN=Developer ID Application: T Solanki (PV45XFU466)/OU=PV45XFU466/O=T Solanki/C=US */
1140 /* issuer :/C=US/O=Apple Inc./OU=Apple Certification Authority/CN=Test Apple Caspian Certification Authority */
1141 const uint8_t _new_developer_cert[] = {
1142 0x30,0x82,0x05,0xBF,0x30,0x82,0x04,0xA7,0xA0,0x03,0x02,0x01,0x02,0x02,0x08,0x69,
1143 0x87,0x9F,0x89,0x35,0xB9,0x9C,0xD7,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,
1144 0x0D,0x01,0x01,0x0B,0x05,0x00,0x30,0x7F,0x31,0x0B,0x30,0x09,0x06,0x03,0x55,0x04,
1145 0x06,0x13,0x02,0x55,0x53,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x0A,0x0C,0x0A,
1146 0x41,0x70,0x70,0x6C,0x65,0x20,0x49,0x6E,0x63,0x2E,0x31,0x26,0x30,0x24,0x06,0x03,
1147 0x55,0x04,0x0B,0x0C,0x1D,0x41,0x70,0x70,0x6C,0x65,0x20,0x43,0x65,0x72,0x74,0x69,
1148 0x66,0x69,0x63,0x61,0x74,0x69,0x6F,0x6E,0x20,0x41,0x75,0x74,0x68,0x6F,0x72,0x69,
1149 0x74,0x79,0x31,0x33,0x30,0x31,0x06,0x03,0x55,0x04,0x03,0x0C,0x2A,0x54,0x65,0x73,
1150 0x74,0x20,0x41,0x70,0x70,0x6C,0x65,0x20,0x43,0x61,0x73,0x70,0x69,0x61,0x6E,0x20,
1151 0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6F,0x6E,0x20,0x41,0x75,
1152 0x74,0x68,0x6F,0x72,0x69,0x74,0x79,0x30,0x1E,0x17,0x0D,0x31,0x39,0x30,0x33,0x30,
1153 0x35,0x32,0x32,0x30,0x32,0x32,0x31,0x5A,0x17,0x0D,0x32,0x34,0x30,0x33,0x30,0x35,
1154 0x32,0x32,0x30,0x32,0x32,0x31,0x5A,0x30,0x81,0x8D,0x31,0x1A,0x30,0x18,0x06,0x0A,
1155 0x09,0x92,0x26,0x89,0x93,0xF2,0x2C,0x64,0x01,0x01,0x0C,0x0A,0x50,0x56,0x34,0x35,
1156 0x58,0x46,0x55,0x34,0x36,0x36,0x31,0x39,0x30,0x37,0x06,0x03,0x55,0x04,0x03,0x0C,
1157 0x30,0x44,0x65,0x76,0x65,0x6C,0x6F,0x70,0x65,0x72,0x20,0x49,0x44,0x20,0x41,0x70,
1158 0x70,0x6C,0x69,0x63,0x61,0x74,0x69,0x6F,0x6E,0x3A,0x20,0x54,0x20,0x53,0x6F,0x6C,
1159 0x61,0x6E,0x6B,0x69,0x20,0x28,0x50,0x56,0x34,0x35,0x58,0x46,0x55,0x34,0x36,0x36,
1160 0x29,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x0B,0x0C,0x0A,0x50,0x56,0x34,0x35,
1161 0x58,0x46,0x55,0x34,0x36,0x36,0x31,0x12,0x30,0x10,0x06,0x03,0x55,0x04,0x0A,0x0C,
1162 0x09,0x54,0x20,0x53,0x6F,0x6C,0x61,0x6E,0x6B,0x69,0x31,0x0B,0x30,0x09,0x06,0x03,
1163 0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x30,0x82,0x01,0x22,0x30,0x0D,0x06,0x09,0x2A,
1164 0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x01,0x05,0x00,0x03,0x82,0x01,0x0F,0x00,0x30,
1165 0x82,0x01,0x0A,0x02,0x82,0x01,0x01,0x00,0xC8,0xA7,0xFD,0xE0,0x5C,0xBD,0x35,0x6D,
1166 0x73,0x44,0xE1,0x9A,0xDA,0x70,0xE9,0x6E,0x99,0xDB,0x9C,0x0A,0x47,0x9B,0x71,0xBC,
1167 0xCF,0xE2,0x2A,0x1D,0x6C,0x11,0x5A,0x45,0x27,0xD5,0x3B,0x42,0x4C,0x1B,0xE2,0x43,
1168 0x5D,0xCA,0x37,0x48,0xB1,0xCD,0xA5,0xDC,0x2B,0x46,0xE9,0xD5,0xEE,0xCE,0xE1,0xF2,
1169 0x9C,0xD0,0x55,0x14,0x42,0x7A,0x9A,0xFB,0x2C,0xF0,0x20,0xD5,0x53,0x6B,0x3E,0x76,
1170 0x45,0x59,0xB6,0x16,0x41,0x52,0x61,0x64,0x2E,0xFA,0x69,0x43,0x95,0xD7,0x75,0x63,
1171 0x24,0xF8,0xFD,0x62,0x99,0xE9,0x5B,0xF8,0x72,0xE9,0x85,0x06,0x73,0x60,0x9C,0x83,
1172 0xD7,0xD6,0x1D,0xEC,0xC5,0x85,0x48,0xE0,0x55,0x71,0xFE,0xE0,0x54,0xAF,0x06,0xE7,
1173 0xD6,0x39,0x87,0xFB,0x5A,0xE7,0x7F,0x02,0x7C,0x80,0x2B,0x8B,0xA6,0x6A,0x06,0xF0,
1174 0xBE,0xDF,0xB3,0x1D,0x4D,0x40,0x9F,0x05,0x36,0x55,0xA4,0x09,0x58,0xB1,0xD2,0xB8,
1175 0xC0,0x8B,0xDE,0x25,0xD8,0xEB,0x80,0x07,0x34,0x64,0xE5,0x77,0x9A,0x39,0xD6,0xE1,
1176 0x7F,0x8A,0xF2,0xE4,0x56,0x15,0x84,0xB2,0x8A,0x54,0x31,0xCB,0xC3,0xAD,0xB6,0x63,
1177 0x72,0x64,0x53,0x8F,0xE5,0x74,0xD3,0xAA,0x91,0x0D,0xF0,0xEF,0x03,0x24,0x21,0x8C,
1178 0x0D,0x45,0xE4,0x18,0x0E,0xE0,0xDB,0x8C,0x20,0xF1,0x4A,0xD6,0x8B,0x60,0x84,0x3D,
1179 0x14,0x0D,0xCA,0x46,0x20,0x1F,0x13,0x07,0x7E,0x23,0x90,0x5B,0x8F,0xCF,0xD0,0x1E,
1180 0x48,0x56,0xF5,0xED,0xF3,0x96,0x52,0x03,0x40,0xF7,0x47,0x4A,0xAF,0xD0,0x67,0x0F,
1181 0xC1,0x5F,0xB1,0xA8,0xCD,0x29,0xDD,0x91,0x02,0x03,0x01,0x00,0x01,0xA3,0x82,0x02,
1182 0x2E,0x30,0x82,0x02,0x2A,0x30,0x0C,0x06,0x03,0x55,0x1D,0x13,0x01,0x01,0xFF,0x04,
1183 0x02,0x30,0x00,0x30,0x1F,0x06,0x03,0x55,0x1D,0x23,0x04,0x18,0x30,0x16,0x80,0x14,
1184 0xF8,0x7A,0x23,0x8A,0xD2,0xE7,0xD2,0xDF,0x21,0xDB,0x7A,0xF4,0x12,0x31,0x6E,0x28,
1185 0xF6,0xF9,0xF0,0x8E,0x30,0x49,0x06,0x08,0x2B,0x06,0x01,0x05,0x05,0x07,0x01,0x01,
1186 0x04,0x3D,0x30,0x3B,0x30,0x39,0x06,0x08,0x2B,0x06,0x01,0x05,0x05,0x07,0x30,0x01,
1187 0x86,0x2D,0x68,0x74,0x74,0x70,0x3A,0x2F,0x2F,0x6F,0x63,0x73,0x70,0x2D,0x75,0x61,
1188 0x74,0x2E,0x63,0x6F,0x72,0x70,0x2E,0x61,0x70,0x70,0x6C,0x65,0x2E,0x63,0x6F,0x6D,
1189 0x2F,0x6F,0x63,0x73,0x70,0x30,0x33,0x2D,0x64,0x65,0x76,0x69,0x64,0x30,0x39,0x30,
1190 0x82,0x01,0x1D,0x06,0x03,0x55,0x1D,0x20,0x04,0x82,0x01,0x14,0x30,0x82,0x01,0x10,
1191 0x30,0x82,0x01,0x0C,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x63,0x64,0x05,0x01,0x30,
1192 0x81,0xFE,0x30,0x81,0xC3,0x06,0x08,0x2B,0x06,0x01,0x05,0x05,0x07,0x02,0x02,0x30,
1193 0x81,0xB6,0x0C,0x81,0xB3,0x52,0x65,0x6C,0x69,0x61,0x6E,0x63,0x65,0x20,0x6F,0x6E,
1194 0x20,0x74,0x68,0x69,0x73,0x20,0x63,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,
1195 0x65,0x20,0x62,0x79,0x20,0x61,0x6E,0x79,0x20,0x70,0x61,0x72,0x74,0x79,0x20,0x61,
1196 0x73,0x73,0x75,0x6D,0x65,0x73,0x20,0x61,0x63,0x63,0x65,0x70,0x74,0x61,0x6E,0x63,
1197 0x65,0x20,0x6F,0x66,0x20,0x74,0x68,0x65,0x20,0x74,0x68,0x65,0x6E,0x20,0x61,0x70,
1198 0x70,0x6C,0x69,0x63,0x61,0x62,0x6C,0x65,0x20,0x73,0x74,0x61,0x6E,0x64,0x61,0x72,
1199 0x64,0x20,0x74,0x65,0x72,0x6D,0x73,0x20,0x61,0x6E,0x64,0x20,0x63,0x6F,0x6E,0x64,
1200 0x69,0x74,0x69,0x6F,0x6E,0x73,0x20,0x6F,0x66,0x20,0x75,0x73,0x65,0x2C,0x20,0x63,
1201 0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x65,0x20,0x70,0x6F,0x6C,0x69,0x63,
1202 0x79,0x20,0x61,0x6E,0x64,0x20,0x63,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,
1203 0x69,0x6F,0x6E,0x20,0x70,0x72,0x61,0x63,0x74,0x69,0x63,0x65,0x20,0x73,0x74,0x61,
1204 0x74,0x65,0x6D,0x65,0x6E,0x74,0x73,0x2E,0x30,0x36,0x06,0x08,0x2B,0x06,0x01,0x05,
1205 0x05,0x07,0x02,0x01,0x16,0x2A,0x68,0x74,0x74,0x70,0x3A,0x2F,0x2F,0x77,0x77,0x77,
1206 0x2E,0x61,0x70,0x70,0x6C,0x65,0x2E,0x63,0x6F,0x6D,0x2F,0x63,0x65,0x72,0x74,0x69,
1207 0x66,0x69,0x63,0x61,0x74,0x65,0x61,0x75,0x74,0x68,0x6F,0x72,0x69,0x74,0x79,0x2F,
1208 0x30,0x16,0x06,0x03,0x55,0x1D,0x25,0x01,0x01,0xFF,0x04,0x0C,0x30,0x0A,0x06,0x08,
1209 0x2B,0x06,0x01,0x05,0x05,0x07,0x03,0x03,0x30,0x1D,0x06,0x03,0x55,0x1D,0x0E,0x04,
1210 0x16,0x04,0x14,0x6A,0x2A,0x84,0xE8,0xAF,0x4B,0x33,0x37,0xB3,0x09,0xD5,0x8D,0x49,
1211 0x5B,0xF1,0xA9,0x3D,0x6E,0xCD,0x71,0x30,0x0E,0x06,0x03,0x55,0x1D,0x0F,0x01,0x01,
1212 0xFF,0x04,0x04,0x03,0x02,0x07,0x80,0x30,0x13,0x06,0x0A,0x2A,0x86,0x48,0x86,0xF7,
1213 0x63,0x64,0x06,0x01,0x0D,0x01,0x01,0xFF,0x04,0x02,0x05,0x00,0x30,0x1F,0x06,0x0A,
1214 0x2A,0x86,0x48,0x86,0xF7,0x63,0x64,0x06,0x01,0x21,0x04,0x11,0x0C,0x0F,0x32,0x30,
1215 0x31,0x39,0x30,0x33,0x30,0x35,0x30,0x30,0x30,0x30,0x30,0x30,0x5A,0x30,0x10,0x06,
1216 0x0A,0x2A,0x86,0x48,0x86,0xF7,0x63,0x64,0x06,0x01,0x20,0x04,0x02,0x05,0x00,0x30,
1217 0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x0B,0x05,0x00,0x03,0x82,
1218 0x01,0x01,0x00,0x64,0x2D,0x1E,0xE4,0x1A,0x98,0xEF,0x62,0xF9,0xD8,0xEE,0xF8,0xCA,
1219 0x87,0xD7,0x71,0x55,0xDB,0x0D,0x9E,0x8F,0xDE,0x6E,0xBA,0x7D,0xBE,0xE7,0x2E,0xE3,
1220 0x48,0x09,0x09,0x11,0x54,0x3C,0x6F,0x79,0x61,0xF6,0x18,0xAB,0xE6,0xF4,0x87,0x59,
1221 0x20,0x97,0xC3,0xC2,0x47,0x25,0x03,0x47,0xA0,0xD6,0x95,0x08,0x67,0xA4,0x25,0xB1,
1222 0x94,0x0A,0x17,0x90,0xA7,0x64,0xD1,0xB6,0x35,0x59,0xF8,0x9D,0x0E,0x1E,0xF2,0x5D,
1223 0x2A,0x68,0x90,0x30,0xDF,0xC0,0xF6,0xBE,0x82,0x96,0x9C,0x26,0xAA,0x23,0xFB,0x05,
1224 0xC0,0xC2,0xE5,0xED,0x91,0xEF,0x44,0x93,0xC2,0x1D,0x53,0xE8,0x73,0xB7,0xBC,0xDB,
1225 0x3F,0x06,0x19,0xE5,0x40,0x2A,0xA2,0xE0,0x6F,0xA7,0xF7,0x08,0xB5,0xCB,0x90,0x19,
1226 0x4E,0x94,0xCF,0xD0,0x06,0x90,0xD7,0x60,0x2A,0x12,0x8A,0x54,0xE7,0x0B,0x67,0xEA,
1227 0x7B,0x02,0x42,0xAF,0xFE,0xA0,0x70,0x0D,0x7E,0xC6,0x28,0x96,0x41,0x55,0x34,0x83,
1228 0x5A,0x8C,0xBB,0x85,0x67,0xBC,0x0F,0x18,0x81,0x22,0xA4,0x66,0xCA,0x17,0x54,0xF3,
1229 0x2D,0xFE,0xBE,0xC7,0xAC,0x21,0x7A,0x6A,0x52,0x2E,0xAD,0x45,0x8B,0x39,0xF7,0x57,
1230 0x67,0x35,0x86,0xB8,0x3C,0x78,0x40,0xE0,0x28,0xD5,0xE9,0x80,0xA2,0xC2,0x07,0xFA,
1231 0xAC,0x63,0x1B,0xB6,0x8B,0x47,0xAB,0xC4,0xF1,0x29,0x75,0xE4,0x18,0xF6,0xBB,0x5E,
1232 0x37,0xD9,0x20,0xEA,0x1F,0xBD,0xA2,0xB6,0x1D,0x22,0x67,0x7C,0x13,0x6D,0xFD,0x91,
1233 0x01,0x34,0x43,0xB8,0xAA,0x8D,0xEA,0x1A,0xB0,0x31,0xCE,0xF1,0xCB,0x0B,0xC4,0x38,
1234 0xA4,0x85,0x74,
1235 };
1236
1237 static void test_developer_id_date(void) {
1238 SecCertificateRef old_devid = SecCertificateCreateWithBytes(NULL, _old_developer_cert, sizeof(_old_developer_cert));
1239 SecCertificateRef new_devid = SecCertificateCreateWithBytes(NULL, _new_developer_cert, sizeof(_new_developer_cert));
1240
1241 CFErrorRef error = NULL;
1242 CFAbsoluteTime time;
1243 is(SecCertificateGetDeveloperIDDate(old_devid, &time, &error), false, "old Developer ID cert returned date");
1244 is(CFErrorGetCode(error), errSecMissingRequiredExtension, "old Developer ID cert failed with wrong error code");
1245 CFReleaseNull(error);
1246
1247 ok(SecCertificateGetDeveloperIDDate(new_devid, &time, &error), "new developer ID cert failed to copy date");
1248 is(time, 573436800.0, "date in certificate wasn't 2019-03-05 00:00:00Z");
1249
1250 CFReleaseNull(old_devid);
1251 CFReleaseNull(new_devid);
1252 }
1253
1254 int si_15_certificate(int argc, char *const *argv)
1255 {
1256 plan_tests(49);
1257
1258 tests();
1259 test_common_name();
1260 test_copy_email_addresses();
1261 test_copy_extension_value();
1262 test_developer_id_date();
1263
1264 return 0;
1265 }