36 lines
1.2 KiB
Diff
36 lines
1.2 KiB
Diff
From 563e6a454706f29171b4bf06473cc40c557b0eed Mon Sep 17 00:00:00 2001
|
|
From: Andreas Schneider <asn@samba.org>
|
|
Date: Fri, 1 Mar 2019 17:33:01 +0100
|
|
Subject: [PATCH 088/187] libcli:auth: Use netlogon_creds_aes_encrypt() in
|
|
netlogon_creds_step_crypt()
|
|
|
|
Signed-off-by: Andreas Schneider <asn@samba.org>
|
|
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
|
|
(cherry picked from commit cd97c47873007bfc502926070a758b520d95abf1)
|
|
---
|
|
libcli/auth/credentials.c | 7 ++-----
|
|
1 file changed, 2 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/libcli/auth/credentials.c b/libcli/auth/credentials.c
|
|
index 319dacdac0b..3b31d1e0300 100644
|
|
--- a/libcli/auth/credentials.c
|
|
+++ b/libcli/auth/credentials.c
|
|
@@ -35,12 +35,9 @@ static void netlogon_creds_step_crypt(struct netlogon_creds_CredentialState *cre
|
|
struct netr_Credential *out)
|
|
{
|
|
if (creds->negotiate_flags & NETLOGON_NEG_SUPPORTS_AES) {
|
|
- AES_KEY key;
|
|
- uint8_t iv[AES_BLOCK_SIZE] = {0};
|
|
+ memcpy(out->data, in->data, sizeof(out->data));
|
|
|
|
- AES_set_encrypt_key(creds->session_key, 128, &key);
|
|
-
|
|
- aes_cfb8_encrypt(in->data, out->data, 8, &key, iv, AES_ENCRYPT);
|
|
+ netlogon_creds_aes_encrypt(creds, out->data, sizeof(out->data));
|
|
} else {
|
|
des_crypt112(out->data, in->data, creds->session_key, 1);
|
|
}
|
|
--
|
|
2.23.0
|
|
|