]>
git.saurik.com Git - apple/security.git/blob - libsecurity_mds/lib/mds_schema.h
2 * Copyright (c) 2000-2001 Apple Computer, Inc. All Rights Reserved.
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
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.
22 Contains: Module Directory Services Schema for CSSM.
24 Copyright: (c) 1999-2000 Apple Computer, Inc., all rights reserved.
27 #ifndef _MDS_SCHEMA_H_
28 #define _MDS_SCHEMA_H_ 1
30 #include <Security/cssmtype.h>
36 /* Names of the databases supported by MDS. */
37 #define MDS_OBJECT_DIRECTORY_NAME "MDS Object Directory"
38 #define MDS_CDSA_DIRECTORY_NAME "MDS CDSA Directory"
40 /* MDS predefined values for a 16K name space */
41 #define CSSM_DB_RELATIONID_MDS_START (0x40000000)
42 #define CSSM_DB_RELATIONID_MDS_END (0x40004000)
44 #define MDS_OBJECT_RECORDTYPE (CSSM_DB_RELATIONID_MDS_START)
46 #define MDS_CDSA_SCHEMA_START (MDS_OBJECT_RECORDTYPE)
47 #define MDS_CDSADIR_CSSM_RECORDTYPE (MDS_CDSA_SCHEMA_START + 1)
48 #define MDS_CDSADIR_KRMM_RECORDTYPE (MDS_CDSA_SCHEMA_START + 2)
49 #define MDS_CDSADIR_EMM_RECORDTYPE (MDS_CDSA_SCHEMA_START + 3)
50 #define MDS_CDSADIR_COMMON_RECORDTYPE (MDS_CDSA_SCHEMA_START + 4)
51 #define MDS_CDSADIR_CSP_PRIMARY_RECORDTYPE (MDS_CDSA_SCHEMA_START + 5)
52 #define MDS_CDSADIR_CSP_CAPABILITY_RECORDTYPE (MDS_CDSA_SCHEMA_START + 6)
53 #define MDS_CDSADIR_CSP_ENCAPSULATED_PRODUCT_RECORDTYPE (MDS_CDSA_SCHEMA_START + 7)
54 #define MDS_CDSADIR_CSP_SC_INFO_RECORDTYPE (MDS_CDSA_SCHEMA_START + 8)
55 #define MDS_CDSADIR_DL_PRIMARY_RECORDTYPE (MDS_CDSA_SCHEMA_START + 9)
56 #define MDS_CDSADIR_DL_ENCAPSULATED_PRODUCT_RECORDTYPE (MDS_CDSA_SCHEMA_START + 10)
57 #define MDS_CDSADIR_CL_PRIMARY_RECORDTYPE (MDS_CDSA_SCHEMA_START + 11)
58 #define MDS_CDSADIR_CL_ENCAPSULATED_PRODUCT_RECORDTYPE (MDS_CDSA_SCHEMA_START + 12)
59 #define MDS_CDSADIR_TP_PRIMARY_RECORDTYPE (MDS_CDSA_SCHEMA_START + 13)
60 #define MDS_CDSADIR_TP_OIDS_RECORDTYPE (MDS_CDSA_SCHEMA_START + 14)
61 #define MDS_CDSADIR_TP_ENCAPSULATED_PRODUCT_RECORDTYPE (MDS_CDSA_SCHEMA_START + 15)
62 #define MDS_CDSADIR_EMM_PRIMARY_RECORDTYPE (MDS_CDSA_SCHEMA_START + 16)
63 #define MDS_CDSADIR_AC_PRIMARY_RECORDTYPE (MDS_CDSA_SCHEMA_START + 17)
64 #define MDS_CDSADIR_KR_PRIMARY_RECORDTYPE (MDS_CDSA_SCHEMA_START + 18)
65 #define MDS_CDSADIR_MDS_SCHEMA_RELATIONS (MDS_CDSA_SCHEMA_START + 19)
66 #define MDS_CDSADIR_MDS_SCHEMA_ATTRIBUTES (MDS_CDSA_SCHEMA_START + 20)
67 #define MDS_CDSADIR_MDS_SCHEMA_INDEXES (MDS_CDSA_SCHEMA_START + 21)
69 /* MDS predefined values for a 16K name space */
70 #define CSSM_DB_ATTRIBUTE_MDS_START (0x40000000)
71 #define CSSM_DB_ATTRIBUTE_MDS_END (0x40004000)
72 #define MDS_CDSAATTR_MODULE_ID (CSSM_DB_ATTRIBUTE_MDS_START + 1)
73 #define MDS_CDSAATTR_MANIFEST (CSSM_DB_ATTRIBUTE_MDS_START + 2)
74 #define MDS_CDSAATTR_MODULE_NAME (CSSM_DB_ATTRIBUTE_MDS_START + 3)
75 #define MDS_CDSAATTR_PATH (CSSM_DB_ATTRIBUTE_MDS_START + 4)
76 #define MDS_CDSAATTR_CDSAVERSION (CSSM_DB_ATTRIBUTE_MDS_START + 5)
77 #define MDS_CDSAATTR_VENDOR (CSSM_DB_ATTRIBUTE_MDS_START + 6)
78 #define MDS_CDSAATTR_DESC (CSSM_DB_ATTRIBUTE_MDS_START + 8)
79 #define MDS_CDSAATTR_INTERFACE_GUID (CSSM_DB_ATTRIBUTE_MDS_START + 9)
80 #define MDS_CDSAATTR_POLICY_STMT (CSSM_DB_ATTRIBUTE_MDS_START + 10)
81 #define MDS_CDSAATTR_EMMSPECVERSION (CSSM_DB_ATTRIBUTE_MDS_START + 11)
82 #define MDS_CDSAATTR_EMM_VERSION (CSSM_DB_ATTRIBUTE_MDS_START + 12)
83 #define MDS_CDSAATTR_EMM_VENDOR (CSSM_DB_ATTRIBUTE_MDS_START + 13)
84 #define MDS_CDSAATTR_EMM_TYPE (CSSM_DB_ATTRIBUTE_MDS_START + 14)
85 #define MDS_CDSAATTR_SSID (CSSM_DB_ATTRIBUTE_MDS_START + 15)
86 #define MDS_CDSAATTR_SERVICE_TYPE (CSSM_DB_ATTRIBUTE_MDS_START + 16)
87 #define MDS_CDSAATTR_NATIVE_SERVICES (CSSM_DB_ATTRIBUTE_MDS_START + 17)
88 #define MDS_CDSAATTR_DYNAMIC_FLAG (CSSM_DB_ATTRIBUTE_MDS_START + 18)
89 #define MDS_CDSAATTR_MULTITHREAD_FLAG (CSSM_DB_ATTRIBUTE_MDS_START + 19)
90 #define MDS_CDSAATTR_SERVICE_MASK (CSSM_DB_ATTRIBUTE_MDS_START + 20)
91 #define MDS_CDSAATTR_CSP_TYPE (CSSM_DB_ATTRIBUTE_MDS_START + 21)
92 #define MDS_CDSAATTR_CSP_FLAGS (CSSM_DB_ATTRIBUTE_MDS_START + 22)
93 #define MDS_CDSAATTR_CSP_CUSTOMFLAGS (CSSM_DB_ATTRIBUTE_MDS_START + 23)
94 #define MDS_CDSAATTR_USEE_TAGS (CSSM_DB_ATTRIBUTE_MDS_START + 24)
95 #define MDS_CDSAATTR_CONTEXT_TYPE (CSSM_DB_ATTRIBUTE_MDS_START + 25)
96 #define MDS_CDSAATTR_ALG_TYPE (CSSM_DB_ATTRIBUTE_MDS_START + 26)
97 #define MDS_CDSAATTR_GROUP_ID (CSSM_DB_ATTRIBUTE_MDS_START + 27)
98 #define MDS_CDSAATTR_ATTRIBUTE_TYPE (CSSM_DB_ATTRIBUTE_MDS_START + 28)
99 #define MDS_CDSAATTR_ATTRIBUTE_VALUE (CSSM_DB_ATTRIBUTE_MDS_START + 29)
100 #define MDS_CDSAATTR_PRODUCT_DESC (CSSM_DB_ATTRIBUTE_MDS_START + 30)
101 #define MDS_CDSAATTR_PRODUCT_VENDOR (CSSM_DB_ATTRIBUTE_MDS_START + 31)
102 #define MDS_CDSAATTR_PRODUCT_VERSION (CSSM_DB_ATTRIBUTE_MDS_START + 32)
103 #define MDS_CDSAATTR_PRODUCT_FLAGS (CSSM_DB_ATTRIBUTE_MDS_START + 33)
104 #define MDS_CDSAATTR_PRODUCT_CUSTOMFLAGS (CSSM_DB_ATTRIBUTE_MDS_START + 34)
105 #define MDS_CDSAATTR_STANDARD_DESC (CSSM_DB_ATTRIBUTE_MDS_START + 35)
106 #define MDS_CDSAATTR_STANDARD_VERSION (CSSM_DB_ATTRIBUTE_MDS_START + 36)
107 #define MDS_CDSAATTR_READER_DESC (CSSM_DB_ATTRIBUTE_MDS_START + 37)
108 #define MDS_CDSAATTR_READER_VENDOR (CSSM_DB_ATTRIBUTE_MDS_START + 38)
109 #define MDS_CDSAATTR_READER_VERSION (CSSM_DB_ATTRIBUTE_MDS_START + 39)
110 #define MDS_CDSAATTR_READER_FWVERSION (CSSM_DB_ATTRIBUTE_MDS_START + 40)
111 #define MDS_CDSAATTR_READER_FLAGS (CSSM_DB_ATTRIBUTE_MDS_START + 41)
112 #define MDS_CDSAATTR_READER_CUSTOMFLAGS (CSSM_DB_ATTRIBUTE_MDS_START + 42)
113 #define MDS_CDSAATTR_READER_SERIALNUMBER (CSSM_DB_ATTRIBUTE_MDS_START + 43)
114 #define MDS_CDSAATTR_SC_DESC (CSSM_DB_ATTRIBUTE_MDS_START + 44)
115 #define MDS_CDSAATTR_SC_VENDOR (CSSM_DB_ATTRIBUTE_MDS_START + 45)
116 #define MDS_CDSAATTR_SC_VERSION (CSSM_DB_ATTRIBUTE_MDS_START + 46)
117 #define MDS_CDSAATTR_SC_FWVERSION (CSSM_DB_ATTRIBUTE_MDS_START + 47)
118 #define MDS_CDSAATTR_SC_FLAGS (CSSM_DB_ATTRIBUTE_MDS_START + 48)
119 #define MDS_CDSAATTR_SC_CUSTOMFLAGS (CSSM_DB_ATTRIBUTE_MDS_START + 49)
120 #define MDS_CDSAATTR_SC_SERIALNUMBER (CSSM_DB_ATTRIBUTE_MDS_START + 50)
121 #define MDS_CDSAATTR_DL_TYPE (CSSM_DB_ATTRIBUTE_MDS_START + 51)
122 #define MDS_CDSAATTR_QUERY_LIMITS (CSSM_DB_ATTRIBUTE_MDS_START + 52)
123 #define MDS_CDSAATTR_CONJUNCTIVE_OPS (CSSM_DB_ATTRIBUTE_MDS_START + 53)
124 #define MDS_CDSAATTR_RELATIONAL_OPS (CSSM_DB_ATTRIBUTE_MDS_START + 54)
125 #define MDS_CDSAATTR_PROTOCOL (CSSM_DB_ATTRIBUTE_MDS_START + 55)
126 #define MDS_CDSAATTR_CERT_TYPEFORMAT (CSSM_DB_ATTRIBUTE_MDS_START + 56)
127 #define MDS_CDSAATTR_CRL_TYPEFORMAT (CSSM_DB_ATTRIBUTE_MDS_START + 57)
128 #define MDS_CDSAATTR_CERT_FIELDNAMES (CSSM_DB_ATTRIBUTE_MDS_START + 58)
129 #define MDS_CDSAATTR_BUNDLE_TYPEFORMAT (CSSM_DB_ATTRIBUTE_MDS_START + 59)
130 #define MDS_CDSAATTR_CERT_CLASSNAME (CSSM_DB_ATTRIBUTE_MDS_START + 60)
131 #define MDS_CDSAATTR_ROOTCERT (CSSM_DB_ATTRIBUTE_MDS_START + 61)
132 #define MDS_CDSAATTR_ROOTCERT_TYPEFORMAT (CSSM_DB_ATTRIBUTE_MDS_START + 62)
133 #define MDS_CDSAATTR_VALUE (CSSM_DB_ATTRIBUTE_MDS_START + 63)
134 #define MDS_CDSAATTR_REQCREDENTIALS (CSSM_DB_ATTRIBUTE_MDS_START + 64)
135 #define MDS_CDSAATTR_SAMPLETYPES (CSSM_DB_ATTRIBUTE_MDS_START + 65)
136 #define MDS_CDSAATTR_ACLSUBJECTTYPES (CSSM_DB_ATTRIBUTE_MDS_START + 66)
137 #define MDS_CDSAATTR_AUTHTAGS (CSSM_DB_ATTRIBUTE_MDS_START + 67)
138 #define MDS_CDSAATTR_USEETAG (CSSM_DB_ATTRIBUTE_MDS_START + 68)
139 #define MDS_CDSAATTR_RETRIEVALMODE (CSSM_DB_ATTRIBUTE_MDS_START + 69)
140 #define MDS_CDSAATTR_OID (CSSM_DB_ATTRIBUTE_MDS_START + 70)
141 #define MDS_CDSAATTR_XLATIONTYPEFORMAT (CSSM_DB_ATTRIBUTE_MDS_START + 71)
142 #define MDS_CDSAATTR_DEFAULT_TEMPLATE_TYPE (CSSM_DB_ATTRIBUTE_MDS_START + 72)
143 #define MDS_CDSAATTR_TEMPLATE_FIELD_NAMES (CSSM_DB_ATTRIBUTE_MDS_START + 73)
144 #define MDS_CDSAATTR_AUTHORITY_REQUEST_TYPE (CSSM_DB_ATTRIBUTE_MDS_START + 74)
146 /* Meta-data names for the MDS Object directory relation */
147 #define MDS_OBJECT_NUM_RELATIONS (1)
148 #define MDS_OBJECT_NUM_ATTRIBUTES (4)
149 /* Defined constant for # of relations in the CDSA directory */
150 #define MDS_CDSADIR_NUM_RELATIONS (19)
151 /* Meta-data names for the MDS CSSM relation */
152 #define MDS_CDSADIR_CSSM_NUM_ATTRIBUTES (4)
153 /* Meta-data names for the MDS EMM relation */
154 #define MDS_CDSADIR_EMM_NUM_ATTRIBUTES (11)
155 /* Meta-data names for the MDS Common relation */
156 #define MDS_CDSADIR_COMMON_NUM_ATTRIBUTES (9)
157 /* Meta-data names for the MDS CSP Primary relation */
158 #define MDS_CDSADIR_CSP_PRIMARY_NUM_ATTRIBUTES (13)
159 /* Meta-data names for the MDS CSP Capabilities relation */
160 #define MDS_CDSADIR_CSP_CAPABILITY_NUM_ATTRIBUTES (9)
161 /* Meta-data names for the MDS CSP Encapsulated Product relation */
162 #define MDS_CDSADIR_CSP_ENCAPSULATED_PRODUCT_NUM_ATTRIBUTES (16)
163 /* Meta-data names for the MDS CSP SmartcardInfo relation */
164 #define MDS_CDSADIR_CSP_SC_INFO_NUM_ATTRIBUTES (9)
165 /* Meta-data names for the MDS DL Primary relation */
166 #define MDS_CDSADIR_DL_PRIMARY_NUM_ATTRIBUTES (13)
167 /* Meta-data names for the MDS DL Encapsulated Product relation */
168 #define MDS_CDSADIR_DL_ENCAPSULATED_PRODUCT_NUM_ATTRIBUTES (10)
169 /* Meta-data names for the MDS CL Primary relation */
170 #define MDS_CDSADIR_CL_PRIMARY_NUM_ATTRIBUTES (13)
171 /* Meta-data names for the MDS CL Encapsulated Product relation */
172 #define MDS_CDSADIR_CL_ENCAPSULATED_PRODUCT_NUM_ATTRIBUTES (8)
173 /* Meta-data names for the MDS TP Primary relation */
174 #define MDS_CDSADIR_TP_PRIMARY_NUM_ATTRIBUTES (10)
175 /* Meta-data names for the MDS TP Policy-OIDS relation */
176 #define MDS_CDSADIR_TP_OIDS_NUM_ATTRIBUTES (4)
177 /* Meta-data names for the MDS TP Encapsulated Product relation */
178 #define MDS_CDSADIR_TP_ENCAPSULATED_PRODUCT_NUM_ATTRIBUTES (14)
179 /* Meta-data names for MDS EMM Service Provider Primary relation */
180 #define MDS_CDSADIR_EMM_PRIMARY_NUM_ATTRIBUTES (9)
181 /* Meta-data names for MDS AC Primary relation */
182 #define MDS_CDSADIR_AC_PRIMARY_NUM_ATTRIBUTES (6)
183 /* Meta-data names for MDS Schema relation */
184 #define MDS_CDSADIR_SCHEMA_RELATONS_NUM_ATTRIBUTES (2)
185 #define MDS_CDSADIR_SCHEMA_ATTRIBUTES_NUM_ATTRIBUTES (6)
186 #define MDS_CDSADIR_SCHEMA_INDEXES_NUM_ATTRIBUTES (5)
192 #endif /* _MDS_SCHEMA_H_ */