2 * Copyright (c) 2000-2004,2006,2011,2014 Apple Inc. All Rights Reserved.
4 * @APPLE_LICENSE_HEADER_START@
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
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.
21 * @APPLE_LICENSE_HEADER_END@
28 #ifndef _SECURITY_SCHEMA_H_
29 #define _SECURITY_SCHEMA_H_
31 #include <Security/SecKeychainItem.h>
35 namespace KeychainCore
{
39 CSSM_DB_RECORDTYPE
recordTypeFor(SecItemClass itemClass
);
40 SecItemClass
itemClassFor(CSSM_DB_RECORDTYPE recordType
);
41 const CSSM_DB_ATTRIBUTE_INFO
&attributeInfo(SecKeychainAttrType attrType
);
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
;
52 extern const CSSM_DBINFO DBInfo
;
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
;
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
;
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
;
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
;
85 // UserTrust records attributes and schema
86 extern const CSSM_DB_ATTRIBUTE_INFO kUserTrustTrustedCertificate
;
87 extern const CSSM_DB_ATTRIBUTE_INFO kUserTrustTrustedPolicy
;
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
;
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
;
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
;
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
;
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
;
123 } // end namespace Schema
125 } // end namespace KeychainCore
127 } // end namespace Security
129 #endif // !_SECURITY_SCHEMA_H_