• Home
  • Raw
  • Download

Lines Matching refs:rc

45 	int rc;  in __cifs_calc_signature()  local
69 rc = crypto_shash_update(shash, in __cifs_calc_signature()
71 if (rc) { in __cifs_calc_signature()
74 return rc; in __cifs_calc_signature()
87 rc = crypto_shash_update(shash, kaddr, len); in __cifs_calc_signature()
88 if (rc) { in __cifs_calc_signature()
92 return rc; in __cifs_calc_signature()
98 rc = crypto_shash_final(shash, signature); in __cifs_calc_signature()
99 if (rc) in __cifs_calc_signature()
102 return rc; in __cifs_calc_signature()
115 int rc; in cifs_calc_signature() local
120 rc = cifs_alloc_hash("md5", &server->secmech.md5, in cifs_calc_signature()
122 if (rc) in cifs_calc_signature()
125 rc = crypto_shash_init(&server->secmech.sdescmd5->shash); in cifs_calc_signature()
126 if (rc) { in cifs_calc_signature()
128 return rc; in cifs_calc_signature()
131 rc = crypto_shash_update(&server->secmech.sdescmd5->shash, in cifs_calc_signature()
133 if (rc) { in cifs_calc_signature()
135 return rc; in cifs_calc_signature()
146 int rc = 0; in cifs_sign_rqst() local
159 return rc; in cifs_sign_rqst()
163 return rc; in cifs_sign_rqst()
173 rc = cifs_calc_signature(rqst, server, smb_signature); in cifs_sign_rqst()
174 if (rc) in cifs_sign_rqst()
179 return rc; in cifs_sign_rqst()
210 unsigned int rc; in cifs_verify_signature() local
249 rc = cifs_calc_signature(rqst, server, what_we_think_sig_should_be); in cifs_verify_signature()
252 if (rc) in cifs_verify_signature()
253 return rc; in cifs_verify_signature()
268 int rc = 0; in setup_ntlm_response() local
281 rc = SMBNTencrypt(ses->password, ses->server->cryptkey, in setup_ntlm_response()
283 if (rc) { in setup_ntlm_response()
285 __func__, rc); in setup_ntlm_response()
286 return rc; in setup_ntlm_response()
289 rc = E_md4hash(ses->password, temp_key, nls_cp); in setup_ntlm_response()
290 if (rc) { in setup_ntlm_response()
292 __func__, rc); in setup_ntlm_response()
293 return rc; in setup_ntlm_response()
296 rc = mdfour(ses->auth_key.response, temp_key, CIFS_SESS_KEY_SIZE); in setup_ntlm_response()
297 if (rc) in setup_ntlm_response()
299 __func__, rc); in setup_ntlm_response()
301 return rc; in setup_ntlm_response()
309 int rc; in calc_lanman_hash() local
340 rc = SMBencrypt(password_with_pad, cryptkey, lnm_session_key); in calc_lanman_hash()
342 return rc; in calc_lanman_hash()
499 int rc = 0; in calc_ntlmv2_hash() local
514 rc = crypto_shash_setkey(ses->server->secmech.hmacmd5, nt_hash, in calc_ntlmv2_hash()
516 if (rc) { in calc_ntlmv2_hash()
518 return rc; in calc_ntlmv2_hash()
521 rc = crypto_shash_init(&ses->server->secmech.sdeschmacmd5->shash); in calc_ntlmv2_hash()
522 if (rc) { in calc_ntlmv2_hash()
524 return rc; in calc_ntlmv2_hash()
531 rc = -ENOMEM; in calc_ntlmv2_hash()
532 return rc; in calc_ntlmv2_hash()
542 rc = crypto_shash_update(&ses->server->secmech.sdeschmacmd5->shash, in calc_ntlmv2_hash()
545 if (rc) { in calc_ntlmv2_hash()
547 return rc; in calc_ntlmv2_hash()
556 rc = -ENOMEM; in calc_ntlmv2_hash()
557 return rc; in calc_ntlmv2_hash()
561 rc = in calc_ntlmv2_hash()
565 if (rc) { in calc_ntlmv2_hash()
568 return rc; in calc_ntlmv2_hash()
576 rc = -ENOMEM; in calc_ntlmv2_hash()
577 return rc; in calc_ntlmv2_hash()
581 rc = in calc_ntlmv2_hash()
585 if (rc) { in calc_ntlmv2_hash()
588 return rc; in calc_ntlmv2_hash()
592 rc = crypto_shash_final(&ses->server->secmech.sdeschmacmd5->shash, in calc_ntlmv2_hash()
594 if (rc) in calc_ntlmv2_hash()
597 return rc; in calc_ntlmv2_hash()
603 int rc; in CalcNTLMv2_response() local
617 rc = crypto_shash_setkey(ses->server->secmech.hmacmd5, in CalcNTLMv2_response()
619 if (rc) { in CalcNTLMv2_response()
622 return rc; in CalcNTLMv2_response()
625 rc = crypto_shash_init(&ses->server->secmech.sdeschmacmd5->shash); in CalcNTLMv2_response()
626 if (rc) { in CalcNTLMv2_response()
628 return rc; in CalcNTLMv2_response()
637 rc = crypto_shash_update(&ses->server->secmech.sdeschmacmd5->shash, in CalcNTLMv2_response()
639 if (rc) { in CalcNTLMv2_response()
641 return rc; in CalcNTLMv2_response()
645 rc = crypto_shash_final(&ses->server->secmech.sdeschmacmd5->shash, in CalcNTLMv2_response()
647 if (rc) in CalcNTLMv2_response()
650 return rc; in CalcNTLMv2_response()
656 int rc; in setup_ntlmv2_rsp() local
667 rc = find_domain_name(ses, nls_cp); in setup_ntlmv2_rsp()
668 if (rc) { in setup_ntlmv2_rsp()
670 rc); in setup_ntlmv2_rsp()
678 rc = build_avpair_blob(ses, nls_cp); in setup_ntlmv2_rsp()
679 if (rc) { in setup_ntlmv2_rsp()
680 cifs_dbg(VFS, "error %d building av pair blob\n", rc); in setup_ntlmv2_rsp()
697 rc = -ENOMEM; in setup_ntlmv2_rsp()
716 rc = cifs_alloc_hash("hmac(md5)", in setup_ntlmv2_rsp()
719 if (rc) { in setup_ntlmv2_rsp()
724 rc = calc_ntlmv2_hash(ses, ntlmv2_hash, nls_cp); in setup_ntlmv2_rsp()
725 if (rc) { in setup_ntlmv2_rsp()
726 cifs_dbg(VFS, "could not get v2 hash rc %d\n", rc); in setup_ntlmv2_rsp()
731 rc = CalcNTLMv2_response(ses, ntlmv2_hash); in setup_ntlmv2_rsp()
732 if (rc) { in setup_ntlmv2_rsp()
733 cifs_dbg(VFS, "Could not calculate CR1 rc: %d\n", rc); in setup_ntlmv2_rsp()
738 rc = crypto_shash_setkey(ses->server->secmech.hmacmd5, in setup_ntlmv2_rsp()
740 if (rc) { in setup_ntlmv2_rsp()
746 rc = crypto_shash_init(&ses->server->secmech.sdeschmacmd5->shash); in setup_ntlmv2_rsp()
747 if (rc) { in setup_ntlmv2_rsp()
752 rc = crypto_shash_update(&ses->server->secmech.sdeschmacmd5->shash, in setup_ntlmv2_rsp()
755 if (rc) { in setup_ntlmv2_rsp()
760 rc = crypto_shash_final(&ses->server->secmech.sdeschmacmd5->shash, in setup_ntlmv2_rsp()
762 if (rc) in setup_ntlmv2_rsp()
770 return rc; in setup_ntlmv2_rsp()