Changeset 250422 in webkit


Ignore:
Timestamp:
Sep 27, 2019 7:34:13 AM (5 years ago)
Author:
achristensen@apple.com
Message:

Remove unused WebProcessPool::setCanHandleHTTPSServerTrustEvaluation
https://bugs.webkit.org/show_bug.cgi?id=202285

Reviewed by Youenn Fablet.

Source/WebKit:

The SPI to set this was deprecated in r250377 with a replacement that was adopted in rdar://problem/55731135
I removed a layout test using the old SPI and replaced it with a more precise API test verifying the behavior of the new SPI
before and after the introduction of NSURLSession's _strictTrustEvaluate:queue:completionHandler:

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::setCanHandleHTTPSServerTrustEvaluation): Deleted.

  • NetworkProcess/NetworkProcess.h:

(WebKit::NetworkProcess::canHandleHTTPSServerTrustEvaluation const): Deleted.

  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/NetworkProcessCreationParameters.cpp:

(WebKit::NetworkProcessCreationParameters::encode const):
(WebKit::NetworkProcessCreationParameters::decode):

  • NetworkProcess/NetworkProcessCreationParameters.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
(canNSURLSessionTrustEvaluate): Deleted.

  • UIProcess/API/C/WKContext.cpp:

(WKContextSetCanHandleHTTPSServerTrustEvaluation):

  • UIProcess/API/Cocoa/WKProcessPool.mm:

(-[WKProcessPool _setCanHandleHTTPSServerTrustEvaluation:]):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::ensureNetworkProcess):
(WebKit::WebProcessPool::setCanHandleHTTPSServerTrustEvaluation): Deleted.

  • UIProcess/WebProcessPool.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:

(-[ServerTrustDelegate webView:didFinishNavigation:]):
(-[ServerTrustDelegate webView:didFailProvisionalNavigation:withError:]):
(-[ServerTrustDelegate waitForDidFinishNavigation]):
(-[ServerTrustDelegate waitForDidFailProvisionalNavigationError]):
(-[ServerTrustDelegate authenticationChallengeCount]):
(-[ServerTrustDelegate webView:didReceiveAuthenticationChallenge:completionHandler:]):
(TestWebKitAPI::TEST):

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setCanHandleHTTPSServerTrustEvaluation): Deleted.
(WTR::TestRunner::canDoServerTrustEvaluationInNetworkProcess): Deleted.
(WTR::TestRunner::serverTrustEvaluationCallbackCallsCount): Deleted.

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::didReceiveAuthenticationChallenge):
(WTR::TestController::canDoServerTrustEvaluationInNetworkProcess const): Deleted.

  • WebKitTestRunner/TestController.h:

(WTR::TestController::serverTrustEvaluationCallbackCallsCount const): Deleted.

  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::TestController::canDoServerTrustEvaluationInNetworkProcess const): Deleted.

LayoutTests:

  • http/tests/ssl/certificate-validation-expected.txt: Removed.
  • http/tests/ssl/certificate-validation.html: Removed.
Location:
trunk
Files:
2 deleted
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r250414 r250422  
     12019-09-27  Alex Christensen  <achristensen@webkit.org>
     2
     3        Remove unused WebProcessPool::setCanHandleHTTPSServerTrustEvaluation
     4        https://bugs.webkit.org/show_bug.cgi?id=202285
     5
     6        Reviewed by Youenn Fablet.
     7
     8        * http/tests/ssl/certificate-validation-expected.txt: Removed.
     9        * http/tests/ssl/certificate-validation.html: Removed.
     10
    1112019-09-26  Chris Dumez  <cdumez@apple.com>
    212
  • trunk/Source/WebKit/ChangeLog

    r250421 r250422  
     12019-09-27  Alex Christensen  <achristensen@webkit.org>
     2
     3        Remove unused WebProcessPool::setCanHandleHTTPSServerTrustEvaluation
     4        https://bugs.webkit.org/show_bug.cgi?id=202285
     5
     6        Reviewed by Youenn Fablet.
     7
     8        The SPI to set this was deprecated in r250377 with a replacement that was adopted in rdar://problem/55731135
     9        I removed a layout test using the old SPI and replaced it with a more precise API test verifying the behavior of the new SPI
     10        before and after the introduction of NSURLSession's _strictTrustEvaluate:queue:completionHandler:
     11
     12        * NetworkProcess/NetworkProcess.cpp:
     13        (WebKit::NetworkProcess::initializeNetworkProcess):
     14        (WebKit::NetworkProcess::setCanHandleHTTPSServerTrustEvaluation): Deleted.
     15        * NetworkProcess/NetworkProcess.h:
     16        (WebKit::NetworkProcess::canHandleHTTPSServerTrustEvaluation const): Deleted.
     17        * NetworkProcess/NetworkProcess.messages.in:
     18        * NetworkProcess/NetworkProcessCreationParameters.cpp:
     19        (WebKit::NetworkProcessCreationParameters::encode const):
     20        (WebKit::NetworkProcessCreationParameters::decode):
     21        * NetworkProcess/NetworkProcessCreationParameters.h:
     22        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
     23        (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
     24        (canNSURLSessionTrustEvaluate): Deleted.
     25        * UIProcess/API/C/WKContext.cpp:
     26        (WKContextSetCanHandleHTTPSServerTrustEvaluation):
     27        * UIProcess/API/Cocoa/WKProcessPool.mm:
     28        (-[WKProcessPool _setCanHandleHTTPSServerTrustEvaluation:]):
     29        * UIProcess/WebProcessPool.cpp:
     30        (WebKit::WebProcessPool::ensureNetworkProcess):
     31        (WebKit::WebProcessPool::setCanHandleHTTPSServerTrustEvaluation): Deleted.
     32        * UIProcess/WebProcessPool.h:
     33
    1342019-09-27  Alex Christensen  <achristensen@webkit.org>
    235
  • trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp

    r250413 r250422  
    308308    setCacheModel(parameters.cacheModel, parameters.defaultDataStoreParameters.networkSessionParameters.networkCacheDirectory);
    309309
    310     setCanHandleHTTPSServerTrustEvaluation(parameters.canHandleHTTPSServerTrustEvaluation);
    311 
    312310    if (parameters.shouldUseTestingNetworkSession) {
    313311        m_shouldUseTestingNetworkStorageSession = true;
     
    20182016}
    20192017
    2020 void NetworkProcess::setCanHandleHTTPSServerTrustEvaluation(bool value)
    2021 {
    2022     m_canHandleHTTPSServerTrustEvaluation = value;
    2023 }
    2024 
    20252018void NetworkProcess::getNetworkProcessStatistics(uint64_t callbackID)
    20262019{
  • trunk/Source/WebKit/NetworkProcess/NetworkProcess.h

    r250413 r250422  
    178178    void ensureSession(const PAL::SessionID&, const String& identifier);
    179179#endif
    180 
    181     bool canHandleHTTPSServerTrustEvaluation() const { return m_canHandleHTTPSServerTrustEvaluation; }
    182180
    183181    void processWillSuspendImminently();
     
    415413    void setCacheModel(CacheModel, String overrideCacheStorageDirectory);
    416414    void allowSpecificHTTPSCertificateForHost(const WebCore::CertificateInfo&, const String& host);
    417     void setCanHandleHTTPSServerTrustEvaluation(bool);
    418415    void getNetworkProcessStatistics(uint64_t callbackID);
    419416    void clearCacheForAllOrigins(uint32_t cachesToClear);
     
    481478    bool m_suppressMemoryPressureHandler { false };
    482479    bool m_diskCacheIsDisabledForTesting { false };
    483     bool m_canHandleHTTPSServerTrustEvaluation { true };
    484480    String m_uiProcessBundleIdentifier;
    485481    DownloadManager m_downloadManager;
  • trunk/Source/WebKit/NetworkProcess/NetworkProcess.messages.in

    r250413 r250422  
    6868
    6969    AllowSpecificHTTPSCertificateForHost(WebCore::CertificateInfo certificate, String host)
    70     SetCanHandleHTTPSServerTrustEvaluation(bool value)
    7170   
    7271    GetNetworkProcessStatistics(uint64_t callbackID)
  • trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.cpp

    r250421 r250422  
    4141{
    4242    encoder.encodeEnum(cacheModel);
    43     encoder << canHandleHTTPSServerTrustEvaluation;
    4443#if PLATFORM(MAC)
    4544    encoder << uiProcessCookieStorageIdentifier;
     
    9594    if (!decoder.decodeEnum(result.cacheModel))
    9695        return false;
    97     if (!decoder.decode(result.canHandleHTTPSServerTrustEvaluation))
    98         return false;
    9996
    10097#if PLATFORM(MAC)
  • trunk/Source/WebKit/NetworkProcess/NetworkProcessCreationParameters.h

    r250421 r250422  
    5353
    5454    CacheModel cacheModel { CacheModel::DocumentViewer };
    55     bool canHandleHTTPSServerTrustEvaluation { true };
    5655
    5756#if PLATFORM(MAC)
  • trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm

    r250377 r250422  
    539539
    540540#if HAVE(CFNETWORK_NSURLSESSION_STRICTRUSTEVALUATE)
    541 static bool canNSURLSessionTrustEvaluate()
    542 {
    543     return [NSURLSession respondsToSelector:@selector(_strictTrustEvaluate: queue: completionHandler:)];
    544 }
    545 
    546541static inline void processServerTrustEvaluation(NetworkSessionCocoa *session, NSURLAuthenticationChallenge *challenge, NetworkDataTaskCocoa::TaskIdentifier taskIdentifier, NetworkDataTaskCocoa* networkDataTask, CompletionHandler<void(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential *credential)>&& completionHandler)
    547542{
     
    579574
    580575        // Handle server trust evaluation at platform-level if requested, for performance reasons and to use ATS defaults.
    581         if (!_session->networkProcess().canHandleHTTPSServerTrustEvaluation() || _session->fastServerTrustEvaluationEnabled()) {
     576        if (_session->fastServerTrustEvaluationEnabled()) {
    582577#if HAVE(CFNETWORK_NSURLSESSION_STRICTRUSTEVALUATE)
    583             if (canNSURLSessionTrustEvaluate()) {
    584                 auto* networkDataTask = [self existingTask:task];
    585                 ASSERT(networkDataTask);
    586                 auto decisionHandler = makeBlockPtr([_session = makeWeakPtr(_session.get()), completionHandler = makeBlockPtr(completionHandler), taskIdentifier, networkDataTask = RefPtr<NetworkDataTaskCocoa>(networkDataTask)](NSURLAuthenticationChallenge *challenge, OSStatus trustResult) mutable {
    587                     auto task = WTFMove(networkDataTask);
    588                     auto* session = _session.get();
    589                     if (trustResult == noErr || !session) {
    590                         completionHandler(NSURLSessionAuthChallengePerformDefaultHandling, nil);
    591                         return;
    592                     }
    593                     processServerTrustEvaluation(session, challenge, taskIdentifier, task.get(), WTFMove(completionHandler));
    594                 });
    595                 [NSURLSession _strictTrustEvaluate:challenge queue:[NSOperationQueue mainQueue].underlyingQueue completionHandler:decisionHandler.get()];
    596                 return;
    597             }
    598 #endif
     578            auto* networkDataTask = [self existingTask:task];
     579            ASSERT(networkDataTask);
     580            auto decisionHandler = makeBlockPtr([_session = makeWeakPtr(_session.get()), completionHandler = makeBlockPtr(completionHandler), taskIdentifier, networkDataTask = RefPtr<NetworkDataTaskCocoa>(networkDataTask)](NSURLAuthenticationChallenge *challenge, OSStatus trustResult) mutable {
     581                auto task = WTFMove(networkDataTask);
     582                auto* session = _session.get();
     583                if (trustResult == noErr || !session) {
     584                    completionHandler(NSURLSessionAuthChallengePerformDefaultHandling, nil);
     585                    return;
     586                }
     587                processServerTrustEvaluation(session, challenge, taskIdentifier, task.get(), WTFMove(completionHandler));
     588            });
     589            [NSURLSession _strictTrustEvaluate:challenge queue:[NSOperationQueue mainQueue].underlyingQueue completionHandler:decisionHandler.get()];
     590            return;
     591#else
    599592            return completionHandler(NSURLSessionAuthChallengeRejectProtectionSpace, nil);
     593#endif
    600594        }
    601595    }
  • trunk/Source/WebKit/UIProcess/API/C/WKContext.cpp

    r250421 r250422  
    382382void WKContextSetCanHandleHTTPSServerTrustEvaluation(WKContextRef contextRef, bool value)
    383383{
    384     WebKit::toImpl(contextRef)->setCanHandleHTTPSServerTrustEvaluation(value);
    385384}
    386385
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessPool.mm

    r250292 r250422  
    202202- (void)_setCanHandleHTTPSServerTrustEvaluation:(BOOL)value
    203203{
    204     _processPool->setCanHandleHTTPSServerTrustEvaluation(value);
    205204}
    206205
  • trunk/Source/WebKit/UIProcess/WebProcessPool.cpp

    r250421 r250422  
    492492
    493493    parameters.cacheModel = LegacyGlobalSettings::singleton().cacheModel();
    494     parameters.canHandleHTTPSServerTrustEvaluation = m_canHandleHTTPSServerTrustEvaluation;
    495494
    496495    for (auto& scheme : globalURLSchemesWithCustomProtocolHandlers())
     
    15041503    m_schemesToSetDomainRelaxationForbiddenFor.add(urlScheme);
    15051504    sendToAllProcesses(Messages::WebProcess::SetDomainRelaxationForbiddenForURLScheme(urlScheme));
    1506 }
    1507 
    1508 void WebProcessPool::setCanHandleHTTPSServerTrustEvaluation(bool value)
    1509 {
    1510     m_canHandleHTTPSServerTrustEvaluation = value;
    1511     if (m_networkProcess) {
    1512         m_networkProcess->send(Messages::NetworkProcess::SetCanHandleHTTPSServerTrustEvaluation(value), 0);
    1513         return;
    1514     }
    15151505}
    15161506
  • trunk/Source/WebKit/UIProcess/WebProcessPool.h

    r250321 r250422  
    268268    void registerURLSchemeAsBypassingContentSecurityPolicy(const String&);
    269269    void setDomainRelaxationForbiddenForURLScheme(const String&);
    270     void setCanHandleHTTPSServerTrustEvaluation(bool);
    271270    void registerURLSchemeAsLocal(const String&);
    272271    void registerURLSchemeAsNoAccess(const String&);
     
    709708    bool m_processTerminationEnabled { true };
    710709
    711     bool m_canHandleHTTPSServerTrustEvaluation { true };
    712710    bool m_didNetworkProcessCrash { false };
    713711    std::unique_ptr<NetworkProcessProxy> m_networkProcess;
  • trunk/Tools/ChangeLog

    r250421 r250422  
     12019-09-27  Alex Christensen  <achristensen@webkit.org>
     2
     3        Remove unused WebProcessPool::setCanHandleHTTPSServerTrustEvaluation
     4        https://bugs.webkit.org/show_bug.cgi?id=202285
     5
     6        Reviewed by Youenn Fablet.
     7
     8        * TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm:
     9        (-[ServerTrustDelegate webView:didFinishNavigation:]):
     10        (-[ServerTrustDelegate webView:didFailProvisionalNavigation:withError:]):
     11        (-[ServerTrustDelegate waitForDidFinishNavigation]):
     12        (-[ServerTrustDelegate waitForDidFailProvisionalNavigationError]):
     13        (-[ServerTrustDelegate authenticationChallengeCount]):
     14        (-[ServerTrustDelegate webView:didReceiveAuthenticationChallenge:completionHandler:]):
     15        (TestWebKitAPI::TEST):
     16        * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
     17        * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
     18        (WTR::TestRunner::setCanHandleHTTPSServerTrustEvaluation): Deleted.
     19        (WTR::TestRunner::canDoServerTrustEvaluationInNetworkProcess): Deleted.
     20        (WTR::TestRunner::serverTrustEvaluationCallbackCallsCount): Deleted.
     21        * WebKitTestRunner/InjectedBundle/TestRunner.h:
     22        * WebKitTestRunner/TestController.cpp:
     23        (WTR::TestController::resetStateToConsistentValues):
     24        (WTR::TestController::didReceiveAuthenticationChallenge):
     25        (WTR::TestController::canDoServerTrustEvaluationInNetworkProcess const): Deleted.
     26        * WebKitTestRunner/TestController.h:
     27        (WTR::TestController::serverTrustEvaluationCallbackCallsCount const): Deleted.
     28        * WebKitTestRunner/TestInvocation.cpp:
     29        (WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
     30        * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
     31        (WTR::TestController::canDoServerTrustEvaluationInNetworkProcess const): Deleted.
     32
    1332019-09-27  Alex Christensen  <achristensen@webkit.org>
    234
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/Challenge.mm

    r248181 r250422  
    3434#import <WebKit/WKProcessPoolPrivate.h>
    3535#import <WebKit/WKWebsiteDataRecordPrivate.h>
     36#import <WebKit/WKWebsiteDataStorePrivate.h>
    3637#import <WebKit/WebKit.h>
     38#import <WebKit/_WKErrorRecoveryAttempting.h>
     39#import <WebKit/_WKWebsiteDataStoreConfiguration.h>
     40#import <wtf/Platform.h>
    3741#import <wtf/RetainPtr.h>
    3842#import <wtf/spi/cocoa/SecuritySPI.h>
     
    285289
    286290@interface ServerTrustDelegate : NSObject <WKNavigationDelegate>
    287 @end
    288 
    289 @implementation ServerTrustDelegate
    290 
    291 - (void)webView:(WKWebView *)webView didFinishNavigation:(null_unspecified WKNavigation *)navigation
    292 {
    293     navigationFinished = true;
     291- (void)waitForDidFinishNavigation;
     292- (NSError *)waitForDidFailProvisionalNavigationError;
     293- (size_t)authenticationChallengeCount;
     294@end
     295
     296@implementation ServerTrustDelegate {
     297    size_t _authenticationChallengeCount;
     298    bool _navigationFinished;
     299    RetainPtr<NSError> _provisionalNavigationFailedError;
     300}
     301
     302- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation
     303{
     304    _navigationFinished = true;
     305}
     306
     307- (void)webView:(WKWebView *)webView didFailProvisionalNavigation:(null_unspecified WKNavigation *)navigation withError:(NSError *)error
     308{
     309    _provisionalNavigationFailedError = error;
     310}
     311
     312- (void)waitForDidFinishNavigation
     313{
     314    TestWebKitAPI::Util::run(&_navigationFinished);
     315}
     316
     317- (NSError *)waitForDidFailProvisionalNavigationError
     318{
     319    while (!_provisionalNavigationFailedError)
     320        TestWebKitAPI::Util::spinRunLoop();
     321    return _provisionalNavigationFailedError.autorelease();
     322}
     323
     324- (size_t)authenticationChallengeCount
     325{
     326    return _authenticationChallengeCount;
    294327}
    295328
    296329- (void)webView:(WKWebView *)webView didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential * _Nullable credential))completionHandler
    297330{
     331    _authenticationChallengeCount++;
    298332    SecTrustRef trust = challenge.protectionSpace.serverTrust;
    299333    verifyCertificateAndPublicKey(trust);
     
    322356
    323357    [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://localhost:%d/", server.port()]]]];
    324     TestWebKitAPI::Util::run(&navigationFinished);
     358    [delegate waitForDidFinishNavigation];
    325359
    326360    verifyCertificateAndPublicKey([webView serverTrust]);
     361    EXPECT_EQ([delegate authenticationChallengeCount], 1u);
     362}
     363
     364TEST(WebKit, FastServerTrust)
     365{
     366#if HAVE(CFNETWORK_NSURLSESSION_STRICTRUSTEVALUATE)
     367    TCPServer server(TCPServer::Protocol::HTTPS, TCPServer::respondWithOK);
     368#else
     369    TCPServer server(TCPServer::Protocol::HTTPS, [](SSL* ssl) {
     370        EXPECT_FALSE(ssl);
     371    });
     372#endif
     373    WKWebViewConfiguration *configuration = [[[WKWebViewConfiguration alloc] init] autorelease];
     374    _WKWebsiteDataStoreConfiguration *dataStoreConfiguration = [[[_WKWebsiteDataStoreConfiguration alloc] init] autorelease];
     375    dataStoreConfiguration.fastServerTrustEvaluationEnabled = YES;
     376    configuration.websiteDataStore = [[[WKWebsiteDataStore alloc] _initWithConfiguration:dataStoreConfiguration] autorelease];
     377    auto webView = adoptNS([[WKWebView alloc] initWithFrame:CGRectZero configuration:configuration]);
     378    auto delegate = adoptNS([ServerTrustDelegate new]);
     379    [webView setNavigationDelegate:delegate.get()];
     380    [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://localhost:%d/", server.port()]]]];
     381#if HAVE(CFNETWORK_NSURLSESSION_STRICTRUSTEVALUATE)
     382    [delegate waitForDidFinishNavigation];
     383    EXPECT_EQ([delegate authenticationChallengeCount], 1ull);
     384#else
     385    NSError *error = [delegate waitForDidFailProvisionalNavigationError];
     386    EXPECT_WK_STREQ([error.userInfo[_WKRecoveryAttempterErrorKey] className], @"WKReloadFrameErrorRecoveryAttempter");
     387    EXPECT_WK_STREQ(error.domain, NSURLErrorDomain);
     388    EXPECT_EQ(error.code, NSURLErrorServerCertificateUntrusted);
     389    EXPECT_EQ([delegate authenticationChallengeCount], 0ull);
     390#endif
    327391}
    328392
  • trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl

    r250413 r250422  
    367367    void terminateServiceWorkerProcess();
    368368
    369     void setCanHandleHTTPSServerTrustEvaluation(boolean canHandle);
    370     readonly attribute boolean canDoServerTrustEvaluationInNetworkProcess;
    371369    readonly attribute unsigned long serverTrustEvaluationCallbackCallsCount;
    372370
  • trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp

    r250413 r250422  
    29302930}
    29312931
    2932 void TestRunner::setCanHandleHTTPSServerTrustEvaluation(bool canHandle)
    2933 {
    2934     WKRetainPtr<WKStringRef> messageName = adoptWK(WKStringCreateWithUTF8CString("SetCanHandleHTTPSServerTrustEvaluation"));
    2935     WKRetainPtr<WKBooleanRef> messageBody = adoptWK(WKBooleanCreate(canHandle));
    2936     WKBundlePostSynchronousMessage(InjectedBundle::singleton().bundle(), messageName.get(), messageBody.get(), nullptr);
    2937 }
    2938 
    2939 bool TestRunner::canDoServerTrustEvaluationInNetworkProcess()
    2940 {
    2941     WKRetainPtr<WKStringRef> messageName = adoptWK(WKStringCreateWithUTF8CString("CanDoServerTrustEvaluationInNetworkProcess"));
    2942     WKTypeRef returnData = nullptr;
    2943     WKBundlePagePostSynchronousMessageForTesting(InjectedBundle::singleton().page()->page(), messageName.get(), nullptr, &returnData);
    2944     ASSERT(WKGetTypeID(returnData) == WKBooleanGetTypeID());
    2945     return WKBooleanGetValue(adoptWK(static_cast<WKBooleanRef>(returnData)).get());
    2946 }
    2947 
    29482932unsigned long TestRunner::serverTrustEvaluationCallbackCallsCount()
    29492933{
  • trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h

    r250413 r250422  
    495495    bool keyExistsInKeychain(JSStringRef attrLabel, JSStringRef applicationTagBase64);
    496496
    497     void setCanHandleHTTPSServerTrustEvaluation(bool canHandle);
    498     bool canDoServerTrustEvaluationInNetworkProcess();
    499497    unsigned long serverTrustEvaluationCallbackCallsCount();
    500498
  • trunk/Tools/WebKitTestRunner/TestController.cpp

    r250421 r250422  
    35773577}
    35783578
    3579 bool TestController::canDoServerTrustEvaluationInNetworkProcess() const
    3580 {
    3581     return false;
    3582 }
    3583 
    35843579void TestController::installCustomMenuAction(const String&, bool)
    35853580{
  • trunk/Tools/WebKitTestRunner/TestController.h

    r250413 r250422  
    311311    void installCustomMenuAction(const String& name, bool dismissesAutomatically);
    312312
    313     bool canDoServerTrustEvaluationInNetworkProcess() const;
    314313    uint64_t serverTrustEvaluationCallbackCallsCount() const { return m_serverTrustEvaluationCallbackCallsCount; }
    315314
  • trunk/Tools/WebKitTestRunner/TestInvocation.cpp

    r250413 r250422  
    16301630    }
    16311631
    1632     if (WKStringIsEqualToUTF8CString(messageName, "SetCanHandleHTTPSServerTrustEvaluation")) {
    1633         ASSERT(WKGetTypeID(messageBody) == WKBooleanGetTypeID());
    1634         auto canHandle = WKBooleanGetValue(static_cast<WKBooleanRef>(messageBody));
    1635         WKContextSetCanHandleHTTPSServerTrustEvaluation(TestController::singleton().context(), canHandle);
    1636         return nullptr;
    1637     }
    1638 
    1639     if (WKStringIsEqualToUTF8CString(messageName, "CanDoServerTrustEvaluationInNetworkProcess")) {
    1640         WKRetainPtr<WKTypeRef> result = adoptWK(WKBooleanCreate(TestController::singleton().canDoServerTrustEvaluationInNetworkProcess()));
    1641         return result;
    1642     }
    1643 
    16441632    if (WKStringIsEqualToUTF8CString(messageName, "ServerTrustEvaluationCallbackCallsCount")) {
    16451633        WKRetainPtr<WKTypeRef> result = adoptWK(WKUInt64Create(TestController::singleton().serverTrustEvaluationCallbackCallsCount()));
  • trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm

    r250249 r250422  
    412412}
    413413
    414 bool TestController::canDoServerTrustEvaluationInNetworkProcess() const
    415 {
    416 #if HAVE(CFNETWORK_NSURLSESSION_STRICTRUSTEVALUATE)
    417     return true;
    418 #else
    419     return false;
    420 #endif
    421 }
    422 
    423414void TestController::installCustomMenuAction(const String& name, bool dismissesAutomatically)
    424415{
Note: See TracChangeset for help on using the changeset viewer.