Changeset 171859 in webkit


Ignore:
Timestamp:
Jul 31, 2014 9:45:19 AM (10 years ago)
Author:
mitz@apple.com
Message:

[WK2] Regression tests can't load HTTPS pages with NetworkProcess due to self-signed certificate
https://bugs.webkit.org/show_bug.cgi?id=115282

Reviewed by Sam Weinig.

Tools:

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::canAuthenticateAgainstProtectionSpaceInFrame): Return true for any
local host server trust protection space.
(WTR::TestController::didReceiveAuthenticationChallengeInFrame): Respond with a non-empty
credential to server trust challenges.

LayoutTests:

  • platform/mac-wk2/TestExpectations: Removed the exceptions listed under this bug.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r171853 r171859  
     12014-07-31  Dan Bernstein  <mitz@apple.com>
     2
     3        [WK2] Regression tests can't load HTTPS pages with NetworkProcess due to self-signed certificate
     4        https://bugs.webkit.org/show_bug.cgi?id=115282
     5
     6        Reviewed by Sam Weinig.
     7
     8        * platform/mac-wk2/TestExpectations: Removed the exceptions listed under this bug.
     9
    1102014-07-31  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
    211
  • trunk/LayoutTests/platform/mac-wk2/TestExpectations

    r171772 r171859  
    629629[ Mavericks ] storage/websql/private-browsing-noread-nowrite.html [ Skip ]
    630630
    631 # https://bugs.webkit.org/show_bug.cgi?id=115282
    632 # PPT: https loads fail due to self-signed certificate
    633 [ Mavericks ] http/tests/appcache/different-https-origin-resource-main.html [ Skip ]
    634 [ Mavericks ] http/tests/cache/history-only-cached-subresource-loads-max-age-https.html [ Skip ]
    635 [ Mavericks ] http/tests/misc/dns-prefetch-control.html [ Skip ]
    636 [ Mavericks ] http/tests/navigation/https-in-page-cache.html [ Skip ]
    637 [ Mavericks ] http/tests/navigation/ping-cross-origin-from-https.html [ Skip ]
    638 [ Mavericks ] http/tests/security/contentSecurityPolicy/block-mixed-content-hides-warning.html [ Skip ]
    639 [ Mavericks ] http/tests/security/contentSecurityPolicy/script-src-star-cross-scheme.html [ Skip ]
    640 [ Mavericks ] http/tests/security/mixedContent [ Skip ]
    641 [ Mavericks ] http/tests/security/originHeader/origin-header-for-https.html [ Skip ]
    642 [ Mavericks ] http/tests/security/referrer-policy-https-always.html [ Skip ]
    643 [ Mavericks ] http/tests/security/referrer-policy-https-default.html [ Skip ]
    644 [ Mavericks ] http/tests/security/referrer-policy-https-never.html [ Skip ]
    645 [ Mavericks ] http/tests/security/referrer-policy-https-origin.html [ Skip ]
    646 [ Mavericks ] http/tests/security/referrer-policy-redirect-link.html [ Skip ]
    647 [ Mavericks ] http/tests/security/referrer-policy-redirect.html [ Skip ]
    648 [ Mavericks ] http/tests/ssl [ Skip ]
    649 
    650631# testRunner.setAlwaysAcceptCookies does not work with NetworkProcess
    651632[ Mavericks ] http/tests/cookies/third-party-cookie-relaxing.html [ Skip ]
  • trunk/Tools/ChangeLog

    r171856 r171859  
     12014-07-31  Dan Bernstein  <mitz@apple.com>
     2
     3        [WK2] Regression tests can't load HTTPS pages with NetworkProcess due to self-signed certificate
     4        https://bugs.webkit.org/show_bug.cgi?id=115282
     5
     6        Reviewed by Sam Weinig.
     7
     8        * WebKitTestRunner/TestController.cpp:
     9        (WTR::TestController::canAuthenticateAgainstProtectionSpaceInFrame): Return true for any
     10        local host server trust protection space.
     11        (WTR::TestController::didReceiveAuthenticationChallengeInFrame): Respond with a non-empty
     12        credential to server trust challenges.
     13
    1142014-07-31  Tibor Meszaros  <tmeszaros.u-szeged@partner.samsung.com>
    215
  • trunk/Tools/WebKitTestRunner/TestController.cpp

    r171772 r171859  
    11991199bool TestController::canAuthenticateAgainstProtectionSpaceInFrame(WKPageRef, WKFrameRef, WKProtectionSpaceRef protectionSpace, const void*)
    12001200{
    1201     return WKProtectionSpaceGetAuthenticationScheme(protectionSpace) <= kWKProtectionSpaceAuthenticationSchemeHTTPDigest;
     1201    WKProtectionSpaceAuthenticationScheme authenticationScheme = WKProtectionSpaceGetAuthenticationScheme(protectionSpace);
     1202
     1203    if (authenticationScheme == kWKProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested) {
     1204        std::string host = toSTD(adoptWK(WKProtectionSpaceCopyHost(protectionSpace)).get());
     1205        return host == "localhost" || host == "127.0.0.1";
     1206    }
     1207
     1208    return authenticationScheme <= kWKProtectionSpaceAuthenticationSchemeHTTPDigest;
    12021209}
    12031210
     
    12501257void TestController::didReceiveAuthenticationChallengeInFrame(WKPageRef page, WKFrameRef frame, WKAuthenticationChallengeRef authenticationChallenge)
    12511258{
     1259    WKProtectionSpaceRef protectionSpace = WKAuthenticationChallengeGetProtectionSpace(authenticationChallenge);
     1260    WKAuthenticationDecisionListenerRef decisionListener = WKAuthenticationChallengeGetDecisionListener(authenticationChallenge);
     1261
     1262    if (WKProtectionSpaceGetAuthenticationScheme(protectionSpace) == kWKProtectionSpaceAuthenticationSchemeServerTrustEvaluationRequested) {
     1263        // Any non-empty credential signals to accept the server trust. Since the cross-platform API
     1264        // doesn't expose a way to create a credential from server trust, we use a password credential.
     1265
     1266        WKRetainPtr<WKCredentialRef> credential = adoptWK(WKCredentialCreate(toWK("accept server trust").get(), toWK("").get(), kWKCredentialPersistenceNone));
     1267        WKAuthenticationDecisionListenerUseCredential(decisionListener, credential.get());
     1268        return;
     1269    }
     1270
    12521271    String message;
    12531272    if (!m_handlesAuthenticationChallenges)
     
    12571276    m_currentInvocation->outputText(message);
    12581277
    1259     WKAuthenticationDecisionListenerRef decisionListener = WKAuthenticationChallengeGetDecisionListener(authenticationChallenge);
    12601278    if (!m_handlesAuthenticationChallenges) {
    12611279        WKAuthenticationDecisionListenerUseCredential(decisionListener, 0);
Note: See TracChangeset for help on using the changeset viewer.