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
|
||||
{ // request
|
||||
public:
|
||||
char magic[8];
|
||||
quint32 type;
|
||||
quint32 flags;
|
||||
char magic[8] = {'N', 'T', 'L', 'M', 'S', 'S', 'P', '\0'};
|
||||
quint32 type = 1;
|
||||
quint32 flags = NTLMSSP_NEGOTIATE_UNICODE | NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_REQUEST_TARGET | NTLMSSP_NEGOTIATE_ALWAYS_SIGN | NTLMSSP_NEGOTIATE_NTLM2;
|
||||
QNtlmBuffer domain;
|
||||
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
|
||||
QString domainStr, workstationStr;
|
||||
};
|
||||
@ -1088,8 +1082,8 @@ public:
|
||||
class QNtlmPhase2Block
|
||||
{ // challenge
|
||||
public:
|
||||
char magic[8];
|
||||
quint32 type;
|
||||
char magic[8] = {0};
|
||||
quint32 type = 0xffffffff;
|
||||
QNtlmBuffer targetName;
|
||||
quint32 flags = 0;
|
||||
unsigned char challenge[8] = {'\0'};
|
||||
@ -1097,11 +1091,6 @@ public:
|
||||
QNtlmBuffer targetInfo;
|
||||
enum { Size = 48 };
|
||||
|
||||
QNtlmPhase2Block() {
|
||||
magic[0] = 0;
|
||||
type = 0xffffffff;
|
||||
}
|
||||
|
||||
// extracted
|
||||
QString targetNameStr, targetInfoStr;
|
||||
QByteArray targetInfoBuff;
|
||||
@ -1112,23 +1101,17 @@ public:
|
||||
class QNtlmPhase3Block
|
||||
{ // response
|
||||
public:
|
||||
char magic[8];
|
||||
quint32 type;
|
||||
char magic[8] = {'N', 'T', 'L', 'M', 'S', 'S', 'P', '\0'};
|
||||
quint32 type = 3;
|
||||
QNtlmBuffer lmResponse;
|
||||
QNtlmBuffer ntlmResponse;
|
||||
QNtlmBuffer domain;
|
||||
QNtlmBuffer user;
|
||||
QNtlmBuffer workstation;
|
||||
QNtlmBuffer sessionKey;
|
||||
quint32 flags;
|
||||
quint32 flags = NTLMSSP_NEGOTIATE_UNICODE | NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_NEGOTIATE_TARGET_INFO;
|
||||
enum { Size = 64 };
|
||||
|
||||
QNtlmPhase3Block() {
|
||||
qstrncpy(magic, "NTLMSSP", 8);
|
||||
type = 3;
|
||||
flags = NTLMSSP_NEGOTIATE_UNICODE | NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_NEGOTIATE_TARGET_INFO;
|
||||
}
|
||||
|
||||
// extracted
|
||||
QByteArray lmResponseBuf, ntlmResponseBuf;
|
||||
QString domainStr, userStr, workstationStr, sessionKeyStr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user