neg_context_count++;
}
- if (!enable_negotiate_signing) {
- pr_warn("cifs.ko loaded with param 'enable_negotiate_signing=0', but this parameter "
- "is deprecated. Trying to negotiate signing capabilities anyway...");
- enable_negotiate_signing = true;
+ if (enable_negotiate_signing) {
+ ctxt_len = build_signing_ctxt((struct smb2_signing_capabilities *)
+ pneg_ctxt);
+ *total_len += ctxt_len;
+ pneg_ctxt += ctxt_len;
+ neg_context_count++;
}
- ctxt_len = build_signing_ctxt((struct smb2_signing_capabilities *)
- pneg_ctxt);
- *total_len += ctxt_len;
- pneg_ctxt += ctxt_len;
- neg_context_count++;
-
/* check for and add transport_capabilities and signing capabilities */
req->NegotiateContextCount = cpu_to_le16(neg_context_count);
}
}
/*
- * Throw a warning if signing context was not negotiated.
+ * Throw a warning if user requested signing to be negotiated, but it
+ * wasn't.
*
* Some servers will not send a SMB2_SIGNING_CAPABILITIES context (*),
* so we use AES-CMAC (default in smb311 ops) as it is expected to be
*
* (*) see note "<125> Section 3.2.4.2.2.2" in MS-SMB2
*/
- if (!server->signing_negotiated)
+ if (!server->signing_negotiated && enable_negotiate_signing)
cifs_dbg(VFS, "signing capabilities were not negotiated, using "
"AES-CMAC for message signing\n");