From 72d3f931d79d94cd017a60a5c7aac0a0de324748 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 6 Oct 2014 13:33:24 +0200 Subject: libcli/smb: use SMB 3.10 flags for the transform header Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- libcli/smb/smb2_signing.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/libcli/smb/smb2_signing.c b/libcli/smb/smb2_signing.c index 97143f7144..72c2c2f7ad 100644 --- a/libcli/smb/smb2_signing.c +++ b/libcli/smb/smb2_signing.c @@ -214,7 +214,6 @@ NTSTATUS smb2_signing_encrypt_pdu(DATA_BLOB encryption_key, int count) { uint8_t *tf; - uint16_t alg; uint8_t sig[16]; int i; size_t a_total; @@ -243,8 +242,7 @@ NTSTATUS smb2_signing_encrypt_pdu(DATA_BLOB encryption_key, m_total += vector[i].iov_len; } - alg = SMB2_ENCRYPTION_AES128_CCM; - SSVAL(tf, SMB2_TF_ALGORITHM, alg); + SSVAL(tf, SMB2_TF_FLAGS, SMB2_TF_FLAGS_ENCRYPTED); SIVAL(tf, SMB2_TF_MSG_SIZE, m_total); ZERO_STRUCT(key); @@ -279,7 +277,7 @@ NTSTATUS smb2_signing_decrypt_pdu(DATA_BLOB decryption_key, int count) { uint8_t *tf; - uint16_t alg; + uint16_t flags; uint8_t *sig_ptr = NULL; uint8_t sig[16]; int i; @@ -310,10 +308,10 @@ NTSTATUS smb2_signing_decrypt_pdu(DATA_BLOB decryption_key, m_total += vector[i].iov_len; } - alg = SVAL(tf, SMB2_TF_ALGORITHM); + flags = SVAL(tf, SMB2_TF_FLAGS); msg_size = IVAL(tf, SMB2_TF_MSG_SIZE); - if (alg != SMB2_ENCRYPTION_AES128_CCM) { + if (flags != SMB2_TF_FLAGS_ENCRYPTED) { return NT_STATUS_ACCESS_DENIED; } -- cgit