From d825a2add6c6b80a7cf516d726d27ab2be2c90e8 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 19 Oct 2011 17:37:29 +0200 Subject: s3:libsmb/smb_seal: move smb_set_enclen() to smb_seal.c and make it static there metze Autobuild-User: Stefan Metzmacher Autobuild-Date: Wed Oct 19 19:06:35 CEST 2011 on sn-devel-104 --- source3/libsmb/smb_seal.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'source3/libsmb') diff --git a/source3/libsmb/smb_seal.c b/source3/libsmb/smb_seal.c index e50215b36e..4afd617c91 100644 --- a/source3/libsmb/smb_seal.c +++ b/source3/libsmb/smb_seal.c @@ -47,6 +47,19 @@ NTSTATUS get_enc_ctx_num(const uint8_t *buf, uint16_t *p_enc_ctx_num) return NT_STATUS_INVALID_NETWORK_RESPONSE; } +/******************************************************************* + Set the length and marker of an encrypted smb packet. +********************************************************************/ + +static void smb_set_enclen(char *buf,int len,uint16_t enc_ctx_num) +{ + _smb_setlen(buf,len); + + SCVAL(buf,4,0xFF); + SCVAL(buf,5,'E'); + SSVAL(buf,6,enc_ctx_num); +} + /****************************************************************************** Generic code for client and server. Is encryption turned on ? -- cgit