From 5089442bfdbeff7314e589387c3702f9c401e12a Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=BCnther=20Deschner?= Date: Wed, 5 Dec 2012 16:20:14 +0100 Subject: [PATCH] s4-torture: support AES encryption in interactive samlogon tests in rpc.samr. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Guenther Signed-off-by: Günther Deschner Reviewed-by: Stefan Metzmacher --- source4/torture/rpc/samr.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c index a460211e812..7f50ce95d5f 100644 --- a/source4/torture/rpc/samr.c +++ b/source4/torture/rpc/samr.c @@ -2888,7 +2888,10 @@ static bool test_SamLogon(struct torture_context *tctx, } E_md4hash(cli_credentials_get_password(test_credentials), pinfo.ntpassword.hash); - if (creds->negotiate_flags & NETLOGON_NEG_ARCFOUR) { + if (creds->negotiate_flags & NETLOGON_NEG_SUPPORTS_AES) { + netlogon_creds_aes_encrypt(creds, pinfo.lmpassword.hash, 16); + netlogon_creds_aes_encrypt(creds, pinfo.ntpassword.hash, 16); + } else if (creds->negotiate_flags & NETLOGON_NEG_ARCFOUR) { netlogon_creds_arcfour_crypt(creds, pinfo.lmpassword.hash, 16); netlogon_creds_arcfour_crypt(creds, pinfo.ntpassword.hash, 16); } else { @@ -3072,7 +3075,7 @@ static bool setup_schannel_netlogon_pipe(struct torture_context *tctx, * with INTERNAL_ERROR */ b->flags &= ~DCERPC_AUTH_OPTIONS; - b->flags |= DCERPC_SCHANNEL | DCERPC_SIGN | DCERPC_SCHANNEL_128; + b->flags |= DCERPC_SCHANNEL | DCERPC_SIGN | DCERPC_SCHANNEL_AUTO; torture_assert_ntstatus_ok(tctx, dcerpc_pipe_connect_b(tctx, p, b, &ndr_table_netlogon, -- 2.11.4.GIT