]> git.saurik.com Git - apple/security.git/blob - cdsa/cdsa/oidscert.h
b9bd47a682885b4180c941d87ef80eec975ddd08
[apple/security.git] / cdsa / cdsa / oidscert.h
1 /*
2 * Copyright (c) 2000-2001 Apple Computer, Inc. All Rights Reserved.
3 *
4 * The contents of this file constitute Original Code as defined in and are
5 * subject to the Apple Public Source License Version 1.2 (the 'License').
6 * You may not use this file except in compliance with the License. Please obtain
7 * a copy of the License at http://www.apple.com/publicsource and read it before
8 * using this file.
9 *
10 * This Original Code and all software distributed under the License are
11 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
12 * OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
13 * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
14 * PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the
15 * specific language governing rights and limitations under the License.
16 */
17
18
19 /*
20 File: oidscert.h
21
22 Contains: Object Identifiers for X509 Certificate Library
23
24 Copyright: (c) 1999-2000 Apple Computer, Inc., all rights reserved.
25 */
26
27 #ifndef _OIDSCERT_H_
28 #define _OIDSCERT_H_ 1
29
30 #include <Security/cssmconfig.h>
31 #include <Security/cssmtype.h>
32 #include <Security/oidsbase.h>
33
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 #define INTEL_X509V3_CERT_R08 INTEL_SEC_FORMATS, 1, 1
39 #define INTEL_X509V3_CERT_R08_LENGTH INTEL_SEC_FORMATS_LENGTH + 2
40
41 /* Prefix for defining Certificate Extension field OIDs */
42 #define INTEL_X509V3_CERT_PRIVATE_EXTENSIONS INTEL_X509V3_CERT_R08, 50
43 #define INTEL_X509V3_CERT_PRIVATE_EXTENSIONS_LENGTH INTEL_X509V3_CERT_R08_LENGTH + 1
44
45 /* Prefix for defining signature field OIDs */
46 #define INTEL_X509V3_SIGN_R08 INTEL_SEC_FORMATS, 3, 2
47 #define INTEL_X509V3_SIGN_R08_LENGTH INTEL_SEC_FORMATS_LENGTH + 2
48
49 /* Suffix specifying format or representation of a field value */
50 /* Note that if a format suffix is not specified, a flat data representation is implied. */
51
52 #define INTEL_X509_C_DATATYPE 1
53 #define INTEL_X509_LDAPSTRING_DATATYPE 2
54
55 /* Certificate OIDS */
56 extern const CSSM_OID
57
58 CSSMOID_X509V3SignedCertificate,
59 CSSMOID_X509V3SignedCertificateCStruct,
60 CSSMOID_X509V3Certificate,
61 CSSMOID_X509V3CertificateCStruct,
62 CSSMOID_X509V1Version,
63 CSSMOID_X509V1SerialNumber,
64 CSSMOID_X509V1IssuerName,
65 CSSMOID_X509V1IssuerNameCStruct,
66 CSSMOID_X509V1IssuerNameLDAP,
67 CSSMOID_X509V1ValidityNotBefore,
68 CSSMOID_X509V1ValidityNotAfter,
69 CSSMOID_X509V1SubjectName,
70 CSSMOID_X509V1SubjectNameCStruct,
71 CSSMOID_X509V1SubjectNameLDAP,
72 CSSMOID_CSSMKeyStruct,
73 CSSMOID_X509V1SubjectPublicKeyCStruct,
74 CSSMOID_X509V1SubjectPublicKeyAlgorithm,
75 CSSMOID_X509V1SubjectPublicKeyAlgorithmParameters,
76 CSSMOID_X509V1SubjectPublicKey,
77 CSSMOID_X509V1CertificateIssuerUniqueId,
78 CSSMOID_X509V1CertificateSubjectUniqueId,
79 CSSMOID_X509V3CertificateExtensionsStruct,
80 CSSMOID_X509V3CertificateExtensionsCStruct,
81 CSSMOID_X509V3CertificateNumberOfExtensions,
82 CSSMOID_X509V3CertificateExtensionStruct,
83 CSSMOID_X509V3CertificateExtensionCStruct,
84 CSSMOID_X509V3CertificateExtensionId,
85 CSSMOID_X509V3CertificateExtensionCritical,
86 CSSMOID_X509V3CertificateExtensionType,
87 CSSMOID_X509V3CertificateExtensionValue,
88
89 /* Signature OID Fields */
90 CSSMOID_X509V1SignatureStruct,
91 CSSMOID_X509V1SignatureCStruct,
92 CSSMOID_X509V1SignatureAlgorithm,
93 CSSMOID_X509V1SignatureAlgorithmTBS,
94 CSSMOID_X509V1SignatureAlgorithmParameters,
95 CSSMOID_X509V1Signature,
96
97 /* Extension OID Fields */
98 CSSMOID_SubjectSignatureBitmap,
99 CSSMOID_SubjectPicture,
100 CSSMOID_SubjectEmailAddress,
101 CSSMOID_UseExemptions;
102
103 /***
104 *** Apple addenda
105 ***/
106
107 /*
108 * Standard Cert extensions.
109 */
110 extern const CSSM_OID
111 CSSMOID_SubjectDirectoryAttributes,
112 CSSMOID_SubjectKeyIdentifier,
113 CSSMOID_KeyUsage,
114 CSSMOID_PrivateKeyUsagePeriod ,
115 CSSMOID_SubjectAltName,
116 CSSMOID_IssuerAltName,
117 CSSMOID_BasicConstraints,
118 CSSMOID_CrlNumber,
119 CSSMOID_CrlReason,
120 CSSMOID_HoldInstructionCode,
121 CSSMOID_InvalidityDate,
122 CSSMOID_DeltaCrlIndicator,
123 CSSMOID_IssuingDistributionPoints,
124 CSSMOID_NameConstraints,
125 CSSMOID_CrlDistributionPoints,
126 CSSMOID_CertificatePolicies,
127 CSSMOID_PolicyMappings,
128 CSSMOID_PolicyConstraints,
129 CSSMOID_AuthorityKeyIdentifier,
130 CSSMOID_ExtendedKeyUsage,
131 CSSMOID_ExtendedUseCodeSigning;
132
133 /*
134 * Netscape extensions.
135 */
136 extern const CSSM_OID CSSMOID_NetscapeCertType;
137
138 /*
139 * Field values for CSSMOID_NetscapeCertType, a bit string.
140 * Assumes a 16 bit field, even though currently only 8 bits
141 * are defined.
142 */
143 #define CE_NCT_SSL_Client 0x8000
144 #define CE_NCT_SSL_Server 0x4000
145 #define CE_NCT_SMIME 0x2000
146 #define CE_NCT_ObjSign 0x1000
147 #define CE_NCT_Reserved 0x0800
148 #define CE_NCT_SSL_CA 0x0400
149 #define CE_NCT_SMIME_CA 0x0200
150 #define CE_NCT_ObjSignCA 0x0100
151
152 #ifdef __cplusplus
153 }
154 #endif
155
156 #endif /* _OIDSCERT_H_ */