diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-10-07 15:59:48 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-10-16 21:53:32 +0200 |
commit | 71cb5749f4d7a542a1dccb250f91c58fd2bbf54c (patch) | |
tree | f9db5b15d6ced03a6ec145f5e9443228509fe1c4 /libcli | |
parent | 778ff0c65c5a9260e8a8b3ff152411b4751992a7 (diff) | |
download | samba-71cb5749f4d7a542a1dccb250f91c58fd2bbf54c.tar.gz |
libcli/smb: try to negotiate SMB2_ENCRYPTION_AES128_GCM
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Oct 16 21:53:32 CEST 2014 on sn-devel-104
Diffstat (limited to 'libcli')
-rw-r--r-- | libcli/smb/smbXcli_base.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c index bb586ab50df..61ac6f04f12 100644 --- a/libcli/smb/smbXcli_base.c +++ b/libcli/smb/smbXcli_base.c @@ -4434,10 +4434,11 @@ static struct tevent_req *smbXcli_negprot_smb2_subreq(struct smbXcli_negprot_sta return NULL; } - SSVAL(p, 0, 1); /* ChiperCount */ - SSVAL(p, 2, SMB2_ENCRYPTION_AES128_CCM); + SSVAL(p, 0, 2); /* ChiperCount */ + SSVAL(p, 2, SMB2_ENCRYPTION_AES128_GCM); + SSVAL(p, 4, SMB2_ENCRYPTION_AES128_CCM); - b = data_blob_const(p, 4); + b = data_blob_const(p, 6); status = smb2_negotiate_context_add(state, &c, SMB2_ENCRYPTION_CAPABILITIES, b); if (!NT_STATUS_IS_OK(status)) { @@ -4720,8 +4721,11 @@ static void smbXcli_negprot_smb2_done(struct tevent_req *subreq) cipher_selected = SVAL(cipher->data.data, 2); - if (cipher_selected == SMB2_ENCRYPTION_AES128_CCM) { + switch (cipher_selected) { + case SMB2_ENCRYPTION_AES128_GCM: + case SMB2_ENCRYPTION_AES128_CCM: conn->smb2.server.cipher = cipher_selected; + break; } } } |