mirror of
https://github.com/samba-team/samba.git
synced 2025-08-30 17:49:30 +03:00
libcli/auth: support AES decryption in netlogon_creds_decrypt_samlogon().
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
committed by
Stefan Metzmacher
parent
be296a21fc
commit
f6cb8049b2
@ -520,6 +520,20 @@ void netlogon_creds_decrypt_samlogon(struct netlogon_creds_CredentialState *cred
|
|||||||
/* find and decyrpt the session keys, return in parameters above */
|
/* find and decyrpt the session keys, return in parameters above */
|
||||||
if (validation_level == 6) {
|
if (validation_level == 6) {
|
||||||
/* they aren't encrypted! */
|
/* they aren't encrypted! */
|
||||||
|
} else if (creds->negotiate_flags & NETLOGON_NEG_SUPPORTS_AES) {
|
||||||
|
if (memcmp(base->key.key, zeros,
|
||||||
|
sizeof(base->key.key)) != 0) {
|
||||||
|
netlogon_creds_aes_decrypt(creds,
|
||||||
|
base->key.key,
|
||||||
|
sizeof(base->key.key));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (memcmp(base->LMSessKey.key, zeros,
|
||||||
|
sizeof(base->LMSessKey.key)) != 0) {
|
||||||
|
netlogon_creds_aes_decrypt(creds,
|
||||||
|
base->LMSessKey.key,
|
||||||
|
sizeof(base->LMSessKey.key));
|
||||||
|
}
|
||||||
} else if (creds->negotiate_flags & NETLOGON_NEG_ARCFOUR) {
|
} else if (creds->negotiate_flags & NETLOGON_NEG_ARCFOUR) {
|
||||||
if (memcmp(base->key.key, zeros,
|
if (memcmp(base->key.key, zeros,
|
||||||
sizeof(base->key.key)) != 0) {
|
sizeof(base->key.key)) != 0) {
|
||||||
|
Reference in New Issue
Block a user