From 146a33a845cd38089f0aed6953387123f59bc652 Mon Sep 17 00:00:00 2001
From: Andreas Schneider <asn@samba.org>
Date: Fri, 15 Mar 2019 16:25:28 +0100
Subject: [PATCH 130/187] libcli:smb: Prefer AES-GCM over AES-CCM with GnuTLS
The AES-GCM implementation in GnuTLS is faster.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Adapted to remove Samba AES support
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 454ed53221b1374ad8148e922b64c3788ad4998e)
---
libcli/smb/smbXcli_base.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c
index d9837d48083..f0ba7803a53 100644
--- a/libcli/smb/smbXcli_base.c
+++ b/libcli/smb/smbXcli_base.c
@@ -4788,12 +4788,9 @@ static struct tevent_req *smbXcli_negprot_smb2_subreq(struct smbXcli_negprot_sta
}
SSVAL(p, 0, 2); /* ChiperCount */
- /*
- * For now we preferr CCM because our implementation
- * is faster than GCM, see bug #11451.
- */
- SSVAL(p, 2, SMB2_ENCRYPTION_AES128_CCM);
- SSVAL(p, 4, SMB2_ENCRYPTION_AES128_GCM);
+
+ SSVAL(p, 2, SMB2_ENCRYPTION_AES128_GCM);
+ SSVAL(p, 4, SMB2_ENCRYPTION_AES128_CCM);
status = smb2_negotiate_context_add(
state, &c, SMB2_ENCRYPTION_CAPABILITIES, p, 6);
--
2.23.0