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