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

Lines Matching defs:header

42 	CssmKey::Header &header = ioKey.header();
52 assert(header.HeaderVersion == CSSM_KEYHEADER_VERSION);
53 switch (header.KeyClass)
74 CssmGuidData creatorGuid(header.CspId);
75 CssmDateData startDate(header.StartDate);
76 CssmDateData endDate(header.EndDate);
84 header.attribute(CSSM_KEYATTR_PERMANENT));
86 header.attribute(CSSM_KEYATTR_PRIVATE));
88 header.attribute(CSSM_KEYATTR_MODIFIABLE));
92 attributes.add(KeySchema::KeyType, header.AlgorithmId);
93 attributes.add(KeySchema::KeySizeInBits, header.LogicalKeySizeInBits);
95 attributes.add(KeySchema::EffectiveKeySize, header.LogicalKeySizeInBits);
99 header.attribute(CSSM_KEYATTR_SENSITIVE));
101 header.attribute(CSSM_KEYATTR_ALWAYS_SENSITIVE));
103 header.attribute(CSSM_KEYATTR_EXTRACTABLE));
105 header.attribute(CSSM_KEYATTR_NEVER_EXTRACTABLE));
107 header.useFor(CSSM_KEYUSE_ANY | CSSM_KEYUSE_ENCRYPT));
109 header.useFor(CSSM_KEYUSE_ANY | CSSM_KEYUSE_DECRYPT));
111 header.useFor(CSSM_KEYUSE_ANY | CSSM_KEYUSE_DERIVE));
113 header.useFor(CSSM_KEYUSE_ANY | CSSM_KEYUSE_SIGN));
115 header.useFor(CSSM_KEYUSE_ANY | CSSM_KEYUSE_VERIFY));
117 header.useFor(CSSM_KEYUSE_ANY
120 header.useFor(CSSM_KEYUSE_ANY
123 header.useFor(CSSM_KEYUSE_ANY | CSSM_KEYUSE_WRAP));
125 header.useFor(CSSM_KEYUSE_ANY | CSSM_KEYUSE_UNWRAP));
132 header.cspGuid(session.plugin.myGuid()); // Set the csp guid to me.
145 CssmKey::Header &header = ioKey.header();
146 memset(&header, 0, sizeof(header)); // Clear key header
151 header.HeaderVersion = CSSM_KEYHEADER_VERSION;
155 header.KeyClass = CSSM_KEYCLASS_PUBLIC_KEY;
158 header.KeyClass = CSSM_KEYCLASS_PRIVATE_KEY;
161 header.KeyClass = CSSM_KEYCLASS_SESSION_KEY;
198 header.AlgorithmId = attributes[5]; // KeyType
199 header.LogicalKeySizeInBits = attributes[6]; // KeySizeInBits
201 if (attributes[1]) header.setAttribute(CSSM_KEYATTR_PERMANENT);
202 if (attributes[2]) header.setAttribute(CSSM_KEYATTR_PRIVATE);
203 if (attributes[3]) header.setAttribute(CSSM_KEYATTR_MODIFIABLE);
204 if (attributes[9]) header.setAttribute(CSSM_KEYATTR_SENSITIVE);
205 if (attributes[11]) header.setAttribute(CSSM_KEYATTR_EXTRACTABLE);
206 if (attributes[10]) header.setAttribute(CSSM_KEYATTR_ALWAYS_SENSITIVE);
207 if (attributes[12]) header.setAttribute(CSSM_KEYATTR_NEVER_EXTRACTABLE);
209 if (attributes[13]) header.usage(CSSM_KEYUSE_ENCRYPT);
210 if (attributes[14]) header.usage(CSSM_KEYUSE_DECRYPT);
211 if (attributes[15]) header.usage(CSSM_KEYUSE_DERIVE);
212 if (attributes[16]) header.usage(CSSM_KEYUSE_SIGN);
213 if (attributes[17]) header.usage(CSSM_KEYUSE_VERIFY);
214 if (attributes[18]) header.usage(CSSM_KEYUSE_SIGN_RECOVER);
215 if (attributes[19]) header.usage(CSSM_KEYUSE_VERIFY_RECOVER);
216 if (attributes[20]) header.usage(CSSM_KEYUSE_WRAP);
217 if (attributes[21]) header.usage(CSSM_KEYUSE_UNWRAP);
220 if (header.usage() == (CSSM_KEYUSE_ENCRYPT | CSSM_KEYUSE_DECRYPT
225 header.usage(CSSM_KEYUSE_ANY);
230 header.StartDate = attributes[7].at<CSSM_DATE>(0);
231 header.EndDate = attributes[8].at<CSSM_DATE>(0);
234 header.cspGuid(session.plugin.myGuid()); // Set the csp guid to me.
293 // @@@ Check decoded header against returned header