SMB3.1.1: Add support for negotiating signing algorithm
authorSteve French <stfrench@microsoft.com>
Mon, 5 Jul 2021 20:05:39 +0000 (15:05 -0500)
committerSteve French <stfrench@microsoft.com>
Fri, 9 Jul 2021 17:48:58 +0000 (12:48 -0500)
commit53d31a3ffd60176af24f2f77fb3a7e567134eb90
treea38b05a4b6d974b3e97193639e565f6d2b2faf59
parente0a3cbcd5cef00cace01546cc6eaaa3b31940da9
SMB3.1.1: Add support for negotiating signing algorithm

Support for faster packet signing (using GMAC instead of CMAC) can
now be negotiated to some newer servers, including Windows.
See MS-SMB2 section 2.2.3.17.

This patch adds support for sending the new negotiate context
with the first of three supported signing algorithms (AES-CMAC)
and decoding the response.  A followon patch will add support
for sending the other two (including AES-GMAC, which is fastest)
and changing the signing algorithm used based on what was
negotiated.

To allow the client to request GMAC signing set module parameter
"enable_negotiate_signing" to 1.

Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Reviewed-by: Pavel Shilovsky <pshilovsky@samba.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/cifsfs.c
fs/cifs/cifsglob.h
fs/cifs/smb2pdu.c
fs/cifs/smb2pdu.h