]> git.saurik.com Git - apple/security.git/blob - Security/libsecurity_cdsa_utilities/lib/Schema.h
Security-57031.10.10.tar.gz
[apple/security.git] / Security / libsecurity_cdsa_utilities / lib / Schema.h
1 /*
2 * Copyright (c) 2000-2004,2006,2011,2014 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 // Schema.h
27 //
28 #ifndef _SECURITY_SCHEMA_H_
29 #define _SECURITY_SCHEMA_H_
30
31 #include <Security/SecKeychainItem.h>
32
33 namespace Security {
34
35 namespace KeychainCore {
36
37 namespace Schema {
38
39 CSSM_DB_RECORDTYPE recordTypeFor(SecItemClass itemClass);
40 SecItemClass itemClassFor(CSSM_DB_RECORDTYPE recordType);
41 const CSSM_DB_ATTRIBUTE_INFO &attributeInfo(SecKeychainAttrType attrType);
42
43 extern const CSSM_DB_ATTRIBUTE_INFO RelationID;
44 extern const CSSM_DB_ATTRIBUTE_INFO RelationName;
45 extern const CSSM_DB_ATTRIBUTE_INFO AttributeID;
46 extern const CSSM_DB_ATTRIBUTE_INFO AttributeNameFormat;
47 extern const CSSM_DB_ATTRIBUTE_INFO AttributeName;
48 extern const CSSM_DB_ATTRIBUTE_INFO AttributeNameID;
49 extern const CSSM_DB_ATTRIBUTE_INFO AttributeFormat;
50 extern const CSSM_DB_ATTRIBUTE_INFO IndexType;
51
52 extern const CSSM_DBINFO DBInfo;
53
54 // Certificate attributes and schema
55 extern const CSSM_DB_ATTRIBUTE_INFO kX509CertificateCertType;
56 extern const CSSM_DB_ATTRIBUTE_INFO kX509CertificateCertEncoding;
57 extern const CSSM_DB_ATTRIBUTE_INFO kX509CertificatePrintName;
58 extern const CSSM_DB_ATTRIBUTE_INFO kX509CertificateAlias;
59 extern const CSSM_DB_ATTRIBUTE_INFO kX509CertificateSubject;
60 extern const CSSM_DB_ATTRIBUTE_INFO kX509CertificateIssuer;
61 extern const CSSM_DB_ATTRIBUTE_INFO kX509CertificateSerialNumber;
62 extern const CSSM_DB_ATTRIBUTE_INFO kX509CertificateSubjectKeyIdentifier;
63 extern const CSSM_DB_ATTRIBUTE_INFO kX509CertificatePublicKeyHash;
64
65 extern const CSSM_DB_SCHEMA_ATTRIBUTE_INFO X509CertificateSchemaAttributeList[];
66 extern const CSSM_DB_SCHEMA_INDEX_INFO X509CertificateSchemaIndexList[];
67 extern const uint32 X509CertificateSchemaAttributeCount;
68 extern const uint32 X509CertificateSchemaIndexCount;
69
70 // CRL attributes and schema
71 extern const CSSM_DB_ATTRIBUTE_INFO kX509CrlCrlType;
72 extern const CSSM_DB_ATTRIBUTE_INFO kX509CrlCrlEncoding;
73 extern const CSSM_DB_ATTRIBUTE_INFO kX509CrlPrintName;
74 extern const CSSM_DB_ATTRIBUTE_INFO kX509CrlAlias;
75 extern const CSSM_DB_ATTRIBUTE_INFO kX509CrlIssuer;
76 extern const CSSM_DB_ATTRIBUTE_INFO kX509CrlSerialNumber;
77 extern const CSSM_DB_ATTRIBUTE_INFO kX509CrlThisUpdate;
78 extern const CSSM_DB_ATTRIBUTE_INFO kX509CrlNextUpdate;
79
80 extern const CSSM_DB_SCHEMA_ATTRIBUTE_INFO X509CrlSchemaAttributeList[];
81 extern const CSSM_DB_SCHEMA_INDEX_INFO X509CrlSchemaIndexList[];
82 extern const uint32 X509CrlSchemaAttributeCount;
83 extern const uint32 X509CrlSchemaIndexCount;
84
85 // UserTrust records attributes and schema
86 extern const CSSM_DB_ATTRIBUTE_INFO kUserTrustTrustedCertificate;
87 extern const CSSM_DB_ATTRIBUTE_INFO kUserTrustTrustedPolicy;
88
89 extern const CSSM_DB_SCHEMA_ATTRIBUTE_INFO UserTrustSchemaAttributeList[];
90 extern const CSSM_DB_SCHEMA_INDEX_INFO UserTrustSchemaIndexList[];
91 extern const uint32 UserTrustSchemaAttributeCount;
92 extern const uint32 UserTrustSchemaIndexCount;
93
94 // UnlockReferral records attributes and schema
95 extern const CSSM_DB_ATTRIBUTE_INFO kUnlockReferralType;
96 extern const CSSM_DB_ATTRIBUTE_INFO kUnlockReferralDbName;
97 extern const CSSM_DB_ATTRIBUTE_INFO kUnlockReferralDbGuid;
98 extern const CSSM_DB_ATTRIBUTE_INFO kUnlockReferralDbSSID;
99 extern const CSSM_DB_ATTRIBUTE_INFO kUnlockReferralDbSSType;
100 extern const CSSM_DB_ATTRIBUTE_INFO kUnlockReferralDbNetname;
101 extern const CSSM_DB_ATTRIBUTE_INFO kUnlockReferralKeyLabel;
102 extern const CSSM_DB_ATTRIBUTE_INFO kUnlockReferralKeyAppTag;
103 extern const CSSM_DB_ATTRIBUTE_INFO kUnlockReferralPrintName;
104 extern const CSSM_DB_ATTRIBUTE_INFO kUnlockReferralAlias;
105
106 extern const CSSM_DB_SCHEMA_ATTRIBUTE_INFO UnlockReferralSchemaAttributeList[];
107 extern const CSSM_DB_SCHEMA_INDEX_INFO UnlockReferralSchemaIndexList[];
108 extern const uint32 UnlockReferralSchemaAttributeCount;
109 extern const uint32 UnlockReferralSchemaIndexCount;
110
111 // Extended Attribute record attributes and schema
112 extern const CSSM_DB_ATTRIBUTE_INFO kExtendedAttributeRecordType;
113 extern const CSSM_DB_ATTRIBUTE_INFO kExtendedAttributeItemID;
114 extern const CSSM_DB_ATTRIBUTE_INFO kExtendedAttributeAttributeName;
115 extern const CSSM_DB_ATTRIBUTE_INFO kExtendedAttributeModDate;
116 extern const CSSM_DB_ATTRIBUTE_INFO kExtendedAttributeAttributeValue;
117
118 extern const CSSM_DB_SCHEMA_ATTRIBUTE_INFO ExtendedAttributeSchemaAttributeList[];
119 extern const CSSM_DB_SCHEMA_INDEX_INFO ExtendedAttributeSchemaIndexList[];
120 extern const uint32 ExtendedAttributeSchemaAttributeCount;
121 extern const uint32 ExtendedAttributeSchemaIndexCount;
122
123 } // end namespace Schema
124
125 } // end namespace KeychainCore
126
127 } // end namespace Security
128
129 #endif // !_SECURITY_SCHEMA_H_