From fe37fede50b4de020aef42632653c8db042a9ce1 Mon Sep 17 00:00:00 2001 From: Mariusz Zaborski Date: Fri, 6 Apr 2018 21:15:15 +0200 Subject: [PATCH] Fix variable passsed to HashCallback with MIC. The value in the context is not set yet and we need one from authentication message. --- winpr/libwinpr/sspi/NTLM/ntlm_compute.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/winpr/libwinpr/sspi/NTLM/ntlm_compute.c b/winpr/libwinpr/sspi/NTLM/ntlm_compute.c index 9a98eb33d..4e046b38e 100644 --- a/winpr/libwinpr/sspi/NTLM/ntlm_compute.c +++ b/winpr/libwinpr/sspi/NTLM/ntlm_compute.c @@ -346,8 +346,9 @@ int ntlm_compute_ntlm_v2_hash(NTLM_CONTEXT* context, BYTE* hash) } ret = context->HashCallback(context->HashCallbackArg, &credentials->identity, &proofValue, - context->EncryptedRandomSessionKey, context->MessageIntegrityCheck, &micValue, - hash); + context->EncryptedRandomSessionKey, + (&context->AUTHENTICATE_MESSAGE)->MessageIntegrityCheck, + &micValue, hash); sspi_SecBufferFree(&proofValue); sspi_SecBufferFree(&micValue); return ret ? 1 : -1;