git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
20a4245
)
libcli:auth: Use netlogon_creds_aes_encrypt() in netlogon_creds_step_crypt()
author
Andreas Schneider
<asn@samba.org>
Fri, 1 Mar 2019 16:33:01 +0000
(17:33 +0100)
committer
Andreas Schneider
<asn@cryptomilk.org>
Wed, 21 Aug 2019 09:57:29 +0000
(09:57 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
libcli/auth/credentials.c
patch
|
blob
|
history
diff --git
a/libcli/auth/credentials.c
b/libcli/auth/credentials.c
index 319dacdac0b8734389e44954359f1486a6b6377c..3b31d1e03007c3ee9219bd23d62949817f8504de 100644
(file)
--- 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);
}