Use NSDMI for all the members of the QNtlmPhaseBlock classes
After the base and derived classes have been merged we can uniformize the initialization as well. Task-number: QTBUG-127539 Change-Id: I3828dc973fd7b3ccd06272e2e26eaae4edab8768 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit c3093b3d8f27fa3df14e04245dea9ed1e781f61e) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
722c7edf03
commit
92d9a741c0
@ -1068,18 +1068,12 @@ static QDataStream& operator>>(QDataStream& s, QNtlmBuffer& b)
|
|||||||
class QNtlmPhase1Block
|
class QNtlmPhase1Block
|
||||||
{ // request
|
{ // request
|
||||||
public:
|
public:
|
||||||
char magic[8];
|
char magic[8] = {'N', 'T', 'L', 'M', 'S', 'S', 'P', '\0'};
|
||||||
quint32 type;
|
quint32 type = 1;
|
||||||
quint32 flags;
|
quint32 flags = NTLMSSP_NEGOTIATE_UNICODE | NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_REQUEST_TARGET | NTLMSSP_NEGOTIATE_ALWAYS_SIGN | NTLMSSP_NEGOTIATE_NTLM2;
|
||||||
QNtlmBuffer domain;
|
QNtlmBuffer domain;
|
||||||
QNtlmBuffer workstation;
|
QNtlmBuffer workstation;
|
||||||
|
|
||||||
QNtlmPhase1Block() {
|
|
||||||
qstrncpy(magic, "NTLMSSP", 8);
|
|
||||||
type = 1;
|
|
||||||
flags = NTLMSSP_NEGOTIATE_UNICODE | NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_REQUEST_TARGET | NTLMSSP_NEGOTIATE_ALWAYS_SIGN | NTLMSSP_NEGOTIATE_NTLM2;
|
|
||||||
}
|
|
||||||
|
|
||||||
// extracted
|
// extracted
|
||||||
QString domainStr, workstationStr;
|
QString domainStr, workstationStr;
|
||||||
};
|
};
|
||||||
@ -1088,8 +1082,8 @@ public:
|
|||||||
class QNtlmPhase2Block
|
class QNtlmPhase2Block
|
||||||
{ // challenge
|
{ // challenge
|
||||||
public:
|
public:
|
||||||
char magic[8];
|
char magic[8] = {0};
|
||||||
quint32 type;
|
quint32 type = 0xffffffff;
|
||||||
QNtlmBuffer targetName;
|
QNtlmBuffer targetName;
|
||||||
quint32 flags = 0;
|
quint32 flags = 0;
|
||||||
unsigned char challenge[8] = {'\0'};
|
unsigned char challenge[8] = {'\0'};
|
||||||
@ -1097,11 +1091,6 @@ public:
|
|||||||
QNtlmBuffer targetInfo;
|
QNtlmBuffer targetInfo;
|
||||||
enum { Size = 48 };
|
enum { Size = 48 };
|
||||||
|
|
||||||
QNtlmPhase2Block() {
|
|
||||||
magic[0] = 0;
|
|
||||||
type = 0xffffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
// extracted
|
// extracted
|
||||||
QString targetNameStr, targetInfoStr;
|
QString targetNameStr, targetInfoStr;
|
||||||
QByteArray targetInfoBuff;
|
QByteArray targetInfoBuff;
|
||||||
@ -1112,23 +1101,17 @@ public:
|
|||||||
class QNtlmPhase3Block
|
class QNtlmPhase3Block
|
||||||
{ // response
|
{ // response
|
||||||
public:
|
public:
|
||||||
char magic[8];
|
char magic[8] = {'N', 'T', 'L', 'M', 'S', 'S', 'P', '\0'};
|
||||||
quint32 type;
|
quint32 type = 3;
|
||||||
QNtlmBuffer lmResponse;
|
QNtlmBuffer lmResponse;
|
||||||
QNtlmBuffer ntlmResponse;
|
QNtlmBuffer ntlmResponse;
|
||||||
QNtlmBuffer domain;
|
QNtlmBuffer domain;
|
||||||
QNtlmBuffer user;
|
QNtlmBuffer user;
|
||||||
QNtlmBuffer workstation;
|
QNtlmBuffer workstation;
|
||||||
QNtlmBuffer sessionKey;
|
QNtlmBuffer sessionKey;
|
||||||
quint32 flags;
|
quint32 flags = NTLMSSP_NEGOTIATE_UNICODE | NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_NEGOTIATE_TARGET_INFO;
|
||||||
enum { Size = 64 };
|
enum { Size = 64 };
|
||||||
|
|
||||||
QNtlmPhase3Block() {
|
|
||||||
qstrncpy(magic, "NTLMSSP", 8);
|
|
||||||
type = 3;
|
|
||||||
flags = NTLMSSP_NEGOTIATE_UNICODE | NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_NEGOTIATE_TARGET_INFO;
|
|
||||||
}
|
|
||||||
|
|
||||||
// extracted
|
// extracted
|
||||||
QByteArray lmResponseBuf, ntlmResponseBuf;
|
QByteArray lmResponseBuf, ntlmResponseBuf;
|
||||||
QString domainStr, userStr, workstationStr, sessionKeyStr;
|
QString domainStr, userStr, workstationStr, sessionKeyStr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user