1 #include "attributes.h"
3 //#include <Keychain.h>
4 //#include <SecurityCore/KeychainPriv.h>
6 #include <CoreServices/../Frameworks/OSServices.framework/Headers/KeychainCore.h>
7 // --------------------------------------------------------------------
8 // Attribute initializations
9 //--------------------------------------------------------------------
12 CSSM_DB_NAME_ATTR(Attributes::RelationID
, 0, "RelationID", 0, NULL
, UINT32
);
13 CSSM_DB_NAME_ATTR(Attributes::RelationName
, 1, "RelationName", 0, NULL
, STRING
);
14 CSSM_DB_NAME_ATTR(Attributes::AttributeID
, 1, "AttributeID", 0, NULL
, UINT32
);
15 CSSM_DB_NAME_ATTR(Attributes::AttributeNameFormat
, 2, "AttributeNameFormat", 0, NULL
, UINT32
);
16 CSSM_DB_NAME_ATTR(Attributes::AttributeName
, 3, "AttributeName", 0, NULL
, STRING
);
17 CSSM_DB_NAME_ATTR(Attributes::AttributeNameID
, 4, "AttributeNameID", 0, NULL
, BLOB
);
18 CSSM_DB_NAME_ATTR(Attributes::AttributeFormat
, 5, "AttributeFormat", 0, NULL
, UINT32
);
20 // Keychain Attributes.
21 //CSSM_DB_INTEGER_ATTR(Attributes::Protected, kProtectedDataKCItemAttr, "Protected", 0, NULL, BLOB);
22 CSSM_DB_INTEGER_ATTR(Attributes::Class
, kClassKCItemAttr
, "Class", 0, NULL
, BLOB
);
23 CSSM_DB_INTEGER_ATTR(Attributes::CreationDate
, kCreationDateKCItemAttr
, "CreationDate", 0, NULL
, BLOB
);
24 CSSM_DB_INTEGER_ATTR(Attributes::ModDate
, kModDateKCItemAttr
, "ModDate", 0, NULL
, BLOB
);
25 CSSM_DB_INTEGER_ATTR(Attributes::Description
, kDescriptionKCItemAttr
, "Description", 0, NULL
, BLOB
);
26 CSSM_DB_INTEGER_ATTR(Attributes::Comment
, kCommentKCItemAttr
, "Comment", 0, NULL
, BLOB
);
27 CSSM_DB_INTEGER_ATTR(Attributes::Creator
, kCreatorKCItemAttr
, "Creator", 0, NULL
, BLOB
);
28 CSSM_DB_INTEGER_ATTR(Attributes::Type
, kTypeKCItemAttr
, "Type", 0, NULL
, BLOB
);
29 CSSM_DB_INTEGER_ATTR(Attributes::ScrCode
, kScriptCodeKCItemAttr
, "ScriptCode", 0, NULL
, BLOB
);
30 CSSM_DB_INTEGER_ATTR(Attributes::Label
, kLabelKCItemAttr
, "Label", 0, NULL
, BLOB
);
31 CSSM_DB_INTEGER_ATTR(Attributes::Invisible
, kInvisibleKCItemAttr
, "Invisible", 0, NULL
, BLOB
);
32 CSSM_DB_INTEGER_ATTR(Attributes::Negative
, kNegativeKCItemAttr
, "Negative", 0, NULL
, BLOB
);
33 CSSM_DB_INTEGER_ATTR(Attributes::Custom
, kCustomIconKCItemAttr
, "CustomIcon", 0, NULL
, BLOB
);
34 // for Generic Password items:
35 CSSM_DB_INTEGER_ATTR(Attributes::Account
, kAccountKCItemAttr
, "Account", 0, NULL
, BLOB
);
36 CSSM_DB_INTEGER_ATTR(Attributes::Service
, kServiceKCItemAttr
, "Service", 0, NULL
, BLOB
);
37 CSSM_DB_INTEGER_ATTR(Attributes::Generic
, kGenericKCItemAttr
, "Generic", 0, NULL
, BLOB
);
38 // for Internet Password items:
39 CSSM_DB_INTEGER_ATTR(Attributes::SecDomain
, kSecurityDomainKCItemAttr
, "SecurityDomain", 0, NULL
, BLOB
);
40 CSSM_DB_INTEGER_ATTR(Attributes::Server
, kServerKCItemAttr
, "Server", 0, NULL
, BLOB
);
41 CSSM_DB_INTEGER_ATTR(Attributes::AuthType
, kAuthTypeKCItemAttr
, "AuthType", 0, NULL
, BLOB
);
42 CSSM_DB_INTEGER_ATTR(Attributes::Port
, kPortKCItemAttr
, "Port", 0, NULL
, BLOB
);
43 CSSM_DB_INTEGER_ATTR(Attributes::Path
, kPathKCItemAttr
, "Path", 0, NULL
, BLOB
);
44 // for AppleShare Password items:
45 CSSM_DB_INTEGER_ATTR(Attributes::Volume
, kVolumeKCItemAttr
, "Volume", 0, NULL
, BLOB
);
46 CSSM_DB_INTEGER_ATTR(Attributes::Addr
, kAddressKCItemAttr
, "Address", 0, NULL
, BLOB
);
47 CSSM_DB_INTEGER_ATTR(Attributes::Signature
, kSignatureKCItemAttr
, "Signature", 0, NULL
, BLOB
);
48 // for AppleShare and Interent Password items:
49 CSSM_DB_INTEGER_ATTR(Attributes::ProtocolType
, kProtocolKCItemAttr
, "Protocol", 0, NULL
, BLOB
);
52 CSSM_DB_NAME_ATTR(Attributes::KeyClass
, 0, "KeyClass", 0, NULL
, UINT32
);
53 CSSM_DB_NAME_ATTR(Attributes::PrintName
, 1, "PrintName", 0, NULL
, BLOB
);
54 CSSM_DB_NAME_ATTR(Attributes::Alias
, 2, "Alias", 0, NULL
, BLOB
);
55 CSSM_DB_NAME_ATTR(Attributes::Permanent
, 3, "Permanent", 0, NULL
, UINT32
);
56 CSSM_DB_NAME_ATTR(Attributes::Private
, 4, "Private", 0, NULL
, UINT32
);
57 CSSM_DB_NAME_ATTR(Attributes::Modifiable
, 5, "Modifiable", 0, NULL
, UINT32
);
58 //CSSM_DB_NAME_ATTR(Attributes::Label, 6, "Label", 0, NULL, BLOB);
59 CSSM_DB_NAME_ATTR(Attributes::ApplicationTag
, 7, "ApplicationTag", 0, NULL
, BLOB
);
60 CSSM_DB_NAME_ATTR(Attributes::KeyCreator
, 8, "KeyCreator", 0, NULL
, BLOB
);
61 CSSM_DB_NAME_ATTR(Attributes::KeyType
, 9, "KeyType", 0, NULL
, UINT32
);
62 CSSM_DB_NAME_ATTR(Attributes::KeySizeInBits
, 10, "KeySizeInBits", 0, NULL
, UINT32
);
63 CSSM_DB_NAME_ATTR(Attributes::EffectiveKeySize
, 11, "EffectiveKeySize", 0, NULL
, UINT32
);
64 CSSM_DB_NAME_ATTR(Attributes::StartDate
, 12, "StartDate", 0, NULL
, TIME_DATE
);
65 CSSM_DB_NAME_ATTR(Attributes::EndDate
, 13, "EndDate", 0, NULL
, TIME_DATE
);
66 CSSM_DB_NAME_ATTR(Attributes::Sensitive
, 14, "Sensitive", 0, NULL
, UINT32
);
67 CSSM_DB_NAME_ATTR(Attributes::AlwaysSensitive
, 15, "AlwaysSensitive", 0, NULL
, UINT32
);
68 CSSM_DB_NAME_ATTR(Attributes::Extractable
, 16, "Extractable", 0, NULL
, UINT32
);
69 CSSM_DB_NAME_ATTR(Attributes::NeverExtractable
, 17, "NeverExtractable", 0, NULL
, UINT32
);
70 CSSM_DB_NAME_ATTR(Attributes::Encrypt
, 18, "Encrypt", 0, NULL
, UINT32
);
71 CSSM_DB_NAME_ATTR(Attributes::Decrypt
, 19, "Decrypt", 0, NULL
, UINT32
);
72 CSSM_DB_NAME_ATTR(Attributes::Derive
, 20, "Derive", 0, NULL
, UINT32
);
73 CSSM_DB_NAME_ATTR(Attributes::Sign
, 21, "Sign", 0, NULL
, UINT32
);
74 CSSM_DB_NAME_ATTR(Attributes::Verify
, 22, "Verify", 0, NULL
, UINT32
);
75 CSSM_DB_NAME_ATTR(Attributes::SignRecover
, 23, "SignRecover", 0, NULL
, UINT32
);
76 CSSM_DB_NAME_ATTR(Attributes::VerifyRecover
, 24, "VerifyRecover", 0, NULL
, UINT32
);
77 CSSM_DB_NAME_ATTR(Attributes::Wrap
, 25, "Wrap", 0, NULL
, UINT32
);
78 CSSM_DB_NAME_ATTR(Attributes::UnWrap
, 26, "UnWrap", 0, NULL
, UINT32
);