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

Lines Matching defs:header

48 	CssmKey::Header &header = ioKey.header();
59 assert(header.HeaderVersion == CSSM_KEYHEADER_VERSION);
60 switch (header.KeyClass)
81 CssmGuidData creatorGuid(header.CspId);
82 CssmDateData startDate(header.StartDate);
83 CssmDateData endDate(header.EndDate);
91 header.attribute(CSSM_KEYATTR_PERMANENT));
93 header.attribute(CSSM_KEYATTR_PRIVATE));
95 header.attribute(CSSM_KEYATTR_MODIFIABLE));
99 attributes.add(KeySchema::KeyType, header.AlgorithmId);
100 attributes.add(KeySchema::KeySizeInBits, header.LogicalKeySizeInBits);
102 attributes.add(KeySchema::EffectiveKeySize, header.LogicalKeySizeInBits);
106 header.attribute(CSSM_KEYATTR_SENSITIVE));
108 header.attribute(CSSM_KEYATTR_ALWAYS_SENSITIVE));
110 header.attribute(CSSM_KEYATTR_EXTRACTABLE));
112 header.attribute(CSSM_KEYATTR_NEVER_EXTRACTABLE));
114 header.useFor(CSSM_KEYUSE_ANY | CSSM_KEYUSE_ENCRYPT));
116 header.useFor(CSSM_KEYUSE_ANY | CSSM_KEYUSE_DECRYPT));
118 header.useFor(CSSM_KEYUSE_ANY | CSSM_KEYUSE_DERIVE));
120 header.useFor(CSSM_KEYUSE_ANY | CSSM_KEYUSE_SIGN));
122 header.useFor(CSSM_KEYUSE_ANY | CSSM_KEYUSE_VERIFY));
124 header.useFor(CSSM_KEYUSE_ANY
127 header.useFor(CSSM_KEYUSE_ANY
130 header.useFor(CSSM_KEYUSE_ANY | CSSM_KEYUSE_WRAP));
132 header.useFor(CSSM_KEYUSE_ANY | CSSM_KEYUSE_UNWRAP));
140 header.cspGuid(session.plugin.myGuid()); // Set the csp guid to me.
152 CssmKey::Header &header = ioKey.header();
154 memset(&header, 0, sizeof(header)); // Clear key header
159 header.HeaderVersion = CSSM_KEYHEADER_VERSION;
163 header.KeyClass = CSSM_KEYCLASS_PUBLIC_KEY;
166 header.KeyClass = CSSM_KEYCLASS_PRIVATE_KEY;
169 header.KeyClass = CSSM_KEYCLASS_SESSION_KEY;
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);
228 if (header.usage() == (CSSM_KEYUSE_ENCRYPT | CSSM_KEYUSE_DECRYPT
233 header.usage(CSSM_KEYUSE_ANY);
238 header.StartDate = attributes[7].at<CSSM_DATE>(0);
239 header.EndDate = attributes[8].at<CSSM_DATE>(0);
243 header.cspGuid(session.plugin.myGuid()); // Set the csp guid to me.
305 // @@@ Check decoded header against returned header