]> git.saurik.com Git - apple/security.git/blob - OSX/libsecurity_keychain/libDER/libDER/oids.c
23c70d05437c3a850628f4a27d02e2027e4b82a4
[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 /*
314 * Netscape OIDs.
315 */
316 #define NETSCAPE_BASE_OID 0x60, 0x86, 0x48, 0x01, 0x86, 0xf8, 0x42
317
318 /*
319 * Netscape cert extension.
320 *
321 * netscape-cert-extension OBJECT IDENTIFIER ::=
322 * { 2 16 840 1 113730 1 }
323 *
324 * BER = 06 08 60 86 48 01 86 F8 42 01
325 */
326 #define NETSCAPE_CERT_EXTEN NETSCAPE_BASE_OID, 0x01
327
328 #define NETSCAPE_CERT_POLICY NETSCAPE_BASE_OID, 0x04
329
330 /* Entrust OIDs. */
331 #define ENTRUST_BASE_OID OID_US, 0x86, 0xf6, 0x7d
332
333 /*
334 * Entrust cert extension.
335 *
336 * entrust-cert-extension OBJECT IDENTIFIER ::=
337 * { 1 2 840 113533 7 65 }
338 *
339 * BER = 06 08 2A 86 48 86 F6 7D 07 41
340 */
341 #define ENTRUST_CERT_EXTEN ENTRUST_BASE_OID, 0x07, 0x41
342
343 /* Microsoft OIDs. */
344 #define MICROSOFT_BASE_OID OID_DOD, 0x01, 0x04, 0x01, 0x82, 0x37
345 #define MICROSOFT_ENROLLMENT_OID MICROSOFT_BASE_OID, 0x14
346
347 /* Google OIDs: 1.3.6.1.4.1.11129.
348 */
349 #define GOOGLE_BASE_OID OID_DOD, 0x01, 0x04, 0x01, 0xD6, 0x79
350 #define GOOGLE_EMBEDDED_SCT_OID GOOGLE_BASE_OID, 0x02, 0x04, 0x02
351 #define GOOGLE_OCSP_SCT_OID GOOGLE_BASE_OID, 0x02, 0x04, 0x05
352
353
354 /* Algorithm OIDs. */
355 static const DERByte
356 _oidRsa[] = { OID_PKCS_1, 1 },
357 _oidMd2Rsa[] = { OID_PKCS_1, 2 },
358 _oidMd4Rsa[] = { OID_PKCS_1, 3 },
359 _oidMd5Rsa[] = { OID_PKCS_1, 4 },
360 _oidSha1Rsa[] = { OID_PKCS_1, 5 },
361 _oidSha256Rsa[] = { OID_PKCS_1, 11 },
362 _oidSha384Rsa[] = { OID_PKCS_1, 12 },
363 _oidSha512Rsa[] = { OID_PKCS_1, 13 },
364 _oidSha224Rsa[] = { OID_PKCS_1, 14 },
365 _oidEcPubKey[] = { OID_PUBLIC_KEY_TYPE, 1 },
366 _oidSha1Ecdsa[] = { OID_EC_SIG_TYPE, 1 }, /* rfc3279 */
367 _oidSha224Ecdsa[] = { OID_ECDSA_WITH_SHA2, 1 }, /* rfc5758 */
368 _oidSha256Ecdsa[] = { OID_ECDSA_WITH_SHA2, 2 }, /* rfc5758 */
369 _oidSha384Ecdsa[] = { OID_ECDSA_WITH_SHA2, 3 }, /* rfc5758 */
370 _oidSha512Ecdsa[] = { OID_ECDSA_WITH_SHA2, 4 }, /* rfc5758 */
371 _oidSha1Dsa[] = { OID_ANSI_X9_57_ALGORITHM, 3 },
372 _oidMd2[] = { OID_RSA_HASH, 2 },
373 _oidMd4[] = { OID_RSA_HASH, 4 },
374 _oidMd5[] = { OID_RSA_HASH, 5 },
375 _oidSha1[] = { OID_OIW_ALGORITHM, 26 },
376 _oidSha1DsaOIW[] = { OID_OIW_ALGORITHM, 27 },
377 _oidSha1DsaCommonOIW[] = { OID_OIW_ALGORITHM, 28 },
378 _oidSha1RsaOIW[] = { OID_OIW_ALGORITHM, 29 },
379 _oidSha256[] = { OID_NIST_HASHALG, 1 },
380 _oidSha384[] = { OID_NIST_HASHALG, 2 },
381 _oidSha512[] = { OID_NIST_HASHALG, 3 },
382 _oidSha224[] = { OID_NIST_HASHALG, 4 },
383 _oidFee[] = { APPLE_ALG_OID, 1 },
384 _oidMd5Fee[] = { APPLE_ALG_OID, 3 },
385 _oidSha1Fee[] = { APPLE_ALG_OID, 4 };
386
387 const DERItem
388 oidRsa = { (DERByte *)_oidRsa,
389 sizeof(_oidRsa) },
390 oidMd2Rsa = { (DERByte *)_oidMd2Rsa,
391 sizeof(_oidMd2Rsa) },
392 oidMd4Rsa = { (DERByte *)_oidMd4Rsa,
393 sizeof(_oidMd4Rsa) },
394 oidMd5Rsa = { (DERByte *)_oidMd5Rsa,
395 sizeof(_oidMd5Rsa) },
396 oidSha1Rsa = { (DERByte *)_oidSha1Rsa,
397 sizeof(_oidSha1Rsa) },
398 oidSha256Rsa = { (DERByte *)_oidSha256Rsa,
399 sizeof(_oidSha256Rsa) },
400 oidSha384Rsa = { (DERByte *)_oidSha384Rsa,
401 sizeof(_oidSha384Rsa) },
402 oidSha512Rsa = { (DERByte *)_oidSha512Rsa,
403 sizeof(_oidSha512Rsa) },
404 oidSha224Rsa = { (DERByte *)_oidSha224Rsa,
405 sizeof(_oidSha224Rsa) },
406 oidEcPubKey = { (DERByte *)_oidEcPubKey,
407 sizeof(_oidEcPubKey) },
408 oidSha1Ecdsa = { (DERByte *)_oidSha1Ecdsa,
409 sizeof(_oidSha1Ecdsa) },
410 oidSha224Ecdsa = { (DERByte *)_oidSha224Ecdsa,
411 sizeof(_oidSha224Ecdsa) },
412 oidSha256Ecdsa = { (DERByte *)_oidSha256Ecdsa,
413 sizeof(_oidSha256Ecdsa) },
414 oidSha384Ecdsa = { (DERByte *)_oidSha384Ecdsa,
415 sizeof(_oidSha384Ecdsa) },
416 oidSha512Ecdsa = { (DERByte *)_oidSha512Ecdsa,
417 sizeof(_oidSha512Ecdsa) },
418 oidSha1Dsa = { (DERByte *)_oidSha1Dsa,
419 sizeof(_oidSha1Dsa) },
420 oidMd2 = { (DERByte *)_oidMd2,
421 sizeof(_oidMd2) },
422 oidMd4 = { (DERByte *)_oidMd4,
423 sizeof(_oidMd4) },
424 oidMd5 = { (DERByte *)_oidMd5,
425 sizeof(_oidMd5) },
426 oidSha1 = { (DERByte *)_oidSha1,
427 sizeof(_oidSha1) },
428 oidSha1RsaOIW = { (DERByte *)_oidSha1RsaOIW,
429 sizeof(_oidSha1RsaOIW) },
430 oidSha1DsaOIW = { (DERByte *)_oidSha1DsaOIW,
431 sizeof(_oidSha1DsaOIW) },
432 oidSha1DsaCommonOIW = { (DERByte *)_oidSha1DsaCommonOIW,
433 sizeof(_oidSha1DsaCommonOIW) },
434 oidSha256 = { (DERByte *)_oidSha256,
435 sizeof(_oidSha256) },
436 oidSha384 = { (DERByte *)_oidSha384,
437 sizeof(_oidSha384) },
438 oidSha512 = { (DERByte *)_oidSha512,
439 sizeof(_oidSha512) },
440 oidSha224 = { (DERByte *)_oidSha224,
441 sizeof(_oidSha224) },
442 oidFee = { (DERByte *)_oidFee,
443 sizeof(_oidFee) },
444 oidMd5Fee = { (DERByte *)_oidMd5Fee,
445 sizeof(_oidMd5Fee) },
446 oidSha1Fee = { (DERByte *)_oidSha1Fee,
447 sizeof(_oidSha1Fee) };
448
449
450 /* Extension OIDs. */
451 __unused static const DERByte
452 _oidSubjectKeyIdentifier[] = { OID_EXTENSION, 14 },
453 _oidKeyUsage[] = { OID_EXTENSION, 15 },
454 _oidPrivateKeyUsagePeriod[] = { OID_EXTENSION, 16 },
455 _oidSubjectAltName[] = { OID_EXTENSION, 17 },
456 _oidIssuerAltName[] = { OID_EXTENSION, 18 },
457 _oidBasicConstraints[] = { OID_EXTENSION, 19 },
458 _oidNameConstraints[] = { OID_EXTENSION, 30 },
459 _oidCrlDistributionPoints[] = { OID_EXTENSION, 31 },
460 _oidCertificatePolicies[] = { OID_EXTENSION, 32 },
461 _oidAnyPolicy[] = { OID_EXTENSION, 32, 0 },
462 _oidPolicyMappings[] = { OID_EXTENSION, 33 },
463 _oidAuthorityKeyIdentifier[] = { OID_EXTENSION, 35 },
464 _oidPolicyConstraints[] = { OID_EXTENSION, 36 },
465 _oidExtendedKeyUsage[] = { OID_EXTENSION, 37 },
466 _oidAnyExtendedKeyUsage[] = { OID_EXTENSION, 37, 0 },
467 _oidInhibitAnyPolicy[] = { OID_EXTENSION, 54 },
468 _oidAuthorityInfoAccess[] = { OID_PE, 1 },
469 _oidSubjectInfoAccess[] = { OID_PE, 11 },
470 _oidAdOCSP[] = { OID_AD_OCSP },
471 _oidAdCAIssuer[] = { OID_AD_CAISSUERS },
472 _oidNetscapeCertType[] = { NETSCAPE_CERT_EXTEN, 1 },
473 _oidEntrustVersInfo[] = { ENTRUST_CERT_EXTEN, 0 },
474 _oidMSNTPrincipalName[] = { MICROSOFT_ENROLLMENT_OID, 2, 3 },
475 /* Policy Qualifier IDs for Internet policy qualifiers. */
476 _oidQtCps[] = { OID_QT, 1 },
477 _oidQtUNotice[] = { OID_QT, 2 },
478 /* X.501 Name IDs. */
479 _oidCommonName[] = { OID_ATTR_TYPE, 3 },
480 _oidCountryName[] = { OID_ATTR_TYPE, 6 },
481 _oidLocalityName[] = { OID_ATTR_TYPE, 7 },
482 _oidStateOrProvinceName[] = { OID_ATTR_TYPE, 8 },
483 _oidOrganizationName[] = { OID_ATTR_TYPE, 10 },
484 _oidOrganizationalUnitName[] = { OID_ATTR_TYPE, 11 },
485 _oidDescription[] = { OID_ATTR_TYPE, 13 },
486 _oidEmailAddress[] = { OID_PKCS_9, 1 },
487 _oidFriendlyName[] = { OID_PKCS_9, 20 },
488 _oidLocalKeyId[] = { OID_PKCS_9, 21 },
489 _oidExtendedKeyUsageServerAuth[] = { OID_KP, 1 },
490 _oidExtendedKeyUsageClientAuth[] = { OID_KP, 2 },
491 _oidExtendedKeyUsageCodeSigning[] = { OID_KP, 3 },
492 _oidExtendedKeyUsageEmailProtection[] = { OID_KP, 4 },
493 _oidExtendedKeyUsageTimeStamping[] = { OID_KP, 8 },
494 _oidExtendedKeyUsageOCSPSigning[] = { OID_KP, 9 },
495 _oidExtendedKeyUsageIPSec[] = { OID_ISAKMP, 2, 2 },
496 _oidExtendedKeyUsageMicrosoftSGC[] = { MICROSOFT_BASE_OID, 10, 3, 3 },
497 _oidExtendedKeyUsageNetscapeSGC[] = { NETSCAPE_CERT_POLICY, 1 },
498 _oidAppleSecureBootCertSpec[] = { APPLE_SBOOT_CERT_EXTEN_SBOOT_SPEC_OID },
499 _oidAppleProvisioningProfile[] = {APPLE_PROVISIONING_PROFILE_OID },
500 _oidAppleApplicationSigning[] = { APPLE_APP_SIGNING_OID },
501 _oidAppleInstallerPackagingSigningExternal[] = { APPLE_INSTALLER_PACKAGE_SIGNING_EXTERNAL_OID },
502 _oidAppleTVOSApplicationSigningProd[] = { APPLE_TVOS_APP_SIGNING_PROD_OID },
503 _oidAppleTVOSApplicationSigningTest[] = { APPLE_TVOS_APP_SIGNING_TEST_OID },
504 _oidAppleExtendedKeyUsageCodeSigning[] = { APPLE_EKU_CODE_SIGNING },
505 _oidAppleExtendedKeyUsageCodeSigningDev[] = { APPLE_EKU_CODE_SIGNING, 1 },
506 _oidAppleExtendedKeyUsageAppleID[] = { APPLE_EKU_APPLE_ID },
507 _oidAppleExtendedKeyUsagePassbook[] = { APPLE_EKU_PASSBOOK },
508 _oidAppleExtendedKeyUsageProfileSigning[] = { APPLE_EKU_PROFILE_SIGNING },
509 _oidAppleExtendedKeyUsageQAProfileSigning[] = { APPLE_EKU_QA_PROFILE_SIGNING },
510 _oidAppleIntmMarkerAppleWWDR[] = { APPLE_CERT_EXT_INTERMEDIATE_MARKER_WWDR },
511 _oidAppleIntmMarkerAppleID[] = { APPLE_CERT_EXT_INTERMEDIATE_MARKER_APPLEID },
512 _oidAppleIntmMarkerAppleID2[] = {APPLE_CERT_EXT_INTERMEDIATE_MARKER_APPLEID_2 },
513 _oidApplePushServiceClient[] = { APPLE_CERT_EXT_APPLE_PUSH_MARKER, 2 },
514 _oidApplePolicyMobileStore[] = { APPLE_CERT_POLICY_MOBILE_STORE },
515 _oidApplePolicyTestMobileStore[] = { APPLE_CERT_POLICY_TEST_MOBILE_STORE },
516 _oidApplePolicyEscrowService[] = { APPLE_ESCROW_POLICY_OID },
517 _oidAppleCertExtensionAppleIDRecordValidationSigning[] = { APPLE_CERT_EXT_APPLE_ID_VALIDATION_RECORD_SIGNING },
518 _oidAppleCertExtOSXProvisioningProfileSigning[] = { APPLE_CERT_EXT_OSX_PROVISIONING_PROFILE_SIGNING },
519 _oidAppleIntmMarkerAppleSystemIntg2[] = {APPLE_CERT_EXT_INTERMEDIATE_MARKER_APPLEID_SYSTEM_INTEGRATION_2},
520 _oidAppleIntmMarkerAppleSystemIntgG3[] = {APPLE_CERT_EXT_INTERMEDIATE_MARKER_APPLEID_SYSTEM_INTEGRATION_G3},
521 _oidAppleCertExtAppleSMPEncryption[] = {APPLE_CERT_EXT_APPLE_SMP_ENCRYPTION},
522 _oidAppleCertExtAppleServerAuthentication[] = {APPLE_CERT_EXT_APPLE_SERVER_AUTHENTICATION},
523 _oidAppleCertExtAppleServerAuthenticationPPQTest[] = {APPLE_CERT_EXT_APPLE_SERVER_AUTHENTICATION_PPQ_TEST},
524 _oidAppleCertExtAppleServerAuthenticationPPQProd[] = {APPLE_CERT_EXT_APPLE_SERVER_AUTHENTICATION_PPQ_PROD},
525 _oidAppleCertExtAppleServerAuthenticationIDSTest[] = {APPLE_CERT_EXT_APPLE_SERVER_AUTHENTICATION_IDS_TEST},
526 _oidAppleCertExtAppleServerAuthenticationIDSProd[] = {APPLE_CERT_EXT_APPLE_SERVER_AUTHENTICATION_IDS_PROD},
527 _oidAppleCertExtAppleServerAuthenticationAPNTest[] = {APPLE_CERT_EXT_APPLE_SERVER_AUTHENTICATION_APN_TEST},
528 _oidAppleCertExtAppleServerAuthenticationAPNProd[] = {APPLE_CERT_EXT_APPLE_SERVER_AUTHENTICATION_APN_PROD},
529 _oidAppleCertExtAppleServerAuthenticationGS[] = {APPLE_CERT_EXT_APPLE_SERVER_AUTHENTICATION_GS},
530 _oidAppleIntmMarkerAppleServerAuthentication[] = {APPLE_CERT_EXT_INTERMEDIATE_MARKER_APPLE_SERVER_AUTHENTICATION},
531 _oidAppleCertExtApplePPQSigningTest[] = {APPLE_CERT_EXT_APPLE_PPQ_SIGNING_TEST},
532 _oidAppleCertExtApplePPQSigningProd[] = {APPLE_CERT_EXT_APPLE_PPQ_SIGNING_PROD},
533 _oidGoogleEmbeddedSignedCertificateTimestamp[] = {GOOGLE_EMBEDDED_SCT_OID},
534 _oidGoogleOCSPSignedCertificateTimestamp[] = {GOOGLE_OCSP_SCT_OID},
535 _oidAppleCertExtATVAppSigningTest[] = {APPLE_ATV_APP_SIGNING_OID_TEST},
536 _oidAppleCertExtATVAppSigningProd[] = {APPLE_ATV_APP_SIGNING_OID},
537 _oidAppleCertExtCryptoServicesExtEncryption[] = {APPLE_CERT_EXT_CRYPTO_SERVICES_EXT_ENCRYPTION};
538
539 __unused const DERItem
540 oidSubjectKeyIdentifier = { (DERByte *)_oidSubjectKeyIdentifier,
541 sizeof(_oidSubjectKeyIdentifier) },
542 oidKeyUsage = { (DERByte *)_oidKeyUsage,
543 sizeof(_oidKeyUsage) },
544 oidPrivateKeyUsagePeriod = { (DERByte *)_oidPrivateKeyUsagePeriod,
545 sizeof(_oidPrivateKeyUsagePeriod) },
546 oidSubjectAltName = { (DERByte *)_oidSubjectAltName,
547 sizeof(_oidSubjectAltName) },
548 oidIssuerAltName = { (DERByte *)_oidIssuerAltName,
549 sizeof(_oidIssuerAltName) },
550 oidBasicConstraints = { (DERByte *)_oidBasicConstraints,
551 sizeof(_oidBasicConstraints) },
552 oidNameConstraints = { (DERByte *)_oidNameConstraints,
553 sizeof(_oidNameConstraints) },
554 oidCrlDistributionPoints = { (DERByte *)_oidCrlDistributionPoints,
555 sizeof(_oidCrlDistributionPoints) },
556 oidCertificatePolicies = { (DERByte *)_oidCertificatePolicies,
557 sizeof(_oidCertificatePolicies) },
558 oidAnyPolicy = { (DERByte *)_oidAnyPolicy,
559 sizeof(_oidAnyPolicy) },
560 oidPolicyMappings = { (DERByte *)_oidPolicyMappings,
561 sizeof(_oidPolicyMappings) },
562 oidAuthorityKeyIdentifier = { (DERByte *)_oidAuthorityKeyIdentifier,
563 sizeof(_oidAuthorityKeyIdentifier) },
564 oidPolicyConstraints = { (DERByte *)_oidPolicyConstraints,
565 sizeof(_oidPolicyConstraints) },
566 oidExtendedKeyUsage = { (DERByte *)_oidExtendedKeyUsage,
567 sizeof(_oidExtendedKeyUsage) },
568 oidAnyExtendedKeyUsage = { (DERByte *)_oidAnyExtendedKeyUsage,
569 sizeof(_oidAnyExtendedKeyUsage) },
570 oidInhibitAnyPolicy = { (DERByte *)_oidInhibitAnyPolicy,
571 sizeof(_oidInhibitAnyPolicy) },
572 oidAuthorityInfoAccess = { (DERByte *)_oidAuthorityInfoAccess,
573 sizeof(_oidAuthorityInfoAccess) },
574 oidSubjectInfoAccess = { (DERByte *)_oidSubjectInfoAccess,
575 sizeof(_oidSubjectInfoAccess) },
576 oidAdOCSP = { (DERByte *)_oidAdOCSP,
577 sizeof(_oidAdOCSP) },
578 oidAdCAIssuer = { (DERByte *)_oidAdCAIssuer,
579 sizeof(_oidAdCAIssuer) },
580 oidNetscapeCertType = { (DERByte *)_oidNetscapeCertType,
581 sizeof(_oidNetscapeCertType) },
582 oidEntrustVersInfo = { (DERByte *)_oidEntrustVersInfo,
583 sizeof(_oidEntrustVersInfo) },
584 oidMSNTPrincipalName = { (DERByte *)_oidMSNTPrincipalName,
585 sizeof(_oidMSNTPrincipalName) },
586 /* Policy Qualifier IDs for Internet policy qualifiers. */
587 oidQtCps = { (DERByte *)_oidQtCps,
588 sizeof(_oidQtCps) },
589 oidQtUNotice = { (DERByte *)_oidQtUNotice,
590 sizeof(_oidQtUNotice) },
591 /* X.501 Name IDs. */
592 oidCommonName = { (DERByte *)_oidCommonName,
593 sizeof(_oidCommonName) },
594 oidCountryName = { (DERByte *)_oidCountryName,
595 sizeof(_oidCountryName) },
596 oidLocalityName = { (DERByte *)_oidLocalityName,
597 sizeof(_oidLocalityName) },
598 oidStateOrProvinceName = { (DERByte *)_oidStateOrProvinceName,
599 sizeof(_oidStateOrProvinceName) },
600 oidOrganizationName = { (DERByte *)_oidOrganizationName,
601 sizeof(_oidOrganizationName) },
602 oidOrganizationalUnitName = { (DERByte *)_oidOrganizationalUnitName,
603 sizeof(_oidOrganizationalUnitName) },
604 oidDescription = { (DERByte *)_oidDescription,
605 sizeof(_oidDescription) },
606 oidEmailAddress = { (DERByte *)_oidEmailAddress,
607 sizeof(_oidEmailAddress) },
608 oidFriendlyName = { (DERByte *)_oidFriendlyName,
609 sizeof(_oidFriendlyName) },
610 oidLocalKeyId = { (DERByte *)_oidLocalKeyId,
611 sizeof(_oidLocalKeyId) },
612 oidExtendedKeyUsageServerAuth = { (DERByte *)_oidExtendedKeyUsageServerAuth,
613 sizeof(_oidExtendedKeyUsageServerAuth) },
614 oidExtendedKeyUsageClientAuth = { (DERByte *)_oidExtendedKeyUsageClientAuth,
615 sizeof(_oidExtendedKeyUsageClientAuth) },
616 oidExtendedKeyUsageCodeSigning = { (DERByte *)_oidExtendedKeyUsageCodeSigning,
617 sizeof(_oidExtendedKeyUsageCodeSigning) },
618 oidExtendedKeyUsageEmailProtection = { (DERByte *)_oidExtendedKeyUsageEmailProtection,
619 sizeof(_oidExtendedKeyUsageEmailProtection) },
620 oidExtendedKeyUsageTimeStamping = { (DERByte *)_oidExtendedKeyUsageTimeStamping,
621 sizeof(_oidExtendedKeyUsageTimeStamping) },
622 oidExtendedKeyUsageOCSPSigning = { (DERByte *)_oidExtendedKeyUsageOCSPSigning,
623 sizeof(_oidExtendedKeyUsageOCSPSigning) },
624 oidExtendedKeyUsageIPSec = { (DERByte *)_oidExtendedKeyUsageIPSec,
625 sizeof(_oidExtendedKeyUsageIPSec) },
626 oidExtendedKeyUsageMicrosoftSGC = { (DERByte *)_oidExtendedKeyUsageMicrosoftSGC,
627 sizeof(_oidExtendedKeyUsageMicrosoftSGC) },
628 oidExtendedKeyUsageNetscapeSGC = { (DERByte *)_oidExtendedKeyUsageNetscapeSGC,
629 sizeof(_oidExtendedKeyUsageNetscapeSGC) },
630 oidAppleSecureBootCertSpec = { (DERByte *)_oidAppleSecureBootCertSpec,
631 sizeof(_oidAppleSecureBootCertSpec) },
632 oidAppleProvisioningProfile = { (DERByte *)_oidAppleProvisioningProfile,
633 sizeof(_oidAppleProvisioningProfile) },
634 oidAppleApplicationSigning = { (DERByte *)_oidAppleApplicationSigning,
635 sizeof(_oidAppleApplicationSigning) },
636 oidAppleInstallerPackagingSigningExternal = { (DERByte *)_oidAppleInstallerPackagingSigningExternal,
637 sizeof(_oidAppleInstallerPackagingSigningExternal) },
638 oidAppleTVOSApplicationSigningProd = { (DERByte *)_oidAppleTVOSApplicationSigningProd,
639 sizeof(_oidAppleTVOSApplicationSigningProd) },
640 oidAppleTVOSApplicationSigningTest = { (DERByte *)_oidAppleTVOSApplicationSigningTest,
641 sizeof(_oidAppleTVOSApplicationSigningTest) },
642 oidAppleExtendedKeyUsageCodeSigning = { (DERByte *)_oidAppleExtendedKeyUsageCodeSigning,
643 sizeof(_oidAppleExtendedKeyUsageCodeSigning) },
644 oidAppleExtendedKeyUsageCodeSigningDev = { (DERByte *)_oidAppleExtendedKeyUsageCodeSigningDev,
645 sizeof(_oidAppleExtendedKeyUsageCodeSigningDev) },
646 oidAppleExtendedKeyUsageAppleID = { (DERByte *)_oidAppleExtendedKeyUsageAppleID,
647 sizeof(_oidAppleExtendedKeyUsageAppleID) },
648 oidAppleExtendedKeyUsagePassbook = { (DERByte *)_oidAppleExtendedKeyUsagePassbook,
649 sizeof(_oidAppleExtendedKeyUsagePassbook) },
650 oidAppleExtendedKeyUsageProfileSigning
651 = { (DERByte *)_oidAppleExtendedKeyUsageProfileSigning,
652 sizeof(_oidAppleExtendedKeyUsageProfileSigning) },
653 oidAppleExtendedKeyUsageQAProfileSigning
654 = { (DERByte *)_oidAppleExtendedKeyUsageQAProfileSigning,
655 sizeof(_oidAppleExtendedKeyUsageQAProfileSigning) },
656 oidAppleIntmMarkerAppleWWDR = { (DERByte *)_oidAppleIntmMarkerAppleWWDR,
657 sizeof(_oidAppleIntmMarkerAppleWWDR) },
658 oidAppleIntmMarkerAppleID = { (DERByte *)_oidAppleIntmMarkerAppleID,
659 sizeof(_oidAppleIntmMarkerAppleID) },
660 oidAppleIntmMarkerAppleID2 = { (DERByte *)_oidAppleIntmMarkerAppleID2,
661 sizeof(_oidAppleIntmMarkerAppleID2) },
662 oidApplePushServiceClient = { (DERByte *)_oidAppleIntmMarkerAppleID2,
663 sizeof(_oidAppleIntmMarkerAppleID2) },
664 oidApplePolicyMobileStore = { (DERByte *)_oidApplePolicyMobileStore,
665 sizeof(_oidApplePolicyMobileStore)},
666 oidApplePolicyTestMobileStore = { (DERByte *)_oidApplePolicyTestMobileStore,
667 sizeof(_oidApplePolicyTestMobileStore)},
668 oidApplePolicyEscrowService = { (DERByte *)_oidApplePolicyEscrowService,
669 sizeof(_oidApplePolicyEscrowService)},
670 oidAppleCertExtensionAppleIDRecordValidationSigning = { (DERByte *)_oidAppleCertExtensionAppleIDRecordValidationSigning,
671 sizeof(_oidAppleCertExtensionAppleIDRecordValidationSigning)},
672 oidAppleCertExtOSXProvisioningProfileSigning = { (DERByte *)_oidAppleCertExtOSXProvisioningProfileSigning,
673 sizeof(_oidAppleCertExtOSXProvisioningProfileSigning) },
674 oidAppleIntmMarkerAppleSystemIntg2 = { (DERByte *) _oidAppleIntmMarkerAppleSystemIntg2,
675 sizeof(_oidAppleIntmMarkerAppleSystemIntg2)},
676 oidAppleIntmMarkerAppleSystemIntgG3 = { (DERByte *) _oidAppleIntmMarkerAppleSystemIntgG3,
677 sizeof(_oidAppleIntmMarkerAppleSystemIntgG3)},
678 oidAppleCertExtAppleSMPEncryption = { (DERByte *)_oidAppleCertExtAppleSMPEncryption,
679 sizeof(_oidAppleCertExtAppleSMPEncryption)},
680 oidAppleCertExtAppleServerAuthentication
681 = { (DERByte *)_oidAppleCertExtAppleServerAuthentication,
682 sizeof(_oidAppleCertExtAppleServerAuthentication) },
683 oidAppleCertExtAppleServerAuthenticationIDSTest
684 = { (DERByte *)_oidAppleCertExtAppleServerAuthenticationIDSTest,
685 sizeof(_oidAppleCertExtAppleServerAuthenticationIDSTest) },
686 oidAppleCertExtAppleServerAuthenticationIDSProd
687 = { (DERByte *)_oidAppleCertExtAppleServerAuthenticationIDSProd,
688 sizeof(_oidAppleCertExtAppleServerAuthenticationIDSProd) },
689 oidAppleCertExtAppleServerAuthenticationAPNTest
690 = { (DERByte *)_oidAppleCertExtAppleServerAuthenticationAPNTest,
691 sizeof(_oidAppleCertExtAppleServerAuthenticationAPNTest) },
692 oidAppleCertExtAppleServerAuthenticationAPNProd
693 = { (DERByte *)_oidAppleCertExtAppleServerAuthenticationAPNProd,
694 sizeof(_oidAppleCertExtAppleServerAuthenticationAPNProd) },
695 oidAppleCertExtAppleServerAuthenticationGS
696 = { (DERByte *)_oidAppleCertExtAppleServerAuthenticationGS,
697 sizeof(_oidAppleCertExtAppleServerAuthenticationGS) },
698 oidAppleCertExtAppleServerAuthenticationPPQTest
699 = { (DERByte *)_oidAppleCertExtAppleServerAuthenticationPPQTest,
700 sizeof(_oidAppleCertExtAppleServerAuthenticationPPQTest) },
701 oidAppleCertExtAppleServerAuthenticationPPQProd
702 = { (DERByte *)_oidAppleCertExtAppleServerAuthenticationPPQProd,
703 sizeof(_oidAppleCertExtAppleServerAuthenticationPPQProd) },
704 oidAppleIntmMarkerAppleServerAuthentication
705 = { (DERByte *)_oidAppleIntmMarkerAppleServerAuthentication,
706 sizeof(_oidAppleIntmMarkerAppleServerAuthentication) },
707 oidAppleCertExtApplePPQSigningProd = { (DERByte *)_oidAppleCertExtApplePPQSigningProd,
708 sizeof(_oidAppleCertExtApplePPQSigningProd)},
709 oidAppleCertExtApplePPQSigningTest = { (DERByte *)_oidAppleCertExtApplePPQSigningTest,
710 sizeof(_oidAppleCertExtApplePPQSigningTest)},
711 oidGoogleEmbeddedSignedCertificateTimestamp
712 = { (DERByte *)_oidGoogleEmbeddedSignedCertificateTimestamp,
713 sizeof(_oidGoogleEmbeddedSignedCertificateTimestamp) },
714 oidGoogleOCSPSignedCertificateTimestamp
715 = { (DERByte *)_oidGoogleOCSPSignedCertificateTimestamp,
716 sizeof(_oidGoogleOCSPSignedCertificateTimestamp) },
717 oidAppleCertExtATVAppSigningProd = { (DERByte *)_oidAppleCertExtATVAppSigningProd,
718 sizeof(_oidAppleCertExtATVAppSigningProd)},
719 oidAppleCertExtATVAppSigningTest = { (DERByte *)_oidAppleCertExtATVAppSigningTest,
720 sizeof(_oidAppleCertExtATVAppSigningTest)},
721 oidAppleCertExtCryptoServicesExtEncryption = { (DERByte *)_oidAppleCertExtCryptoServicesExtEncryption,
722 sizeof(_oidAppleCertExtCryptoServicesExtEncryption)};
723
724
725
726
727 bool DEROidCompare(const DERItem *oid1, const DERItem *oid2) {
728 if ((oid1 == NULL) || (oid2 == NULL)) {
729 return false;
730 }
731 if (oid1->length != oid2->length) {
732 return false;
733 }
734 if (!DERMemcmp(oid1->data, oid2->data, oid1->length)) {
735 return true;
736 } else {
737 return false;
738 }
739 }