mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-04-30 10:47:48 +02:00
IntegratedNTLMAuthenticationProvider: The correct SessionKey will now be returned instead of EncryptedRandomSessionKey
This commit is contained in:
parent
f1d65fedd2
commit
832b791fcc
1 changed files with 1 additions and 3 deletions
|
@ -23,7 +23,6 @@ namespace SMBLibrary.Win32.Security
|
|||
public SecHandle ServerContext;
|
||||
public string WorkStation;
|
||||
public string UserName;
|
||||
public byte[] SessionKey;
|
||||
public bool IsGuest;
|
||||
|
||||
public AuthContext(SecHandle serverContext, string workStation)
|
||||
|
@ -74,7 +73,6 @@ namespace SMBLibrary.Win32.Security
|
|||
}
|
||||
|
||||
authContext.UserName = message.UserName;
|
||||
authContext.SessionKey = message.EncryptedRandomSessionKey;
|
||||
if ((message.NegotiateFlags & NegotiateFlags.Anonymous) > 0 ||
|
||||
!IsUserExists(message.UserName))
|
||||
{
|
||||
|
@ -153,7 +151,7 @@ namespace SMBLibrary.Win32.Security
|
|||
case GSSAttributeName.MachineName:
|
||||
return authContext.WorkStation;
|
||||
case GSSAttributeName.SessionKey:
|
||||
return authContext.SessionKey;
|
||||
return SSPIHelper.GetSessionKey(authContext.ServerContext);
|
||||
case GSSAttributeName.UserName:
|
||||
return authContext.UserName;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue