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