]> git.saurik.com Git - apple/security.git/blob - Keychain/Schema.h
Security-176.tar.gz
[apple/security.git] / Keychain / Schema.h
1 /*
2 * Copyright (c) 2000-2002 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 // Schema.h
21 //
22 #ifndef _SECURITY_SCHEMA_H_
23 #define _SECURITY_SCHEMA_H_
24
25 #include <Security/SecKeychainItem.h>
26
27 namespace Security {
28
29 namespace KeychainCore {
30
31 namespace Schema {
32
33 CSSM_DB_RECORDTYPE recordTypeFor(SecItemClass itemClass);
34 SecItemClass itemClassFor(CSSM_DB_RECORDTYPE recordType);
35 const CSSM_DB_ATTRIBUTE_INFO &attributeInfo(SecKeychainAttrType attrType);
36
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;
45
46 extern const CSSM_DBINFO DBInfo;
47
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;
58
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;
63
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;
73
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;
78
79 // UserTrust records attributes and schema
80 extern const CSSM_DB_ATTRIBUTE_INFO kUserTrustTrustedCertificate;
81 extern const CSSM_DB_ATTRIBUTE_INFO kUserTrustTrustedPolicy;
82
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;
87
88 } // end namespace Schema
89
90 } // end namespace KeychainCore
91
92 } // end namespace Security
93
94 #endif // !_SECURITY_SCHEMA_H_