• Home
  • Raw
  • Download

Lines Matching refs:ses

98 	struct cifs_ses *ses = NULL;  in smb2_get_sign_key()  local
106 list_for_each_entry(ses, &it->smb_ses_list, smb_ses_list) { in smb2_get_sign_key()
107 if (ses->Suid == ses_id) in smb2_get_sign_key()
117 if (ses->binding) { in smb2_get_sign_key()
123 memcpy(key, ses->smb3signingkey, SMB3_SIGN_KEY_SIZE); in smb2_get_sign_key()
131 for (i = 0; i < ses->chan_count; i++) { in smb2_get_sign_key()
132 chan = ses->chans + i; in smb2_get_sign_key()
152 struct cifs_ses *ses; in smb2_find_smb_ses_unlocked() local
154 list_for_each_entry(ses, &server->smb_ses_list, smb_ses_list) { in smb2_find_smb_ses_unlocked()
155 if (ses->Suid != ses_id) in smb2_find_smb_ses_unlocked()
157 return ses; in smb2_find_smb_ses_unlocked()
166 struct cifs_ses *ses; in smb2_find_smb_ses() local
169 ses = smb2_find_smb_ses_unlocked(server, ses_id); in smb2_find_smb_ses()
172 return ses; in smb2_find_smb_ses()
176 smb2_find_smb_sess_tcon_unlocked(struct cifs_ses *ses, __u32 tid) in smb2_find_smb_sess_tcon_unlocked() argument
180 list_for_each_entry(tcon, &ses->tcon_list, tcon_list) { in smb2_find_smb_sess_tcon_unlocked()
198 struct cifs_ses *ses; in smb2_find_smb_tcon() local
202 ses = smb2_find_smb_ses_unlocked(server, ses_id); in smb2_find_smb_tcon()
203 if (!ses) { in smb2_find_smb_tcon()
207 tcon = smb2_find_smb_sess_tcon_unlocked(ses, tid); in smb2_find_smb_tcon()
222 struct cifs_ses *ses; in smb2_calc_signature() local
228 ses = smb2_find_smb_ses(server, shdr->SessionId); in smb2_calc_signature()
229 if (!ses) { in smb2_calc_signature()
250 rc = crypto_shash_setkey(hash, ses->auth_key.response, in smb2_calc_signature()
296 static int generate_key(struct cifs_ses *ses, struct kvec label, in generate_key() argument
306 struct TCP_Server_Info *server = ses->server; in generate_key()
318 ses->auth_key.response, SMB2_NTLMV2_SESSKEY_SIZE); in generate_key()
396 generate_smb3signingkey(struct cifs_ses *ses, in generate_smb3signingkey() argument
401 struct TCP_Server_Info *server = ses->server; in generate_smb3signingkey()
414 if (ses->binding) { in generate_smb3signingkey()
415 rc = generate_key(ses, ptriplet->signing.label, in generate_smb3signingkey()
417 cifs_ses_binding_channel(ses)->signkey, in generate_smb3signingkey()
422 rc = generate_key(ses, ptriplet->signing.label, in generate_smb3signingkey()
424 ses->smb3signingkey, in generate_smb3signingkey()
429 memcpy(ses->chans[0].signkey, ses->smb3signingkey, in generate_smb3signingkey()
432 rc = generate_key(ses, ptriplet->encryption.label, in generate_smb3signingkey()
434 ses->smb3encryptionkey, in generate_smb3signingkey()
436 rc = generate_key(ses, ptriplet->decryption.label, in generate_smb3signingkey()
438 ses->smb3decryptionkey, in generate_smb3signingkey()
453 cifs_dbg(VFS, "Session Id %*ph\n", (int)sizeof(ses->Suid), in generate_smb3signingkey()
454 &ses->Suid); in generate_smb3signingkey()
457 SMB2_NTLMV2_SESSKEY_SIZE, ses->auth_key.response); in generate_smb3signingkey()
459 SMB3_SIGN_KEY_SIZE, ses->smb3signingkey); in generate_smb3signingkey()
463 SMB3_GCM256_CRYPTKEY_SIZE, ses->smb3encryptionkey); in generate_smb3signingkey()
465 SMB3_GCM256_CRYPTKEY_SIZE, ses->smb3decryptionkey); in generate_smb3signingkey()
468 SMB3_GCM128_CRYPTKEY_SIZE, ses->smb3encryptionkey); in generate_smb3signingkey()
470 SMB3_GCM128_CRYPTKEY_SIZE, ses->smb3decryptionkey); in generate_smb3signingkey()
477 generate_smb30signingkey(struct cifs_ses *ses) in generate_smb30signingkey() argument
501 return generate_smb3signingkey(ses, &triplet); in generate_smb30signingkey()
505 generate_smb311signingkey(struct cifs_ses *ses) in generate_smb311signingkey() argument
514 d->context.iov_base = ses->preauth_sha_hash; in generate_smb311signingkey()
520 d->context.iov_base = ses->preauth_sha_hash; in generate_smb311signingkey()
526 d->context.iov_base = ses->preauth_sha_hash; in generate_smb311signingkey()
529 return generate_smb3signingkey(ses, &triplet); in generate_smb311signingkey()
744 smb2_get_mid_entry(struct cifs_ses *ses, struct TCP_Server_Info *server, in smb2_get_mid_entry() argument
759 if (ses->status == CifsNew) { in smb2_get_mid_entry()
766 if (ses->status == CifsExiting) { in smb2_get_mid_entry()
809 smb2_setup_request(struct cifs_ses *ses, struct TCP_Server_Info *server, in smb2_setup_request() argument
819 rc = smb2_get_mid_entry(ses, server, shdr, &mid); in smb2_setup_request()