mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-04-30 02:37:49 +02:00
NTLMAuthenticationClient: Set MechanismListMIC when applicable
This commit is contained in:
parent
dc52d4efc1
commit
1284a2168d
1 changed files with 4 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
||||||
* either version 3 of the License, or (at your option) any later version.
|
* either version 3 of the License, or (at your option) any later version.
|
||||||
*/
|
*/
|
||||||
using SMBLibrary.Authentication.GSSAPI;
|
using SMBLibrary.Authentication.GSSAPI;
|
||||||
|
using SMBLibrary.Authentication.NTLM;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Utilities;
|
using Utilities;
|
||||||
|
|
||||||
|
@ -108,6 +109,9 @@ namespace SMBLibrary.Client.Authentication
|
||||||
{
|
{
|
||||||
SimpleProtectedNegotiationTokenResponse outputToken = new SimpleProtectedNegotiationTokenResponse();
|
SimpleProtectedNegotiationTokenResponse outputToken = new SimpleProtectedNegotiationTokenResponse();
|
||||||
outputToken.ResponseToken = authenticateMessageBytes;
|
outputToken.ResponseToken = authenticateMessageBytes;
|
||||||
|
List<byte[]> mechanismTypeList = new List<byte[]>() { GSSProvider.NTLMSSPIdentifier };
|
||||||
|
byte[] mechListBytes = SimpleProtectedNegotiationTokenInit.GetMechanismTypeListBytes(mechanismTypeList);
|
||||||
|
outputToken.MechanismListMIC = NTLMCryptography.ComputeMechListMIC(m_sessionKey, mechListBytes);
|
||||||
return outputToken.GetBytes();
|
return outputToken.GetBytes();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue