diff options
author | Mårten Nordheim <marten.nordheim@qt.io> | 2020-09-07 18:15:14 +0200 |
---|---|---|
committer | Mårten Nordheim <marten.nordheim@qt.io> | 2020-09-12 12:34:57 +0000 |
commit | 2c5e238fd8b117fd40672622351f30e53840ab16 (patch) | |
tree | 84fdc5ea9658cfb0d11169fd231f4dc9f2349a46 /tests/auto/network/kernel | |
parent | c1d10fba3602cd32596140a41612ffdf27ea9072 (diff) |
QAuthenticator: condition using GSSAPI on credentials availability
AFAICT with GSSAPI the normal workflow is to run kinit or similar and
authenticate before running programs relying on it. Therefore
we can try to get the credentials before we choose whether or not
to use Negotiate.
Task-number: QTBUG-85123
Change-Id: If0478fdd45389b2939ad87c2f582776fe56959bb
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit e0918af700acefd6e80562c051e42d0b64097e1f)
Diffstat (limited to 'tests/auto/network/kernel')
-rw-r--r-- | tests/auto/network/kernel/qauthenticator/tst_qauthenticator.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/network/kernel/qauthenticator/tst_qauthenticator.cpp b/tests/auto/network/kernel/qauthenticator/tst_qauthenticator.cpp index 8cef351554..cec05f8806 100644 --- a/tests/auto/network/kernel/qauthenticator/tst_qauthenticator.cpp +++ b/tests/auto/network/kernel/qauthenticator/tst_qauthenticator.cpp @@ -83,7 +83,7 @@ void tst_QAuthenticator::basicAuth() QList<QPair<QByteArray, QByteArray> > headers; headers << qMakePair<QByteArray, QByteArray>(QByteArray("WWW-Authenticate"), "Basic " + data.toUtf8()); - priv->parseHttpResponse(headers, /*isProxy = */ false); + priv->parseHttpResponse(headers, /*isProxy = */ false, {}); QCOMPARE(auth.realm(), realm); QCOMPARE(auth.option("realm").toString(), realm); @@ -131,7 +131,7 @@ void tst_QAuthenticator::ntlmAuth() // Current implementation uses flags: // NTLMSSP_NEGOTIATE_UNICODE | NTLMSSP_NEGOTIATE_NTLM | NTLMSSP_REQUEST_TARGET headers << qMakePair<QByteArray, QByteArray>("WWW-Authenticate", "NTLM"); - priv->parseHttpResponse(headers, /*isProxy = */ false); + priv->parseHttpResponse(headers, /*isProxy = */ false, {}); if (sso) QVERIFY(priv->calculateResponse("GET", "/", "").startsWith("NTLM ")); else @@ -140,7 +140,7 @@ void tst_QAuthenticator::ntlmAuth() // NTLM phase 2: challenge headers.clear(); headers << qMakePair<QByteArray, QByteArray>(QByteArray("WWW-Authenticate"), "NTLM " + data.toUtf8()); - priv->parseHttpResponse(headers, /*isProxy = */ false); + priv->parseHttpResponse(headers, /*isProxy = */ false, {}); QEXPECT_FAIL("with-realm", "NTLM authentication code doesn't extract the realm", Continue); QEXPECT_FAIL("with-realm-sso", "NTLM authentication code doesn't extract the realm", Continue); |