mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-04-30 10:47:48 +02:00
SMB2Client: Minor code refactoring
This commit is contained in:
parent
b0912850dd
commit
42ea6a5124
1 changed files with 2 additions and 1 deletions
|
@ -271,10 +271,11 @@ namespace SMBLibrary.Client
|
||||||
m_isLoggedIn = (response.Header.Status == NTStatus.STATUS_SUCCESS);
|
m_isLoggedIn = (response.Header.Status == NTStatus.STATUS_SUCCESS);
|
||||||
if (m_isLoggedIn)
|
if (m_isLoggedIn)
|
||||||
{
|
{
|
||||||
|
SessionFlags sessionFlags = ((SessionSetupResponse)response).SessionFlags;
|
||||||
m_signingKey = SMB2Cryptography.GenerateSigningKey(m_sessionKey, m_dialect, null);
|
m_signingKey = SMB2Cryptography.GenerateSigningKey(m_sessionKey, m_dialect, null);
|
||||||
if (m_dialect == SMB2Dialect.SMB300)
|
if (m_dialect == SMB2Dialect.SMB300)
|
||||||
{
|
{
|
||||||
m_encryptSessionData = (((SessionSetupResponse)response).SessionFlags & SessionFlags.EncryptData) > 0;
|
m_encryptSessionData = (sessionFlags & SessionFlags.EncryptData) > 0;
|
||||||
m_encryptionKey = SMB2Cryptography.GenerateClientEncryptionKey(m_sessionKey, SMB2Dialect.SMB300, null);
|
m_encryptionKey = SMB2Cryptography.GenerateClientEncryptionKey(m_sessionKey, SMB2Dialect.SMB300, null);
|
||||||
m_decryptionKey = SMB2Cryptography.GenerateClientDecryptionKey(m_sessionKey, SMB2Dialect.SMB300, null);
|
m_decryptionKey = SMB2Cryptography.GenerateClientDecryptionKey(m_sessionKey, SMB2Dialect.SMB300, null);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue