⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 249019 in webkit


Ignore:
Timestamp:
Aug 22, 2019, 11:13:08 AM (7 years ago)
Author:
commit-queue@webkit.org
Message:

Disable legacy TLS versions and add a temporary default to re-enable it
https://bugs.webkit.org/show_bug.cgi?id=200945

Patch by Alex Christensen <achristensen@webkit.org> on 2019-08-22
Reviewed by Brady Eidson.

Source/WebKit:

  • NetworkProcess/NetworkSessionCreationParameters.cpp:

(WebKit::NetworkSessionCreationParameters::privateSessionParameters):
(WebKit::NetworkSessionCreationParameters::encode const):
(WebKit::NetworkSessionCreationParameters::decode):

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

(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeNetworkProcess):

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::parameters):

Source/WTF:

  • wtf/Platform.h:
Location:
trunk/Source
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r249015 r249019  
     12019-08-22  Alex Christensen  <achristensen@webkit.org>
     2
     3        Disable legacy TLS versions and add a temporary default to re-enable it
     4        https://bugs.webkit.org/show_bug.cgi?id=200945
     5
     6        Reviewed by Brady Eidson.
     7
     8        * wtf/Platform.h:
     9
    1102019-08-22  Darin Adler  <darin@apple.com>
    211
  • trunk/Source/WTF/wtf/Platform.h

    r248950 r249019  
    16101610#endif
    16111611
     1612#if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000 || PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500)
     1613#define HAVE_TLS_PROTOCOL_VERSION_T 1
     1614#endif
     1615
    16121616#if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 130000
    16131617#define USE_UICONTEXTMENU 1
  • trunk/Source/WebKit/ChangeLog

    r249013 r249019  
     12019-08-22  Alex Christensen  <achristensen@webkit.org>
     2
     3        Disable legacy TLS versions and add a temporary default to re-enable it
     4        https://bugs.webkit.org/show_bug.cgi?id=200945
     5
     6        Reviewed by Brady Eidson.
     7
     8        * NetworkProcess/NetworkSessionCreationParameters.cpp:
     9        (WebKit::NetworkSessionCreationParameters::privateSessionParameters):
     10        (WebKit::NetworkSessionCreationParameters::encode const):
     11        (WebKit::NetworkSessionCreationParameters::decode):
     12        * NetworkProcess/NetworkSessionCreationParameters.h:
     13        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
     14        (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
     15        * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
     16        (WebKit::WebProcessPool::platformInitializeNetworkProcess):
     17        * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
     18        (WebKit::WebsiteDataStore::parameters):
     19
    1202019-08-17  Darin Adler  <darin@apple.com>
    221
  • trunk/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.cpp

    r248734 r249019  
    4141NetworkSessionCreationParameters NetworkSessionCreationParameters::privateSessionParameters(const PAL::SessionID& sessionID)
    4242{
    43     return { sessionID, { }, AllowsCellularAccess::Yes
    44 #if PLATFORM(COCOA)
    45         , { }, { }, { }, AllowsTLSFallback::Yes, false, { }, { }, { }
     43    return {
     44        sessionID
     45        , { }
     46        , AllowsCellularAccess::Yes
     47#if PLATFORM(COCOA)
     48        , { }
     49        , { }
     50        , { }
     51        , AllowsTLSFallback::Yes
     52        , false
     53        , { }
     54        , { }
     55        , { }
     56        , false
    4657#endif
    4758#if USE(SOUP)
    48         , { }, SoupCookiePersistentStorageType::Text
    49 #endif
    50 #if USE(CURL)
    51         , { }, { }
    52 #endif
    53         , { }, { }, false, false, { }, { }, { }, { }, { }, { }, { }, { }
     59        , { }
     60        , SoupCookiePersistentStorageType::Text
     61#endif
     62#if USE(CURL)
     63        , { }
     64        , { }
     65#endif
     66        , { }
     67        , { }
     68        , false
     69        , false
     70        , { }
     71        , { }
     72        , { }
     73        , { }
     74        , { }
     75        , { }
     76        , { }
     77        , { }
    5478    };
    5579}
     
    6993    encoder << httpProxy;
    7094    encoder << httpsProxy;
     95    encoder << enableLegacyTLS;
    7196#endif
    7297#if USE(SOUP)
     
    149174    if (!httpsProxy)
    150175        return WTF::nullopt;
     176
     177    Optional<bool> enableLegacyTLS;
     178    decoder >> enableLegacyTLS;
     179    if (!enableLegacyTLS)
     180        return WTF::nullopt;
    151181#endif
    152182
     
    248278        , WTFMove(*httpProxy)
    249279        , WTFMove(*httpsProxy)
     280        , WTFMove(*enableLegacyTLS)
    250281#endif
    251282#if USE(SOUP)
  • trunk/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h

    r248734 r249019  
    7373    URL httpProxy;
    7474    URL httpsProxy;
     75    bool enableLegacyTLS { false };
    7576#endif
    7677#if USE(SOUP)
  • trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm

    r248950 r249019  
    941941    NSURLSessionConfiguration *configuration = configurationForSessionID(m_sessionID);
    942942
     943    if (!parameters.enableLegacyTLS) {
     944#if HAVE(TLS_PROTOCOL_VERSION_T)
     945        configuration.TLSMinimumSupportedProtocolVersion = tls_protocol_version_TLSv12;
     946#else
     947        configuration.TLSMinimumSupportedProtocol = kTLSProtocol12;
     948#endif
     949    }
     950
    943951#if HAVE(APP_SSO)
    944952    configuration._preventsAppSSO = true;
  • trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm

    r248846 r249019  
    282282    }
    283283
     284    parameters.defaultDataStoreParameters.networkSessionParameters.enableLegacyTLS = [defaults boolForKey:@"WebKitEnableLegacyTLS"];
     285
    284286    parameters.networkATSContext = adoptCF(_CFNetworkCopyATSContext());
    285287
  • trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm

    r248734 r249019  
    7070    bool enableResourceLoadStatisticsNSURLSessionSwitching = WebCore::RuntimeEnabledFeatures::sharedFeatures().isITPSessionSwitchingEnabled();
    7171    WebCore::RegistrableDomain resourceLoadStatisticsManualPrevalentResource { };
     72    bool enableLegacyTLS = [defaults boolForKey:@"WebKitEnableLegacyTLS"];
    7273#if ENABLE(RESOURCE_LOAD_STATISTICS)
    7374    enableResourceLoadStatisticsDebugMode = [defaults boolForKey:@"ITPDebugMode"];
     
    129130        WTFMove(httpProxy),
    130131        WTFMove(httpsProxy),
     132        enableLegacyTLS,
    131133        WTFMove(resourceLoadStatisticsDirectory),
    132134        WTFMove(resourceLoadStatisticsDirectoryHandle),
Note: See TracChangeset for help on using the changeset viewer.