Lines Matching refs:err
104 OSStatus err;
121 err = SecAccessCreate(label, NULL, &initial_access);
123 if (err)
124 crypto::LogCSSMError("SecAccessCreate", err);
128 err = CreateRSAKeyPair(key_size_in_bits_, initial_access,
130 if (err)
135 err = SecKeychainItemExport(public_key, kSecFormatBSAFE, 0, NULL,
137 if (err) {
138 crypto::LogCSSMError("SecKeychainItemExpor", err);
144 err = SecAsn1CoderCreate(&coder);
145 if (err) {
146 crypto::LogCSSMError("SecAsn1CoderCreate", err);
163 err = SecAsn1EncodeItem(coder, &spkac.pkac,
165 if (err) {
166 crypto::LogCSSMError("SecAsn1EncodeItem", err);
171 err = SignData(encoded, private_key, &signature);
172 if (err)
181 err = SecAsn1EncodeItem(coder, &spkac,
183 if (err) {
184 crypto::LogCSSMError("SecAsn1EncodeItem", err);
194 if (err)
195 LOG(ERROR) << "SSL Keygen failed! OSStatus = " << err;
229 OSStatus err;
231 err = SecKeychainCopyDefault(&keychain);
232 if (err) {
233 crypto::LogCSSMError("SecKeychainCopyDefault", err);
234 return err;
239 err = SecKeyCreatePair(
254 if (err)
255 crypto::LogCSSMError("SecKeyCreatePair", err);
256 return err;
262 OSStatus err;
266 err = SecKeyGetCredentials(key,
271 if (err) {
272 crypto::LogCSSMError("SecKeyGetCredentials", err);
273 return err;
279 err = SecKeyGetCSPHandle(key, &csp_handle);
281 if (err) {
282 crypto::LogCSSMError("SecKeyGetCSPHandle", err);
283 return err;
289 err = SecKeyGetCSSMKey(key, &cssm_key);
291 if (err) {
292 crypto::LogCSSMError("SecKeyGetCSSMKey", err);
293 return err;
296 err = CSSM_CSP_CreateSignatureContext(csp_handle,
301 if (err)
302 crypto::LogCSSMError("CSSM_CSP_CreateSignatureContext", err);
303 return err;
310 OSStatus err = CreateSignatureContext(private_key,
313 if (err) {
314 crypto::LogCSSMError("CreateSignatureContext", err);
315 return err;
317 err = CSSM_SignData(cc_handle, &data, 1, CSSM_ALGID_NONE, signature);
318 if (err)
319 crypto::LogCSSMError("CSSM_SignData", err);
321 return err;