]> git.saurik.com Git - apple/security.git/blob - trust/oids.h
Security-58286.240.4.tar.gz
[apple/security.git] / trust / oids.h
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.h - declaration of OID consts
27 *
28 */
29
30 #ifndef _SECURITY_OIDS_H_
31 #define _SECURITY_OIDS_H_
32
33 #include <stdint.h>
34 #include <string.h>
35
36 __BEGIN_DECLS
37
38 /* This is a subset of libDER's oids.h. If the types header has
39 * already been included, we should skip these typedef declarations. */
40 #ifndef _LIB_DER_H_
41 /*
42 * Basic data types
43 */
44 typedef uint8_t DERByte;
45 typedef size_t DERSize;
46
47 /*
48 * Primary representation of a block of memory.
49 */
50 typedef struct {
51 DERByte *data;
52 DERSize length;
53 } DERItem;
54 #endif /* _LIB_DER_H_ */
55
56 /* Algorithm oids. */
57 extern const DERItem
58 oidRsa, /* PKCS1 RSA encryption, used to identify RSA keys */
59 oidMd2Rsa, /* PKCS1 md2withRSAEncryption signature alg */
60 oidMd4Rsa, /* PKCS1 md4withRSAEncryption signature alg */
61 oidMd5Rsa, /* PKCS1 md5withRSAEncryption signature alg */
62 oidSha1Rsa, /* PKCS1 sha1withRSAEncryption signature alg */
63 oidSha256Rsa, /* PKCS1 sha256WithRSAEncryption signature alg */
64 oidSha384Rsa, /* PKCS1 sha384WithRSAEncryption signature alg */
65 oidSha512Rsa, /* PKCS1 sha512WithRSAEncryption signature alg */
66 oidSha224Rsa, /* PKCS1 sha224WithRSAEncryption signature alg */
67 oidEcPubKey, /* ECDH or ECDSA public key in a certificate */
68 oidSha1Ecdsa, /* ECDSA with SHA1 signature alg */
69 oidSha224Ecdsa, /* ECDSA with SHA224 signature alg */
70 oidSha256Ecdsa, /* ECDSA with SHA256 signature alg */
71 oidSha384Ecdsa, /* ECDSA with SHA384 signature alg */
72 oidSha512Ecdsa, /* ECDSA with SHA512 signature alg */
73 oidSha1Dsa, /* ANSI X9.57 DSA with SHA1 signature alg */
74 oidMd2, /* OID_RSA_HASH 2 */
75 oidMd4, /* OID_RSA_HASH 4 */
76 oidMd5, /* OID_RSA_HASH 5 */
77 oidSha1, /* OID_OIW_ALGORITHM 26 */
78 oidSha1DsaOIW, /* OID_OIW_ALGORITHM 27 */
79 oidSha1DsaCommonOIW,/* OID_OIW_ALGORITHM 28 */
80 oidSha1RsaOIW, /* OID_OIW_ALGORITHM 29 */
81 oidSha256, /* OID_NIST_HASHALG 1 */
82 oidSha384, /* OID_NIST_HASHALG 2 */
83 oidSha512, /* OID_NIST_HASHALG 3 */
84 oidSha224, /* OID_NIST_HASHALG 4 */
85 oidFee, /* APPLE_ALG_OID 1 */
86 oidMd5Fee, /* APPLE_ALG_OID 3 */
87 oidSha1Fee, /* APPLE_ALG_OID 4 */
88 oidEcPrime192v1, /* OID_EC_CURVE 1 prime192v1/secp192r1/ansiX9p192r1*/
89 oidEcPrime256v1, /* OID_EC_CURVE 7 prime256v1/secp256r1*/
90 oidAnsip384r1, /* OID_CERTICOM_EC_CURVE 34 ansip384r1/secp384r1*/
91 oidAnsip521r1; /* OID_CERTICOM_EC_CURVE 35 ansip521r1/secp521r1*/
92
93 /* Standard X.509 Cert and CRL extensions. */
94 extern const DERItem
95 oidSubjectKeyIdentifier,
96 oidKeyUsage,
97 oidPrivateKeyUsagePeriod,
98 oidSubjectAltName,
99 oidIssuerAltName,
100 oidBasicConstraints,
101 oidNameConstraints,
102 oidCrlDistributionPoints,
103 oidCertificatePolicies,
104 oidAnyPolicy,
105 oidPolicyMappings,
106 oidAuthorityKeyIdentifier,
107 oidPolicyConstraints,
108 oidExtendedKeyUsage,
109 oidAnyExtendedKeyUsage,
110 oidInhibitAnyPolicy,
111 oidAuthorityInfoAccess,
112 oidSubjectInfoAccess,
113 oidAdOCSP,
114 oidAdCAIssuer,
115 oidNetscapeCertType,
116 oidEntrustVersInfo,
117 oidMSNTPrincipalName;
118
119 /* Policy Qualifier IDs for Internet policy qualifiers. */
120 extern const DERItem
121 oidQtCps,
122 oidQtUNotice;
123
124 /* X.501 Name IDs. */
125 extern const DERItem
126 oidCommonName,
127 oidCountryName,
128 oidLocalityName,
129 oidStateOrProvinceName,
130 oidOrganizationName,
131 oidOrganizationalUnitName,
132 oidDescription,
133 oidEmailAddress,
134 oidFriendlyName,
135 oidLocalKeyId;
136
137 /* X.509 Extended Key Usages */
138 extern const DERItem
139 oidExtendedKeyUsageServerAuth,
140 oidExtendedKeyUsageClientAuth,
141 oidExtendedKeyUsageCodeSigning,
142 oidExtendedKeyUsageEmailProtection,
143 oidExtendedKeyUsageTimeStamping,
144 oidExtendedKeyUsageOCSPSigning,
145 oidExtendedKeyUsageIPSec,
146 oidExtendedKeyUsageMicrosoftSGC,
147 oidExtendedKeyUsageNetscapeSGC;
148
149 /* Google Certificate Transparency OIDs */
150 extern const DERItem
151 oidGoogleEmbeddedSignedCertificateTimestamp,
152 oidGoogleOCSPSignedCertificateTimestamp;
153
154 __END_DECLS
155
156 #endif /* _SECURITY_OIDS_H_ */