]> git.saurik.com Git - apple/security.git/blob - OSX/libsecurity_keychain/libDER/libDER/oids.c
2a65d35cdb6d2fc1aa78bb5303eff671676199f7
[apple/security.git] / OSX / libsecurity_keychain / libDER / libDER / oids.c
1 /*
2 * Copyright (c) 2005-2009,2011-2015 Apple Inc. All Rights Reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22 */
23
24
25 /*
26 * oids.c - OID consts
27 *
28 */
29
30 #include <libDER/libDER.h>
31 #include <libDER/oidsPriv.h>
32
33 #define OID_ISO_CCITT_DIR_SERVICE 85
34 #define OID_DS OID_ISO_CCITT_DIR_SERVICE
35 #define OID_ATTR_TYPE OID_DS, 4
36 #define OID_EXTENSION OID_DS, 29
37 #define OID_ISO_STANDARD 40
38 #define OID_ISO_MEMBER 42
39 #define OID_US OID_ISO_MEMBER, 134, 72
40
41 #define OID_ISO_IDENTIFIED_ORG 43
42 #define OID_OSINET OID_ISO_IDENTIFIED_ORG, 4
43 #define OID_GOSIP OID_ISO_IDENTIFIED_ORG, 5
44 #define OID_DOD OID_ISO_IDENTIFIED_ORG, 6
45 #define OID_OIW OID_ISO_IDENTIFIED_ORG, 14
46
47 /* From the PKCS Standards */
48 #define OID_RSA OID_US, 134, 247, 13
49 #define OID_RSA_HASH OID_RSA, 2
50 #define OID_RSA_ENCRYPT OID_RSA, 3
51 #define OID_PKCS OID_RSA, 1
52 #define OID_PKCS_1 OID_PKCS, 1
53 #define OID_PKCS_2 OID_PKCS, 2
54 #define OID_PKCS_3 OID_PKCS, 3
55 #define OID_PKCS_4 OID_PKCS, 4
56 #define OID_PKCS_5 OID_PKCS, 5
57 #define OID_PKCS_6 OID_PKCS, 6
58 #define OID_PKCS_7 OID_PKCS, 7
59 #define OID_PKCS_8 OID_PKCS, 8
60 #define OID_PKCS_9 OID_PKCS, 9
61 #define OID_PKCS_10 OID_PKCS, 10
62 #define OID_PKCS_11 OID_PKCS, 11
63 #define OID_PKCS_12 OID_PKCS, 12
64
65 /* ANSI X9.62 */
66 #define OID_ANSI_X9_62 OID_US, 206, 61
67 #define OID_PUBLIC_KEY_TYPE OID_ANSI_X9_62, 2
68 #define OID_EC_SIG_TYPE OID_ANSI_X9_62, 4
69 #define OID_ECDSA_WITH_SHA2 OID_EC_SIG_TYPE, 3
70
71 /* ANSI X9.42 */
72 #define OID_ANSI_X9_42 OID_US, 206, 62, 2
73 #define OID_ANSI_X9_42_SCHEME OID_ANSI_X9_42, 3
74 #define OID_ANSI_X9_42_NAMED_SCHEME OID_ANSI_X9_42, 4
75
76 /* ANSI X9.57 */
77 #define OID_ANSI_X9_57 OID_US, 206, 56
78 #define OID_ANSI_X9_57_ALGORITHM OID_ANSI_X9_57, 4
79
80 /* DOD IANA Security related objects. */
81 #define OID_IANA OID_DOD, 1, 5
82
83 /* Kerberos PKINIT */
84 #define OID_KERBv5 OID_IANA, 2
85 #define OID_KERBv5_PKINIT OID_KERBv5, 3
86
87 /* DOD IANA Mechanisms. */
88 #define OID_MECHANISMS OID_IANA, 5
89
90 /* PKIX */
91 #define OID_PKIX OID_MECHANISMS, 7
92 #define OID_PE OID_PKIX, 1
93 #define OID_QT OID_PKIX, 2
94 #define OID_KP OID_PKIX, 3
95 #define OID_OTHER_NAME OID_PKIX, 8
96 #define OID_PDA OID_PKIX, 9
97 #define OID_QCS OID_PKIX, 11
98 #define OID_AD OID_PKIX, 48
99 #define OID_AD_OCSP OID_AD, 1
100 #define OID_AD_CAISSUERS OID_AD, 2
101
102 /* ISAKMP */
103 #define OID_ISAKMP OID_MECHANISMS, 8
104
105 /* ETSI */
106 #define OID_ETSI 0x04, 0x00
107 #define OID_ETSI_QCS 0x04, 0x00, 0x8E, 0x46, 0x01
108
109 #define OID_OIW_SECSIG OID_OIW, 3
110
111 #define OID_OIW_ALGORITHM OID_OIW_SECSIG, 2
112
113 /* NIST defined digest algorithm arc (2, 16, 840, 1, 101, 3, 4, 2) */
114 #define OID_NIST_HASHALG 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02
115
116 /*
117 * Apple-specific OID bases
118 */
119
120 /*
121 * apple OBJECT IDENTIFIER ::=
122 * { iso(1) member-body(2) US(840) 113635 }
123 *
124 * BER = 06 06 2A 86 48 86 F7 63
125 */
126 #define APPLE_OID OID_US, 0x86, 0xf7, 0x63
127
128 /* appleDataSecurity OBJECT IDENTIFIER ::=
129 * { apple 100 }
130 * { 1 2 840 113635 100 }
131 *
132 * BER = 06 07 2A 86 48 86 F7 63 64
133 */
134 #define APPLE_ADS_OID APPLE_OID, 0x64
135
136 /*
137 * appleTrustPolicy OBJECT IDENTIFIER ::=
138 * { appleDataSecurity 1 }
139 * { 1 2 840 113635 100 1 }
140 *
141 * BER = 06 08 2A 86 48 86 F7 63 64 01
142 */
143 #define APPLE_TP_OID APPLE_ADS_OID, 1
144
145 /*
146 * appleSecurityAlgorithm OBJECT IDENTIFIER ::=
147 * { appleDataSecurity 2 }
148 * { 1 2 840 113635 100 2 }
149 *
150 * BER = 06 08 2A 86 48 86 F7 63 64 02
151 */
152 #define APPLE_ALG_OID APPLE_ADS_OID, 2
153
154 /*
155 * appleDotMacCertificate OBJECT IDENTIFIER ::=
156 * { appleDataSecurity 3 }
157 * { 1 2 840 113635 100 3 }
158 */
159 #define APPLE_DOTMAC_CERT_OID APPLE_ADS_OID, 3
160
161 /*
162 * Basis of Policy OIDs for .mac TP requests
163 *
164 * dotMacCertificateRequest OBJECT IDENTIFIER ::=
165 * { appleDotMacCertificate 1 }
166 * { 1 2 840 113635 100 3 1 }
167 */
168 #define APPLE_DOTMAC_CERT_REQ_OID APPLE_DOTMAC_CERT_OID, 1
169
170 /*
171 * Basis of .mac Certificate Extensions
172 *
173 * dotMacCertificateExtension OBJECT IDENTIFIER ::=
174 * { appleDotMacCertificate 2 }
175 * { 1 2 840 113635 100 3 2 }
176 */
177 #define APPLE_DOTMAC_CERT_EXTEN_OID APPLE_DOTMAC_CERT_OID, 2
178
179 /*
180 * Basis of .mac Certificate request OID/value identitifiers
181 *
182 * dotMacCertificateRequestValues OBJECT IDENTIFIER ::=
183 * { appleDotMacCertificate 3 }
184 * { 1 2 840 113635 100 3 3 }
185 */
186 #define APPLE_DOTMAC_CERT_REQ_VALUE_OID APPLE_DOTMAC_CERT_OID, 3
187
188 /*
189 * Basis of Apple-specific extended key usages
190 *
191 * appleExtendedKeyUsage OBJECT IDENTIFIER ::=
192 * { appleDataSecurity 4 }
193 * { 1 2 840 113635 100 4 }
194 */
195 #define APPLE_EKU_OID APPLE_ADS_OID, 4
196
197 /*
198 * Basis of Apple Code Signing extended key usages
199 * appleCodeSigning OBJECT IDENTIFIER ::=
200 * { appleExtendedKeyUsage 1 }
201 * { 1 2 840 113635 100 4 1}
202 */
203 #define APPLE_EKU_CODE_SIGNING APPLE_EKU_OID, 1
204 #define APPLE_EKU_APPLE_ID APPLE_EKU_OID, 7
205 #define APPLE_EKU_PASSBOOK APPLE_EKU_OID, 14
206 #define APPLE_EKU_PROFILE_SIGNING APPLE_EKU_OID, 16
207 #define APPLE_EKU_QA_PROFILE_SIGNING APPLE_EKU_OID, 17
208
209
210 /*
211 * Basis of Apple-specific Certificate Policy IDs.
212 * appleCertificatePolicies OBJECT IDENTIFIER ::=
213 * { appleDataSecurity 5 }
214 * { 1 2 840 113635 100 5 }
215 */
216 #define APPLE_CERT_POLICIES APPLE_ADS_OID, 5
217
218 #define APPLE_CERT_POLICY_MOBILE_STORE APPLE_CERT_POLICIES, 12
219
220 #define APPLE_CERT_POLICY_TEST_MOBILE_STORE APPLE_CERT_POLICY_MOBILE_STORE, 1
221
222 /*
223 * Basis of Apple-specific Signing extensions
224 * { appleDataSecurity 6 }
225 */
226 #define APPLE_CERT_EXT APPLE_ADS_OID, 6
227
228 /* Apple Intermediate Marker OIDs */
229 #define APPLE_CERT_EXT_INTERMEDIATE_MARKER APPLE_CERT_EXT, 2
230
231 /* Apple Worldwide Developer Relations Certification Authority */
232 /* 1.2.840.113635.100.6.2.1 */
233 #define APPLE_CERT_EXT_INTERMEDIATE_MARKER_WWDR APPLE_CERT_EXT_INTERMEDIATE_MARKER, 1
234
235 /* Apple Apple ID Intermediate Marker */
236 #define APPLE_CERT_EXT_INTERMEDIATE_MARKER_APPLEID APPLE_CERT_EXT_INTERMEDIATE_MARKER, 3
237
238 /*
239 * Apple Apple ID Intermediate Marker (New subCA, no longer shared with push notification server cert issuer
240 *
241 * appleCertificateExtensionAppleIDIntermediate ::=
242 * { appleCertificateExtensionIntermediateMarker 7 }
243 * { 1 2 840 113635 100 6 2 7 }
244 */
245 #define APPLE_CERT_EXT_INTERMEDIATE_MARKER_APPLEID_2 APPLE_CERT_EXT_INTERMEDIATE_MARKER, 7
246
247 #define APPLE_CERT_EXT_INTERMEDIATE_MARKER_APPLEID_SYSTEM_INTEGRATION_2 APPLE_CERT_EXT_INTERMEDIATE_MARKER, 10
248
249 #define APPLE_CERT_EXT_INTERMEDIATE_MARKER_APPLEID_SYSTEM_INTEGRATION_G3 APPLE_CERT_EXT_INTERMEDIATE_MARKER, 13
250
251 #define APPLE_CERT_EXT_APPLE_PUSH_MARKER APPLE_CERT_EXT_INTERMEDIATE_MARKER_APPLEID, 2
252
253
254 #define APPLE_CERT_EXTENSION_CODESIGNING APPLE_CERT_EXT, 1
255
256 /* Secure Boot Embedded Image3 value,
257 co-opted by desktop for "Apple Released Code Signature", without value */
258 #define APPLE_SBOOT_CERT_EXTEN_SBOOT_SPEC_OID APPLE_CERT_EXTENSION_CODESIGNING, 1
259 /* iPhone Provisioning Profile Signing leaf - on the intermediate marker arc? */
260 #define APPLE_PROVISIONING_PROFILE_OID APPLE_CERT_EXT_INTERMEDIATE_MARKER, 1
261 /* iPhone Application Signing leaf */
262 #define APPLE_APP_SIGNING_OID APPLE_CERT_EXTENSION_CODESIGNING, 3
263
264 #define APPLE_INSTALLER_PACKAGE_SIGNING_EXTERNAL_OID APPLE_CERT_EXTENSION_CODESIGNING, 16
265
266 /* Apple TVOS Application Signing leaf, production */
267 /* 1.2.840.113635.100.6.1.24 */
268 #define APPLE_TVOS_APP_SIGNING_PROD_OID APPLE_CERT_EXTENSION_CODESIGNING, 24
269
270 /* Apple TVOS Application Signing leaf, test */
271 /* 1.2.840.113635.100.6.1.24.1 */
272
273 #define APPLE_TVOS_APP_SIGNING_TEST_OID APPLE_CERT_EXTENSION_CODESIGNING, 24, 1
274
275 #define APPLE_ESCROW_ARC APPLE_CERT_EXT, 23
276
277 #define APPLE_ESCROW_POLICY_OID APPLE_ESCROW_ARC, 1
278
279 #define APPLE_CERT_EXT_APPLE_ID_VALIDATION_RECORD_SIGNING APPLE_CERT_EXT, 25
280
281 #define APPLE_SERVER_AUTHENTICATION APPLE_CERT_EXT, 27
282 #define APPLE_CERT_EXT_APPLE_SERVER_AUTHENTICATION APPLE_SERVER_AUTHENTICATION, 1
283 #define APPLE_CERT_EXT_APPLE_SERVER_AUTHENTICATION_PPQ_TEST APPLE_SERVER_AUTHENTICATION, 3, 1
284 #define APPLE_CERT_EXT_APPLE_SERVER_AUTHENTICATION_PPQ_PROD APPLE_SERVER_AUTHENTICATION, 3, 2
285 #define APPLE_CERT_EXT_APPLE_SERVER_AUTHENTICATION_IDS_TEST APPLE_SERVER_AUTHENTICATION, 4, 1
286 #define APPLE_CERT_EXT_APPLE_SERVER_AUTHENTICATION_IDS_PROD APPLE_SERVER_AUTHENTICATION, 4, 2
287 #define APPLE_CERT_EXT_APPLE_SERVER_AUTHENTICATION_APN_TEST APPLE_SERVER_AUTHENTICATION, 5, 1
288 #define APPLE_CERT_EXT_APPLE_SERVER_AUTHENTICATION_APN_PROD APPLE_SERVER_AUTHENTICATION, 5, 2
289
290 #define APPLE_CERT_EXT_APPLE_SERVER_AUTHENTICATION_GS APPLE_SERVER_AUTHENTICATION, 2
291
292
293 #define APPLE_CERT_EXT_INTERMEDIATE_MARKER_APPLE_SERVER_AUTHENTICATION APPLE_CERT_EXT_INTERMEDIATE_MARKER, 12
294
295 #define APPLE_CERT_EXT_APPLE_SMP_ENCRYPTION APPLE_CERT_EXT, 30
296
297 /* UPP fraud detection (Provisioning Profile Query) CMS signing */
298
299 #define APPLE_CERT_EXT_APPLE_PPQ_SIGNING_TEST APPLE_CERT_EXT, 38, 1
300 #define APPLE_CERT_EXT_APPLE_PPQ_SIGNING_PROD APPLE_CERT_EXT, 38, 2
301
302 /* AppleTVOS Application Signing */
303 #define APPLE_ATV_APP_SIGNING_OID APPLE_CERT_EXTENSION_CODESIGNING, 24
304 #define APPLE_ATV_APP_SIGNING_OID_TEST APPLE_ATV_APP_SIGNING_OID, 1
305
306 /* Apple Pay Issuer Encryption */
307 #define APPLE_CERT_EXT_CRYPTO_SERVICES_EXT_ENCRYPTION APPLE_CERT_EXT, 39
308
309 /* Apple OS X Provisioning Profile Signing */
310 /* (note this OID is unfortunately used as a cert extension even though it's under the EKU arc) */
311 #define APPLE_CERT_EXT_OSX_PROVISIONING_PROFILE_SIGNING APPLE_EKU_OID, 11
312
313 /* AppleTV VPN Profile Signing 1.2.840.113635.100.6.43 */
314 #define APPLE_CERT_EXT_APPLE_ATV_VPN_PROFILE_SIGNING APPLE_CERT_EXT, 43
315
316 /* AST2 Diagnostics Server Authentication
317 * Test Marker OID 1.2.840.113635.100.6.27.8.1
318 * Prod Marker OID 1.2.840.113635.100.6.27.8.2
319 */
320 #define APPLE_CERT_EXT_AST2_DIAGNOSTICS_SERVER_AUTH_TEST APPLE_SERVER_AUTHENTICATION, 8, 1
321 #define APPLE_CERT_EXT_AST2_DIAGNOSTICS_SERVER_AUTH_PROD APPLE_SERVER_AUTHENTICATION, 8, 2
322
323 /*
324 * Netscape OIDs.
325 */
326 #define NETSCAPE_BASE_OID 0x60, 0x86, 0x48, 0x01, 0x86, 0xf8, 0x42
327
328 /*
329 * Netscape cert extension.
330 *
331 * netscape-cert-extension OBJECT IDENTIFIER ::=
332 * { 2 16 840 1 113730 1 }
333 *
334 * BER = 06 08 60 86 48 01 86 F8 42 01
335 */
336 #define NETSCAPE_CERT_EXTEN NETSCAPE_BASE_OID, 0x01
337
338 #define NETSCAPE_CERT_POLICY NETSCAPE_BASE_OID, 0x04
339
340 /* Entrust OIDs. */
341 #define ENTRUST_BASE_OID OID_US, 0x86, 0xf6, 0x7d
342
343 /*
344 * Entrust cert extension.
345 *
346 * entrust-cert-extension OBJECT IDENTIFIER ::=
347 * { 1 2 840 113533 7 65 }
348 *
349 * BER = 06 08 2A 86 48 86 F6 7D 07 41
350 */
351 #define ENTRUST_CERT_EXTEN ENTRUST_BASE_OID, 0x07, 0x41
352
353 /* Microsoft OIDs. */
354 #define MICROSOFT_BASE_OID OID_DOD, 0x01, 0x04, 0x01, 0x82, 0x37
355 #define MICROSOFT_ENROLLMENT_OID MICROSOFT_BASE_OID, 0x14
356
357 /* Google OIDs: 1.3.6.1.4.1.11129.
358 */
359 #define GOOGLE_BASE_OID OID_DOD, 0x01, 0x04, 0x01, 0xD6, 0x79
360 #define GOOGLE_EMBEDDED_SCT_OID GOOGLE_BASE_OID, 0x02, 0x04, 0x02
361 #define GOOGLE_OCSP_SCT_OID GOOGLE_BASE_OID, 0x02, 0x04, 0x05
362
363
364 /* Algorithm OIDs. */
365 static const DERByte
366 _oidRsa[] = { OID_PKCS_1, 1 },
367 _oidMd2Rsa[] = { OID_PKCS_1, 2 },
368 _oidMd4Rsa[] = { OID_PKCS_1, 3 },
369 _oidMd5Rsa[] = { OID_PKCS_1, 4 },
370 _oidSha1Rsa[] = { OID_PKCS_1, 5 },
371 _oidSha256Rsa[] = { OID_PKCS_1, 11 },
372 _oidSha384Rsa[] = { OID_PKCS_1, 12 },
373 _oidSha512Rsa[] = { OID_PKCS_1, 13 },
374 _oidSha224Rsa[] = { OID_PKCS_1, 14 },
375 _oidEcPubKey[] = { OID_PUBLIC_KEY_TYPE, 1 },
376 _oidSha1Ecdsa[] = { OID_EC_SIG_TYPE, 1 }, /* rfc3279 */
377 _oidSha224Ecdsa[] = { OID_ECDSA_WITH_SHA2, 1 }, /* rfc5758 */
378 _oidSha256Ecdsa[] = { OID_ECDSA_WITH_SHA2, 2 }, /* rfc5758 */
379 _oidSha384Ecdsa[] = { OID_ECDSA_WITH_SHA2, 3 }, /* rfc5758 */
380 _oidSha512Ecdsa[] = { OID_ECDSA_WITH_SHA2, 4 }, /* rfc5758 */
381 _oidSha1Dsa[] = { OID_ANSI_X9_57_ALGORITHM, 3 },
382 _oidMd2[] = { OID_RSA_HASH, 2 },
383 _oidMd4[] = { OID_RSA_HASH, 4 },
384 _oidMd5[] = { OID_RSA_HASH, 5 },
385 _oidSha1[] = { OID_OIW_ALGORITHM, 26 },
386 _oidSha1DsaOIW[] = { OID_OIW_ALGORITHM, 27 },
387 _oidSha1DsaCommonOIW[] = { OID_OIW_ALGORITHM, 28 },
388 _oidSha1RsaOIW[] = { OID_OIW_ALGORITHM, 29 },
389 _oidSha256[] = { OID_NIST_HASHALG, 1 },
390 _oidSha384[] = { OID_NIST_HASHALG, 2 },
391 _oidSha512[] = { OID_NIST_HASHALG, 3 },
392 _oidSha224[] = { OID_NIST_HASHALG, 4 },
393 _oidFee[] = { APPLE_ALG_OID, 1 },
394 _oidMd5Fee[] = { APPLE_ALG_OID, 3 },
395 _oidSha1Fee[] = { APPLE_ALG_OID, 4 };
396
397 const DERItem
398 oidRsa = { (DERByte *)_oidRsa,
399 sizeof(_oidRsa) },
400 oidMd2Rsa = { (DERByte *)_oidMd2Rsa,
401 sizeof(_oidMd2Rsa) },
402 oidMd4Rsa = { (DERByte *)_oidMd4Rsa,
403 sizeof(_oidMd4Rsa) },
404 oidMd5Rsa = { (DERByte *)_oidMd5Rsa,
405 sizeof(_oidMd5Rsa) },
406 oidSha1Rsa = { (DERByte *)_oidSha1Rsa,
407 sizeof(_oidSha1Rsa) },
408 oidSha256Rsa = { (DERByte *)_oidSha256Rsa,
409 sizeof(_oidSha256Rsa) },
410 oidSha384Rsa = { (DERByte *)_oidSha384Rsa,
411 sizeof(_oidSha384Rsa) },
412 oidSha512Rsa = { (DERByte *)_oidSha512Rsa,
413 sizeof(_oidSha512Rsa) },
414 oidSha224Rsa = { (DERByte *)_oidSha224Rsa,
415 sizeof(_oidSha224Rsa) },
416 oidEcPubKey = { (DERByte *)_oidEcPubKey,
417 sizeof(_oidEcPubKey) },
418 oidSha1Ecdsa = { (DERByte *)_oidSha1Ecdsa,
419 sizeof(_oidSha1Ecdsa) },
420 oidSha224Ecdsa = { (DERByte *)_oidSha224Ecdsa,
421 sizeof(_oidSha224Ecdsa) },
422 oidSha256Ecdsa = { (DERByte *)_oidSha256Ecdsa,
423 sizeof(_oidSha256Ecdsa) },
424 oidSha384Ecdsa = { (DERByte *)_oidSha384Ecdsa,
425 sizeof(_oidSha384Ecdsa) },
426 oidSha512Ecdsa = { (DERByte *)_oidSha512Ecdsa,
427 sizeof(_oidSha512Ecdsa) },
428 oidSha1Dsa = { (DERByte *)_oidSha1Dsa,
429 sizeof(_oidSha1Dsa) },
430 oidMd2 = { (DERByte *)_oidMd2,
431 sizeof(_oidMd2) },
432 oidMd4 = { (DERByte *)_oidMd4,
433 sizeof(_oidMd4) },
434 oidMd5 = { (DERByte *)_oidMd5,
435 sizeof(_oidMd5) },
436 oidSha1 = { (DERByte *)_oidSha1,
437 sizeof(_oidSha1) },
438 oidSha1RsaOIW = { (DERByte *)_oidSha1RsaOIW,
439 sizeof(_oidSha1RsaOIW) },
440 oidSha1DsaOIW = { (DERByte *)_oidSha1DsaOIW,
441 sizeof(_oidSha1DsaOIW) },
442 oidSha1DsaCommonOIW = { (DERByte *)_oidSha1DsaCommonOIW,
443 sizeof(_oidSha1DsaCommonOIW) },
444 oidSha256 = { (DERByte *)_oidSha256,
445 sizeof(_oidSha256) },
446 oidSha384 = { (DERByte *)_oidSha384,
447 sizeof(_oidSha384) },
448 oidSha512 = { (DERByte *)_oidSha512,
449 sizeof(_oidSha512) },
450 oidSha224 = { (DERByte *)_oidSha224,
451 sizeof(_oidSha224) },
452 oidFee = { (DERByte *)_oidFee,
453 sizeof(_oidFee) },
454 oidMd5Fee = { (DERByte *)_oidMd5Fee,
455 sizeof(_oidMd5Fee) },
456 oidSha1Fee = { (DERByte *)_oidSha1Fee,
457 sizeof(_oidSha1Fee) };
458
459
460 /* Extension OIDs. */
461 __unused static const DERByte
462 _oidSubjectKeyIdentifier[] = { OID_EXTENSION, 14 },
463 _oidKeyUsage[] = { OID_EXTENSION, 15 },
464 _oidPrivateKeyUsagePeriod[] = { OID_EXTENSION, 16 },
465 _oidSubjectAltName[] = { OID_EXTENSION, 17 },
466 _oidIssuerAltName[] = { OID_EXTENSION, 18 },
467 _oidBasicConstraints[] = { OID_EXTENSION, 19 },
468 _oidNameConstraints[] = { OID_EXTENSION, 30 },
469 _oidCrlDistributionPoints[] = { OID_EXTENSION, 31 },
470 _oidCertificatePolicies[] = { OID_EXTENSION, 32 },
471 _oidAnyPolicy[] = { OID_EXTENSION, 32, 0 },
472 _oidPolicyMappings[] = { OID_EXTENSION, 33 },
473 _oidAuthorityKeyIdentifier[] = { OID_EXTENSION, 35 },
474 _oidPolicyConstraints[] = { OID_EXTENSION, 36 },
475 _oidExtendedKeyUsage[] = { OID_EXTENSION, 37 },
476 _oidAnyExtendedKeyUsage[] = { OID_EXTENSION, 37, 0 },
477 _oidInhibitAnyPolicy[] = { OID_EXTENSION, 54 },
478 _oidAuthorityInfoAccess[] = { OID_PE, 1 },
479 _oidSubjectInfoAccess[] = { OID_PE, 11 },
480 _oidAdOCSP[] = { OID_AD_OCSP },
481 _oidAdCAIssuer[] = { OID_AD_CAISSUERS },
482 _oidNetscapeCertType[] = { NETSCAPE_CERT_EXTEN, 1 },
483 _oidEntrustVersInfo[] = { ENTRUST_CERT_EXTEN, 0 },
484 _oidMSNTPrincipalName[] = { MICROSOFT_ENROLLMENT_OID, 2, 3 },
485 /* Policy Qualifier IDs for Internet policy qualifiers. */
486 _oidQtCps[] = { OID_QT, 1 },
487 _oidQtUNotice[] = { OID_QT, 2 },
488 /* X.501 Name IDs. */
489 _oidCommonName[] = { OID_ATTR_TYPE, 3 },
490 _oidCountryName[] = { OID_ATTR_TYPE, 6 },
491 _oidLocalityName[] = { OID_ATTR_TYPE, 7 },
492 _oidStateOrProvinceName[] = { OID_ATTR_TYPE, 8 },
493 _oidOrganizationName[] = { OID_ATTR_TYPE, 10 },
494 _oidOrganizationalUnitName[] = { OID_ATTR_TYPE, 11 },
495 _oidDescription[] = { OID_ATTR_TYPE, 13 },
496 _oidEmailAddress[] = { OID_PKCS_9, 1 },
497 _oidFriendlyName[] = { OID_PKCS_9, 20 },
498 _oidLocalKeyId[] = { OID_PKCS_9, 21 },
499 _oidExtendedKeyUsageServerAuth[] = { OID_KP, 1 },
500 _oidExtendedKeyUsageClientAuth[] = { OID_KP, 2 },
501 _oidExtendedKeyUsageCodeSigning[] = { OID_KP, 3 },
502 _oidExtendedKeyUsageEmailProtection[] = { OID_KP, 4 },
503 _oidExtendedKeyUsageTimeStamping[] = { OID_KP, 8 },
504 _oidExtendedKeyUsageOCSPSigning[] = { OID_KP, 9 },
505 _oidExtendedKeyUsageIPSec[] = { OID_ISAKMP, 2, 2 },
506 _oidExtendedKeyUsageMicrosoftSGC[] = { MICROSOFT_BASE_OID, 10, 3, 3 },
507 _oidExtendedKeyUsageNetscapeSGC[] = { NETSCAPE_CERT_POLICY, 1 },
508 _oidAppleSecureBootCertSpec[] = { APPLE_SBOOT_CERT_EXTEN_SBOOT_SPEC_OID },
509 _oidAppleProvisioningProfile[] = {APPLE_PROVISIONING_PROFILE_OID },
510 _oidAppleApplicationSigning[] = { APPLE_APP_SIGNING_OID },
511 _oidAppleInstallerPackagingSigningExternal[] = { APPLE_INSTALLER_PACKAGE_SIGNING_EXTERNAL_OID },
512 _oidAppleTVOSApplicationSigningProd[] = { APPLE_TVOS_APP_SIGNING_PROD_OID },
513 _oidAppleTVOSApplicationSigningTest[] = { APPLE_TVOS_APP_SIGNING_TEST_OID },
514 _oidAppleExtendedKeyUsageCodeSigning[] = { APPLE_EKU_CODE_SIGNING },
515 _oidAppleExtendedKeyUsageCodeSigningDev[] = { APPLE_EKU_CODE_SIGNING, 1 },
516 _oidAppleExtendedKeyUsageAppleID[] = { APPLE_EKU_APPLE_ID },
517 _oidAppleExtendedKeyUsagePassbook[] = { APPLE_EKU_PASSBOOK },
518 _oidAppleExtendedKeyUsageProfileSigning[] = { APPLE_EKU_PROFILE_SIGNING },
519 _oidAppleExtendedKeyUsageQAProfileSigning[] = { APPLE_EKU_QA_PROFILE_SIGNING },
520 _oidAppleIntmMarkerAppleWWDR[] = { APPLE_CERT_EXT_INTERMEDIATE_MARKER_WWDR },
521 _oidAppleIntmMarkerAppleID[] = { APPLE_CERT_EXT_INTERMEDIATE_MARKER_APPLEID },
522 _oidAppleIntmMarkerAppleID2[] = {APPLE_CERT_EXT_INTERMEDIATE_MARKER_APPLEID_2 },
523 _oidApplePushServiceClient[] = { APPLE_CERT_EXT_APPLE_PUSH_MARKER, 2 },
524 _oidApplePolicyMobileStore[] = { APPLE_CERT_POLICY_MOBILE_STORE },
525 _oidApplePolicyTestMobileStore[] = { APPLE_CERT_POLICY_TEST_MOBILE_STORE },
526 _oidApplePolicyEscrowService[] = { APPLE_ESCROW_POLICY_OID },
527 _oidAppleCertExtensionAppleIDRecordValidationSigning[] = { APPLE_CERT_EXT_APPLE_ID_VALIDATION_RECORD_SIGNING },
528 _oidAppleCertExtOSXProvisioningProfileSigning[] = { APPLE_CERT_EXT_OSX_PROVISIONING_PROFILE_SIGNING },
529 _oidAppleIntmMarkerAppleSystemIntg2[] = {APPLE_CERT_EXT_INTERMEDIATE_MARKER_APPLEID_SYSTEM_INTEGRATION_2},
530 _oidAppleIntmMarkerAppleSystemIntgG3[] = {APPLE_CERT_EXT_INTERMEDIATE_MARKER_APPLEID_SYSTEM_INTEGRATION_G3},
531 _oidAppleCertExtAppleSMPEncryption[] = {APPLE_CERT_EXT_APPLE_SMP_ENCRYPTION},
532 _oidAppleCertExtAppleServerAuthentication[] = {APPLE_CERT_EXT_APPLE_SERVER_AUTHENTICATION},
533 _oidAppleCertExtAppleServerAuthenticationPPQTest[] = {APPLE_CERT_EXT_APPLE_SERVER_AUTHENTICATION_PPQ_TEST},
534 _oidAppleCertExtAppleServerAuthenticationPPQProd[] = {APPLE_CERT_EXT_APPLE_SERVER_AUTHENTICATION_PPQ_PROD},
535 _oidAppleCertExtAppleServerAuthenticationIDSTest[] = {APPLE_CERT_EXT_APPLE_SERVER_AUTHENTICATION_IDS_TEST},
536 _oidAppleCertExtAppleServerAuthenticationIDSProd[] = {APPLE_CERT_EXT_APPLE_SERVER_AUTHENTICATION_IDS_PROD},
537 _oidAppleCertExtAppleServerAuthenticationAPNTest[] = {APPLE_CERT_EXT_APPLE_SERVER_AUTHENTICATION_APN_TEST},
538 _oidAppleCertExtAppleServerAuthenticationAPNProd[] = {APPLE_CERT_EXT_APPLE_SERVER_AUTHENTICATION_APN_PROD},
539 _oidAppleCertExtAppleServerAuthenticationGS[] = {APPLE_CERT_EXT_APPLE_SERVER_AUTHENTICATION_GS},
540 _oidAppleIntmMarkerAppleServerAuthentication[] = {APPLE_CERT_EXT_INTERMEDIATE_MARKER_APPLE_SERVER_AUTHENTICATION},
541 _oidAppleCertExtApplePPQSigningTest[] = {APPLE_CERT_EXT_APPLE_PPQ_SIGNING_TEST},
542 _oidAppleCertExtApplePPQSigningProd[] = {APPLE_CERT_EXT_APPLE_PPQ_SIGNING_PROD},
543 _oidGoogleEmbeddedSignedCertificateTimestamp[] = {GOOGLE_EMBEDDED_SCT_OID},
544 _oidGoogleOCSPSignedCertificateTimestamp[] = {GOOGLE_OCSP_SCT_OID},
545 _oidAppleCertExtATVAppSigningTest[] = {APPLE_ATV_APP_SIGNING_OID_TEST},
546 _oidAppleCertExtATVAppSigningProd[] = {APPLE_ATV_APP_SIGNING_OID},
547 _oidAppleCertExtATVVPNProfileSigning[] = {APPLE_CERT_EXT_APPLE_ATV_VPN_PROFILE_SIGNING},
548 _oidAppleCertExtCryptoServicesExtEncryption[] = {APPLE_CERT_EXT_CRYPTO_SERVICES_EXT_ENCRYPTION},
549 _oidAppleCertExtAST2DiagnosticsServerAuthTest[] = {APPLE_CERT_EXT_AST2_DIAGNOSTICS_SERVER_AUTH_TEST},
550 _oidAppleCertExtAST2DiagnosticsServerAuthProd[] = {APPLE_CERT_EXT_AST2_DIAGNOSTICS_SERVER_AUTH_PROD};
551
552 __unused const DERItem
553 oidSubjectKeyIdentifier = { (DERByte *)_oidSubjectKeyIdentifier,
554 sizeof(_oidSubjectKeyIdentifier) },
555 oidKeyUsage = { (DERByte *)_oidKeyUsage,
556 sizeof(_oidKeyUsage) },
557 oidPrivateKeyUsagePeriod = { (DERByte *)_oidPrivateKeyUsagePeriod,
558 sizeof(_oidPrivateKeyUsagePeriod) },
559 oidSubjectAltName = { (DERByte *)_oidSubjectAltName,
560 sizeof(_oidSubjectAltName) },
561 oidIssuerAltName = { (DERByte *)_oidIssuerAltName,
562 sizeof(_oidIssuerAltName) },
563 oidBasicConstraints = { (DERByte *)_oidBasicConstraints,
564 sizeof(_oidBasicConstraints) },
565 oidNameConstraints = { (DERByte *)_oidNameConstraints,
566 sizeof(_oidNameConstraints) },
567 oidCrlDistributionPoints = { (DERByte *)_oidCrlDistributionPoints,
568 sizeof(_oidCrlDistributionPoints) },
569 oidCertificatePolicies = { (DERByte *)_oidCertificatePolicies,
570 sizeof(_oidCertificatePolicies) },
571 oidAnyPolicy = { (DERByte *)_oidAnyPolicy,
572 sizeof(_oidAnyPolicy) },
573 oidPolicyMappings = { (DERByte *)_oidPolicyMappings,
574 sizeof(_oidPolicyMappings) },
575 oidAuthorityKeyIdentifier = { (DERByte *)_oidAuthorityKeyIdentifier,
576 sizeof(_oidAuthorityKeyIdentifier) },
577 oidPolicyConstraints = { (DERByte *)_oidPolicyConstraints,
578 sizeof(_oidPolicyConstraints) },
579 oidExtendedKeyUsage = { (DERByte *)_oidExtendedKeyUsage,
580 sizeof(_oidExtendedKeyUsage) },
581 oidAnyExtendedKeyUsage = { (DERByte *)_oidAnyExtendedKeyUsage,
582 sizeof(_oidAnyExtendedKeyUsage) },
583 oidInhibitAnyPolicy = { (DERByte *)_oidInhibitAnyPolicy,
584 sizeof(_oidInhibitAnyPolicy) },
585 oidAuthorityInfoAccess = { (DERByte *)_oidAuthorityInfoAccess,
586 sizeof(_oidAuthorityInfoAccess) },
587 oidSubjectInfoAccess = { (DERByte *)_oidSubjectInfoAccess,
588 sizeof(_oidSubjectInfoAccess) },
589 oidAdOCSP = { (DERByte *)_oidAdOCSP,
590 sizeof(_oidAdOCSP) },
591 oidAdCAIssuer = { (DERByte *)_oidAdCAIssuer,
592 sizeof(_oidAdCAIssuer) },
593 oidNetscapeCertType = { (DERByte *)_oidNetscapeCertType,
594 sizeof(_oidNetscapeCertType) },
595 oidEntrustVersInfo = { (DERByte *)_oidEntrustVersInfo,
596 sizeof(_oidEntrustVersInfo) },
597 oidMSNTPrincipalName = { (DERByte *)_oidMSNTPrincipalName,
598 sizeof(_oidMSNTPrincipalName) },
599 /* Policy Qualifier IDs for Internet policy qualifiers. */
600 oidQtCps = { (DERByte *)_oidQtCps,
601 sizeof(_oidQtCps) },
602 oidQtUNotice = { (DERByte *)_oidQtUNotice,
603 sizeof(_oidQtUNotice) },
604 /* X.501 Name IDs. */
605 oidCommonName = { (DERByte *)_oidCommonName,
606 sizeof(_oidCommonName) },
607 oidCountryName = { (DERByte *)_oidCountryName,
608 sizeof(_oidCountryName) },
609 oidLocalityName = { (DERByte *)_oidLocalityName,
610 sizeof(_oidLocalityName) },
611 oidStateOrProvinceName = { (DERByte *)_oidStateOrProvinceName,
612 sizeof(_oidStateOrProvinceName) },
613 oidOrganizationName = { (DERByte *)_oidOrganizationName,
614 sizeof(_oidOrganizationName) },
615 oidOrganizationalUnitName = { (DERByte *)_oidOrganizationalUnitName,
616 sizeof(_oidOrganizationalUnitName) },
617 oidDescription = { (DERByte *)_oidDescription,
618 sizeof(_oidDescription) },
619 oidEmailAddress = { (DERByte *)_oidEmailAddress,
620 sizeof(_oidEmailAddress) },
621 oidFriendlyName = { (DERByte *)_oidFriendlyName,
622 sizeof(_oidFriendlyName) },
623 oidLocalKeyId = { (DERByte *)_oidLocalKeyId,
624 sizeof(_oidLocalKeyId) },
625 oidExtendedKeyUsageServerAuth = { (DERByte *)_oidExtendedKeyUsageServerAuth,
626 sizeof(_oidExtendedKeyUsageServerAuth) },
627 oidExtendedKeyUsageClientAuth = { (DERByte *)_oidExtendedKeyUsageClientAuth,
628 sizeof(_oidExtendedKeyUsageClientAuth) },
629 oidExtendedKeyUsageCodeSigning = { (DERByte *)_oidExtendedKeyUsageCodeSigning,
630 sizeof(_oidExtendedKeyUsageCodeSigning) },
631 oidExtendedKeyUsageEmailProtection = { (DERByte *)_oidExtendedKeyUsageEmailProtection,
632 sizeof(_oidExtendedKeyUsageEmailProtection) },
633 oidExtendedKeyUsageTimeStamping = { (DERByte *)_oidExtendedKeyUsageTimeStamping,
634 sizeof(_oidExtendedKeyUsageTimeStamping) },
635 oidExtendedKeyUsageOCSPSigning = { (DERByte *)_oidExtendedKeyUsageOCSPSigning,
636 sizeof(_oidExtendedKeyUsageOCSPSigning) },
637 oidExtendedKeyUsageIPSec = { (DERByte *)_oidExtendedKeyUsageIPSec,
638 sizeof(_oidExtendedKeyUsageIPSec) },
639 oidExtendedKeyUsageMicrosoftSGC = { (DERByte *)_oidExtendedKeyUsageMicrosoftSGC,
640 sizeof(_oidExtendedKeyUsageMicrosoftSGC) },
641 oidExtendedKeyUsageNetscapeSGC = { (DERByte *)_oidExtendedKeyUsageNetscapeSGC,
642 sizeof(_oidExtendedKeyUsageNetscapeSGC) },
643 oidAppleSecureBootCertSpec = { (DERByte *)_oidAppleSecureBootCertSpec,
644 sizeof(_oidAppleSecureBootCertSpec) },
645 oidAppleProvisioningProfile = { (DERByte *)_oidAppleProvisioningProfile,
646 sizeof(_oidAppleProvisioningProfile) },
647 oidAppleApplicationSigning = { (DERByte *)_oidAppleApplicationSigning,
648 sizeof(_oidAppleApplicationSigning) },
649 oidAppleInstallerPackagingSigningExternal = { (DERByte *)_oidAppleInstallerPackagingSigningExternal,
650 sizeof(_oidAppleInstallerPackagingSigningExternal) },
651 oidAppleTVOSApplicationSigningProd = { (DERByte *)_oidAppleTVOSApplicationSigningProd,
652 sizeof(_oidAppleTVOSApplicationSigningProd) },
653 oidAppleTVOSApplicationSigningTest = { (DERByte *)_oidAppleTVOSApplicationSigningTest,
654 sizeof(_oidAppleTVOSApplicationSigningTest) },
655 oidAppleExtendedKeyUsageCodeSigning = { (DERByte *)_oidAppleExtendedKeyUsageCodeSigning,
656 sizeof(_oidAppleExtendedKeyUsageCodeSigning) },
657 oidAppleExtendedKeyUsageCodeSigningDev = { (DERByte *)_oidAppleExtendedKeyUsageCodeSigningDev,
658 sizeof(_oidAppleExtendedKeyUsageCodeSigningDev) },
659 oidAppleExtendedKeyUsageAppleID = { (DERByte *)_oidAppleExtendedKeyUsageAppleID,
660 sizeof(_oidAppleExtendedKeyUsageAppleID) },
661 oidAppleExtendedKeyUsagePassbook = { (DERByte *)_oidAppleExtendedKeyUsagePassbook,
662 sizeof(_oidAppleExtendedKeyUsagePassbook) },
663 oidAppleExtendedKeyUsageProfileSigning
664 = { (DERByte *)_oidAppleExtendedKeyUsageProfileSigning,
665 sizeof(_oidAppleExtendedKeyUsageProfileSigning) },
666 oidAppleExtendedKeyUsageQAProfileSigning
667 = { (DERByte *)_oidAppleExtendedKeyUsageQAProfileSigning,
668 sizeof(_oidAppleExtendedKeyUsageQAProfileSigning) },
669 oidAppleIntmMarkerAppleWWDR = { (DERByte *)_oidAppleIntmMarkerAppleWWDR,
670 sizeof(_oidAppleIntmMarkerAppleWWDR) },
671 oidAppleIntmMarkerAppleID = { (DERByte *)_oidAppleIntmMarkerAppleID,
672 sizeof(_oidAppleIntmMarkerAppleID) },
673 oidAppleIntmMarkerAppleID2 = { (DERByte *)_oidAppleIntmMarkerAppleID2,
674 sizeof(_oidAppleIntmMarkerAppleID2) },
675 oidApplePushServiceClient = { (DERByte *)_oidAppleIntmMarkerAppleID2,
676 sizeof(_oidAppleIntmMarkerAppleID2) },
677 oidApplePolicyMobileStore = { (DERByte *)_oidApplePolicyMobileStore,
678 sizeof(_oidApplePolicyMobileStore)},
679 oidApplePolicyTestMobileStore = { (DERByte *)_oidApplePolicyTestMobileStore,
680 sizeof(_oidApplePolicyTestMobileStore)},
681 oidApplePolicyEscrowService = { (DERByte *)_oidApplePolicyEscrowService,
682 sizeof(_oidApplePolicyEscrowService)},
683 oidAppleCertExtensionAppleIDRecordValidationSigning = { (DERByte *)_oidAppleCertExtensionAppleIDRecordValidationSigning,
684 sizeof(_oidAppleCertExtensionAppleIDRecordValidationSigning)},
685 oidAppleCertExtOSXProvisioningProfileSigning = { (DERByte *)_oidAppleCertExtOSXProvisioningProfileSigning,
686 sizeof(_oidAppleCertExtOSXProvisioningProfileSigning) },
687 oidAppleIntmMarkerAppleSystemIntg2 = { (DERByte *) _oidAppleIntmMarkerAppleSystemIntg2,
688 sizeof(_oidAppleIntmMarkerAppleSystemIntg2)},
689 oidAppleIntmMarkerAppleSystemIntgG3 = { (DERByte *) _oidAppleIntmMarkerAppleSystemIntgG3,
690 sizeof(_oidAppleIntmMarkerAppleSystemIntgG3)},
691 oidAppleCertExtAppleSMPEncryption = { (DERByte *)_oidAppleCertExtAppleSMPEncryption,
692 sizeof(_oidAppleCertExtAppleSMPEncryption)},
693 oidAppleCertExtAppleServerAuthentication
694 = { (DERByte *)_oidAppleCertExtAppleServerAuthentication,
695 sizeof(_oidAppleCertExtAppleServerAuthentication) },
696 oidAppleCertExtAppleServerAuthenticationIDSTest
697 = { (DERByte *)_oidAppleCertExtAppleServerAuthenticationIDSTest,
698 sizeof(_oidAppleCertExtAppleServerAuthenticationIDSTest) },
699 oidAppleCertExtAppleServerAuthenticationIDSProd
700 = { (DERByte *)_oidAppleCertExtAppleServerAuthenticationIDSProd,
701 sizeof(_oidAppleCertExtAppleServerAuthenticationIDSProd) },
702 oidAppleCertExtAppleServerAuthenticationAPNTest
703 = { (DERByte *)_oidAppleCertExtAppleServerAuthenticationAPNTest,
704 sizeof(_oidAppleCertExtAppleServerAuthenticationAPNTest) },
705 oidAppleCertExtAppleServerAuthenticationAPNProd
706 = { (DERByte *)_oidAppleCertExtAppleServerAuthenticationAPNProd,
707 sizeof(_oidAppleCertExtAppleServerAuthenticationAPNProd) },
708 oidAppleCertExtAppleServerAuthenticationGS
709 = { (DERByte *)_oidAppleCertExtAppleServerAuthenticationGS,
710 sizeof(_oidAppleCertExtAppleServerAuthenticationGS) },
711 oidAppleCertExtAppleServerAuthenticationPPQTest
712 = { (DERByte *)_oidAppleCertExtAppleServerAuthenticationPPQTest,
713 sizeof(_oidAppleCertExtAppleServerAuthenticationPPQTest) },
714 oidAppleCertExtAppleServerAuthenticationPPQProd
715 = { (DERByte *)_oidAppleCertExtAppleServerAuthenticationPPQProd,
716 sizeof(_oidAppleCertExtAppleServerAuthenticationPPQProd) },
717 oidAppleIntmMarkerAppleServerAuthentication
718 = { (DERByte *)_oidAppleIntmMarkerAppleServerAuthentication,
719 sizeof(_oidAppleIntmMarkerAppleServerAuthentication) },
720 oidAppleCertExtApplePPQSigningProd = { (DERByte *)_oidAppleCertExtApplePPQSigningProd,
721 sizeof(_oidAppleCertExtApplePPQSigningProd)},
722 oidAppleCertExtApplePPQSigningTest = { (DERByte *)_oidAppleCertExtApplePPQSigningTest,
723 sizeof(_oidAppleCertExtApplePPQSigningTest)},
724 oidGoogleEmbeddedSignedCertificateTimestamp
725 = { (DERByte *)_oidGoogleEmbeddedSignedCertificateTimestamp,
726 sizeof(_oidGoogleEmbeddedSignedCertificateTimestamp) },
727 oidGoogleOCSPSignedCertificateTimestamp
728 = { (DERByte *)_oidGoogleOCSPSignedCertificateTimestamp,
729 sizeof(_oidGoogleOCSPSignedCertificateTimestamp) },
730 oidAppleCertExtATVAppSigningProd = { (DERByte *)_oidAppleCertExtATVAppSigningProd,
731 sizeof(_oidAppleCertExtATVAppSigningProd)},
732 oidAppleCertExtATVAppSigningTest = { (DERByte *)_oidAppleCertExtATVAppSigningTest,
733 sizeof(_oidAppleCertExtATVAppSigningTest)},
734 oidAppleCertExtATVVPNProfileSigning = { (DERByte *) _oidAppleCertExtATVVPNProfileSigning,
735 sizeof(_oidAppleCertExtATVVPNProfileSigning)},
736 oidAppleCertExtCryptoServicesExtEncryption = { (DERByte *)_oidAppleCertExtCryptoServicesExtEncryption,
737 sizeof(_oidAppleCertExtCryptoServicesExtEncryption)},
738 oidAppleCertExtAST2DiagnosticsServerAuthTest = { (DERByte *)_oidAppleCertExtAST2DiagnosticsServerAuthTest,
739 sizeof(_oidAppleCertExtAST2DiagnosticsServerAuthTest)},
740 oidAppleCertExtAST2DiagnosticsServerAuthProd = { (DERByte *)_oidAppleCertExtAST2DiagnosticsServerAuthProd,
741 sizeof(_oidAppleCertExtAST2DiagnosticsServerAuthProd)};
742
743
744
745
746 bool DEROidCompare(const DERItem *oid1, const DERItem *oid2) {
747 if ((oid1 == NULL) || (oid2 == NULL)) {
748 return false;
749 }
750 if (oid1->length != oid2->length) {
751 return false;
752 }
753 if (!DERMemcmp(oid1->data, oid2->data, oid1->length)) {
754 return true;
755 } else {
756 return false;
757 }
758 }