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