4 * Copyright (c) 2000-2002 Apple Inc. All Rights Reserved.
6 * The contents of this file constitute Original Code as defined in and are
7 * subject to the Apple Public Source License Version 1.2 (the 'License').
8 * You may not use this file except in compliance with the License. Please obtain
9 * a copy of the License at http://www.apple.com/publicsource and read it before
12 * This Original Code and all software distributed under the License are
13 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
14 * OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
15 * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
16 * PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the
17 * specific language governing rights and limitations under the License.
21 `define(`indexIndex', 0)dnl
22 define(`class', $1)dnl
25 const CSSM_DB_SCHEMA_ATTRIBUTE_INFO $1SchemaAttributeList[] =
29 const CSSM_DB_SCHEMA_INDEX_INFO $1SchemaIndexList[] =
36 const uint32 class()SchemaAttributeCount = sizeof(class()SchemaAttributeList) / sizeof(CSSM_DB_SCHEMA_ATTRIBUTE_INFO);
39 ` // Unique (primary) index'
41 ` // Secondary indices'
45 const uint32 class()SchemaIndexCount = sizeof(class()SchemaIndexList) / sizeof(CSSM_DB_SCHEMA_INDEX_INFO);
53 define(`attributeBody',
55 ifelse(index(`$1',`s'),-1,
56 ` CSSM_DB_ATTRIBUTE_NAME_AS_INTEGER,
57 {(char *)((uint64_t)$3<<32|$3)},',
58 ` CSSM_DB_ATTRIBUTE_NAME_AS_STRING,
60 CSSM_DB_ATTRIBUTE_FORMAT_$7
63 define(`simpleAttribute',
64 `const CSSM_DB_ATTRIBUTE_INFO $2 =
70 { $3, (char*) $4, { $5, $6 }, CSSM_DB_ATTRIBUTE_FORMAT_$7 },
72 ifelse(index(`$1',`S'),-1,`',
77 ifelse(index(`$1',`U'),-1,`',
79 { $3, 0, CSSM_DB_INDEX_UNIQUE, CSSM_DB_INDEX_ON_ATTRIBUTE },
81 ifelse(index(`$1',`I'),-1,`',
82 `define(`indexIndex', incr(indexIndex))dnl
84 { $3, indexIndex(), CSSM_DB_INDEX_NONUNIQUE, CSSM_DB_INDEX_ON_ATTRIBUTE },
87 /* Start of actual output */
90 * Generated by m4 from KeySchema.m4 please do not edit this file.
93 `#include <security_cdsa_utilities/KeySchema.h>'
94 #include <Security/SecKey.h>
100 attribute(` Ss', KeyClass, kSecKeyKeyClass, (char*) "KeyClass", 0, NULL, UINT32)
101 attribute(` Ss', PrintName, kSecKeyPrintName, (char*) "PrintName", 0, NULL, BLOB)
102 attribute(` Ss', Alias, kSecKeyAlias, (char*) "Alias", 0, NULL, BLOB)
103 attribute(` Ss', Permanent, kSecKeyPermanent, (char*) "Permanent", 0, NULL, UINT32)
104 attribute(` Ss', Private, kSecKeyPrivate, (char*) "Private", 0, NULL, UINT32)
105 attribute(` Ss', Modifiable, kSecKeyModifiable, (char*) "Modifiable", 0, NULL, UINT32)
106 attribute(`UISs', Label, kSecKeyLabel, (char*) "Label", 0, NULL, BLOB)
107 attribute(`U Ss', ApplicationTag, kSecKeyApplicationTag, (char*) "ApplicationTag", 0, NULL, BLOB)
108 attribute(`U Ss', KeyCreator, kSecKeyKeyCreator, (char*) "KeyCreator", 0, NULL, BLOB)
109 attribute(`U Ss', KeyType, kSecKeyKeyType, (char*) "KeyType", 0, NULL, UINT32)
110 attribute(`U Ss', KeySizeInBits, kSecKeyKeySizeInBits, (char*) "KeySizeInBits", 0, NULL, UINT32)
111 attribute(`U Ss', EffectiveKeySize, kSecKeyEffectiveKeySize, (char*) "EffectiveKeySize", 0, NULL, UINT32)
112 attribute(`U Ss', StartDate, kSecKeyStartDate, (char*) "StartDate", 0, NULL, BLOB)
113 attribute(`U Ss', EndDate, kSecKeyEndDate, (char*) "EndDate", 0, NULL, BLOB)
114 attribute(` Ss', Sensitive, kSecKeySensitive, (char*) "Sensitive", 0, NULL, UINT32)
115 attribute(` Ss', AlwaysSensitive, kSecKeyAlwaysSensitive, (char*) "AlwaysSensitive", 0, NULL, UINT32)
116 attribute(` Ss', Extractable, kSecKeyExtractable, (char*) "Extractable", 0, NULL, UINT32)
117 attribute(` Ss', NeverExtractable, kSecKeyNeverExtractable, (char*) "NeverExtractable", 0, NULL, UINT32)
118 attribute(` ISs', Encrypt, kSecKeyEncrypt, (char*) "Encrypt", 0, NULL, UINT32)
119 attribute(` ISs', Decrypt, kSecKeyDecrypt, (char*) "Decrypt", 0, NULL, UINT32)
120 attribute(` ISs', Derive, kSecKeyDerive, (char*) "Derive", 0, NULL, UINT32)
121 attribute(` ISs', Sign, kSecKeySign, (char*) "Sign", 0, NULL, UINT32)
122 attribute(` ISs', Verify, kSecKeyVerify, (char*) "Verify", 0, NULL, UINT32)
123 attribute(` ISs', SignRecover, kSecKeySignRecover, (char*) "SignRecover", 0, NULL, UINT32)
124 attribute(` ISs', VerifyRecover, kSecKeyVerifyRecover, (char*) "VerifyRecover", 0, NULL, UINT32)
125 attribute(` ISs', Wrap, kSecKeyWrap, (char*) "Wrap", 0, NULL, UINT32)
126 attribute(` ISs', Unwrap, kSecKeyUnwrap, (char*) "Unwrap", 0, NULL, UINT32)
129 } // end namespace KeySchema