• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/Security-57031.1.35/Security/libsecurity_sd_cspdl/lib/

Lines Matching refs:attributes

85 		DbAttributes attributes(inDBHandle);
86 attributes.recordType(mRecordType);
87 attributes.add(KeySchema::KeyClass, mRecordType);
88 attributes.add(KeySchema::PrintName, label);
89 attributes.add(KeySchema::Alias, none);
90 attributes.add(KeySchema::Permanent,
92 attributes.add(KeySchema::Private,
94 attributes.add(KeySchema::Modifiable,
96 attributes.add(KeySchema::Label, label);
97 attributes.add(KeySchema::ApplicationTag, none);
98 attributes.add(KeySchema::KeyCreator, creatorGuid);
99 attributes.add(KeySchema::KeyType, header.AlgorithmId);
100 attributes.add(KeySchema::KeySizeInBits, header.LogicalKeySizeInBits);
102 attributes.add(KeySchema::EffectiveKeySize, header.LogicalKeySizeInBits);
103 attributes.add(KeySchema::StartDate, startDate);
104 attributes.add(KeySchema::EndDate, endDate);
105 attributes.add(KeySchema::Sensitive,
107 attributes.add(KeySchema::AlwaysSensitive,
109 attributes.add(KeySchema::Extractable,
111 attributes.add(KeySchema::NeverExtractable,
113 attributes.add(KeySchema::Encrypt,
115 attributes.add(KeySchema::Decrypt,
117 attributes.add(KeySchema::Derive,
119 attributes.add(KeySchema::Sign,
121 attributes.add(KeySchema::Verify,
123 attributes.add(KeySchema::SignRecover,
126 attributes.add(KeySchema::VerifyRecover,
129 attributes.add(KeySchema::Wrap,
131 attributes.add(KeySchema::Unwrap,
135 mUniqueId = inDBHandle->insert(mRecordType, &attributes, &blob,
175 DbAttributes attributes(mUniqueId->database());
176 attributes.recordType(mRecordType);
177 attributes.add(KeySchema::KeyClass); // 0
178 attributes.add(KeySchema::Permanent); // 1
179 attributes.add(KeySchema::Private); // 2
180 attributes.add(KeySchema::Modifiable); // 3
181 attributes.add(KeySchema::KeyCreator); // 4
182 attributes.add(KeySchema::KeyType); // 5
183 attributes.add(KeySchema::KeySizeInBits); // 6
184 attributes.add(KeySchema::StartDate); // 7
185 attributes.add(KeySchema::EndDate); // 8
186 attributes.add(KeySchema::Sensitive); // 9
187 attributes.add(KeySchema::AlwaysSensitive); // 10
188 attributes.add(KeySchema::Extractable); // 11
189 attributes.add(KeySchema::NeverExtractable); // 12
190 attributes.add(KeySchema::Encrypt); // 13
191 attributes.add(KeySchema::Decrypt); // 14
192 attributes.add(KeySchema::Derive); // 15
193 attributes.add(KeySchema::Sign); // 16
194 attributes.add(KeySchema::Verify); // 17
195 attributes.add(KeySchema::SignRecover); // 18
196 attributes.add(KeySchema::VerifyRecover); // 19
197 attributes.add(KeySchema::Wrap); // 20
198 attributes.add(KeySchema::Unwrap); // 21
200 mUniqueId->get(&attributes, NULL);
203 if (mRecordType != uint32(attributes[0]))
206 header.AlgorithmId = attributes[5]; // KeyType
207 header.LogicalKeySizeInBits = attributes[6]; // KeySizeInBits
209 if (attributes[1]) header.setAttribute(CSSM_KEYATTR_PERMANENT);
210 if (attributes[2]) header.setAttribute(CSSM_KEYATTR_PRIVATE);
211 if (attributes[3]) header.setAttribute(CSSM_KEYATTR_MODIFIABLE);
212 if (attributes[9]) header.setAttribute(CSSM_KEYATTR_SENSITIVE);
213 if (attributes[11]) header.setAttribute(CSSM_KEYATTR_EXTRACTABLE);
214 if (attributes[10]) header.setAttribute(CSSM_KEYATTR_ALWAYS_SENSITIVE);
215 if (attributes[12]) header.setAttribute(CSSM_KEYATTR_NEVER_EXTRACTABLE);
217 if (attributes[13]) header.usage(CSSM_KEYUSE_ENCRYPT);
218 if (attributes[14]) header.usage(CSSM_KEYUSE_DECRYPT);
219 if (attributes[15]) header.usage(CSSM_KEYUSE_DERIVE);
220 if (attributes[16]) header.usage(CSSM_KEYUSE_SIGN);
221 if (attributes[17]) header.usage(CSSM_KEYUSE_VERIFY);
222 if (attributes[18]) header.usage(CSSM_KEYUSE_SIGN_RECOVER);
223 if (attributes[19]) header.usage(CSSM_KEYUSE_VERIFY_RECOVER);
224 if (attributes[20]) header.usage(CSSM_KEYUSE_WRAP);
225 if (attributes[21]) header.usage(CSSM_KEYUSE_UNWRAP);
235 if (!attributes[7].size() || !attributes[8].size())
238 header.StartDate = attributes[7].at<CSSM_DATE>(0);
239 header.EndDate = attributes[8].at<CSSM_DATE>(0);