From 3a52874815b2b58f361ef4eb104f0bebd0cdb6ae Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 26 Dec 2007 17:17:36 -0800 Subject: Encryption works better when you add the client decrypt code :-). Jeremy. (This used to be commit d67b2634068be9c69082a2b8c22c831aba371cd9) --- source3/libsmb/clientgen.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source3') diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c index da225ebc24..ecef293d07 100644 --- a/source3/libsmb/clientgen.c +++ b/source3/libsmb/clientgen.c @@ -86,6 +86,17 @@ static ssize_t client_receive_smb(struct cli_state *cli, size_t maxlen) break; } } + + if (cli_encryption_on(cli)) { + NTSTATUS status = cli_decrypt_message(cli); + if (!NT_STATUS_IS_OK(status)) { + DEBUG(0, ("SMB decryption failed on incoming packet! Error %s\n", + nt_errstr(status))); + cli->smb_rw_error = SMB_READ_BAD_DECRYPT; + return -1; + } + } + show_msg(cli->inbuf); return len; } -- cgit