summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-10-06 13:33:24 +0200
committerJeremy Allison <jra@samba.org>2014-10-07 22:47:04 +0200
commit72d3f931d79d94cd017a60a5c7aac0a0de324748 (patch)
treed49d21928560139a539136d34db94da2aab252a3
parentd021a2d90fcef537419347bbb679346f96313312 (diff)
downloadsamba-72d3f931d79d94cd017a60a5c7aac0a0de324748.tar.gz
libcli/smb: use SMB 3.10 flags for the transform header
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r--libcli/smb/smb2_signing.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/libcli/smb/smb2_signing.c b/libcli/smb/smb2_signing.c
index 97143f71448..72c2c2f7adc 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;
}