2 * Copyright (c) 2000-2002 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 #ifndef _SECURITY_SCHEMA_H_
23 #define _SECURITY_SCHEMA_H_
25 #include <Security/SecKeychainItem.h>
29 namespace KeychainCore
{
33 CSSM_DB_RECORDTYPE
recordTypeFor(SecItemClass itemClass
);
34 SecItemClass
itemClassFor(CSSM_DB_RECORDTYPE recordType
);
35 const CSSM_DB_ATTRIBUTE_INFO
&attributeInfo(SecKeychainAttrType attrType
);
37 extern const CSSM_DB_ATTRIBUTE_INFO RelationID
;
38 extern const CSSM_DB_ATTRIBUTE_INFO RelationName
;
39 extern const CSSM_DB_ATTRIBUTE_INFO AttributeID
;
40 extern const CSSM_DB_ATTRIBUTE_INFO AttributeNameFormat
;
41 extern const CSSM_DB_ATTRIBUTE_INFO AttributeName
;
42 extern const CSSM_DB_ATTRIBUTE_INFO AttributeNameID
;
43 extern const CSSM_DB_ATTRIBUTE_INFO AttributeFormat
;
44 extern const CSSM_DB_ATTRIBUTE_INFO IndexType
;
46 extern const CSSM_DBINFO DBInfo
;
48 // Certificate attributes and schema
49 extern const CSSM_DB_ATTRIBUTE_INFO kX509CertificateCertType
;
50 extern const CSSM_DB_ATTRIBUTE_INFO kX509CertificateCertEncoding
;
51 extern const CSSM_DB_ATTRIBUTE_INFO kX509CertificatePrintName
;
52 extern const CSSM_DB_ATTRIBUTE_INFO kX509CertificateAlias
;
53 extern const CSSM_DB_ATTRIBUTE_INFO kX509CertificateSubject
;
54 extern const CSSM_DB_ATTRIBUTE_INFO kX509CertificateIssuer
;
55 extern const CSSM_DB_ATTRIBUTE_INFO kX509CertificateSerialNumber
;
56 extern const CSSM_DB_ATTRIBUTE_INFO kX509CertificateSubjectKeyIdentifier
;
57 extern const CSSM_DB_ATTRIBUTE_INFO kX509CertificatePublicKeyHash
;
59 extern const CSSM_DB_SCHEMA_ATTRIBUTE_INFO X509CertificateSchemaAttributeList
[];
60 extern const CSSM_DB_SCHEMA_INDEX_INFO X509CertificateSchemaIndexList
[];
61 extern const uint32 X509CertificateSchemaAttributeCount
;
62 extern const uint32 X509CertificateSchemaIndexCount
;
64 // CRL attributes and schema
65 extern const CSSM_DB_ATTRIBUTE_INFO kX509CrlCrlType
;
66 extern const CSSM_DB_ATTRIBUTE_INFO kX509CrlCrlEncoding
;
67 extern const CSSM_DB_ATTRIBUTE_INFO kX509CrlPrintName
;
68 extern const CSSM_DB_ATTRIBUTE_INFO kX509CrlAlias
;
69 extern const CSSM_DB_ATTRIBUTE_INFO kX509CrlIssuer
;
70 extern const CSSM_DB_ATTRIBUTE_INFO kX509CrlSerialNumber
;
71 extern const CSSM_DB_ATTRIBUTE_INFO kX509CrlThisUpdate
;
72 extern const CSSM_DB_ATTRIBUTE_INFO kX509CrlNextUpdate
;
74 extern const CSSM_DB_SCHEMA_ATTRIBUTE_INFO X509CrlSchemaAttributeList
[];
75 extern const CSSM_DB_SCHEMA_INDEX_INFO X509CrlSchemaIndexList
[];
76 extern const uint32 X509CrlSchemaAttributeCount
;
77 extern const uint32 X509CrlSchemaIndexCount
;
79 // UserTrust records attributes and schema
80 extern const CSSM_DB_ATTRIBUTE_INFO kUserTrustTrustedCertificate
;
81 extern const CSSM_DB_ATTRIBUTE_INFO kUserTrustTrustedPolicy
;
83 extern const CSSM_DB_SCHEMA_ATTRIBUTE_INFO UserTrustSchemaAttributeList
[];
84 extern const CSSM_DB_SCHEMA_INDEX_INFO UserTrustSchemaIndexList
[];
85 extern const uint32 UserTrustSchemaAttributeCount
;
86 extern const uint32 UserTrustSchemaIndexCount
;
88 } // end namespace Schema
90 } // end namespace KeychainCore
92 } // end namespace Security
94 #endif // !_SECURITY_SCHEMA_H_