26 #include <linux/list.h>
27 #include <linux/wait.h>
28 #include <linux/net.h>
31 #include <asm/processor.h>
47 unsigned char *sigptr = smb2_signature;
58 cERROR(1,
"%s: Could not update with response\n", __func__);
62 rc = crypto_shash_init(&server->
secmech.sdeschmacsha256->shash);
64 cERROR(1,
"%s: Could not init md5\n", __func__);
68 for (i = 0; i < n_vec; i++) {
69 if (iov[i].iov_len == 0)
71 if (iov[i].iov_base ==
NULL) {
72 cERROR(1,
"null iovec entry");
80 if (iov[0].iov_len <= 8)
84 &server->
secmech.sdeschmacsha256->shash,
89 &server->
secmech.sdeschmacsha256->shash,
93 cERROR(1,
"%s: Could not update with payload\n",
105 p_iov.iov_base, p_iov.iov_len);
112 cERROR(1,
"%s: Could not generate sha256 hash\n", __func__);
135 rc = smb2_calc_signature(rqst, server);
144 char server_response_sig[16];
159 cFYI(1,
"dummy signature received for smb command 0x%x",
171 rc = smb2_calc_signature(rqst, server);
195 smb2_mid_entry_alloc(
const struct smb2_hdr *smb_buffer,
200 if (server ==
NULL) {
201 cERROR(1,
"Null TCP session in smb2_mid_entry_alloc");
237 cFYI(1,
"tcp session dead - return to caller to retry");
248 *mid = smb2_mid_entry_alloc(buf, ses->
server);
261 unsigned int len = get_rfc1002_length(mid->
resp_buf);
277 cERROR(1,
"SMB signature verification returned error = "
291 smb2_seq_num_into_buf(ses->
server, hdr);
293 rc = smb2_get_mid_entry(ses, hdr, &mid);
296 rc = smb2_sign_rqst(rqst, ses->
server);
311 smb2_seq_num_into_buf(server, hdr);
313 mid = smb2_mid_entry_alloc(hdr, server);
317 rc = smb2_sign_rqst(rqst, server);