Title: [207131] releases/WebKitGTK/webkit-2.14/Source
Revision
207131
Author
[email protected]
Date
2016-10-11 06:52:21 -0700 (Tue, 11 Oct 2016)

Log Message

Merge r206772 - [SOUP] Remove SSLPolicyFlags from SoupNetworkSession
https://bugs.webkit.org/show_bug.cgi?id=162906

Patch by Carlos Garcia Campos <[email protected]> on 2016-10-04
Reviewed by Michael Catanzaro.

Source/WebCore:

All soup based ports are setting SSLUseSystemCAFile flag unconditionally, so we can just use that when creating
the session like we do for all other construct parameters.

* platform/network/soup/SoupNetworkSession.cpp:
(WebCore::SoupNetworkSession::createTestingSession):
(WebCore::SoupNetworkSession::setupLogger):
(WebCore::SoupNetworkSession::SoupNetworkSession): Deleted.
(WebCore::SoupNetworkSession::clearOldSoupCache): Deleted.
(WebCore::SoupNetworkSession::setHTTPProxy): Deleted.
* platform/network/soup/SoupNetworkSession.h:
(WebCore::SoupNetworkSession::soupSession): Deleted.

Source/WebKit2:

* NetworkProcess/soup/NetworkProcessMainSoup.cpp:
(WebKit::NetworkProcessMainUnix):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog (207130 => 207131)


--- releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog	2016-10-11 13:50:31 UTC (rev 207130)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/ChangeLog	2016-10-11 13:52:21 UTC (rev 207131)
@@ -1,3 +1,22 @@
+2016-10-04  Carlos Garcia Campos  <[email protected]>
+
+        [SOUP] Remove SSLPolicyFlags from SoupNetworkSession
+        https://bugs.webkit.org/show_bug.cgi?id=162906
+
+        Reviewed by Michael Catanzaro.
+
+        All soup based ports are setting SSLUseSystemCAFile flag unconditionally, so we can just use that when creating
+        the session like we do for all other construct parameters.
+
+        * platform/network/soup/SoupNetworkSession.cpp:
+        (WebCore::SoupNetworkSession::createTestingSession):
+        (WebCore::SoupNetworkSession::setupLogger):
+        (WebCore::SoupNetworkSession::SoupNetworkSession): Deleted.
+        (WebCore::SoupNetworkSession::clearOldSoupCache): Deleted.
+        (WebCore::SoupNetworkSession::setHTTPProxy): Deleted.
+        * platform/network/soup/SoupNetworkSession.h:
+        (WebCore::SoupNetworkSession::soupSession): Deleted.
+
 2016-10-03  Brent Fulgham  <[email protected]>
 
         Avoid null dereference when changing focus in design mode.

Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/network/soup/SoupNetworkSession.cpp (207130 => 207131)


--- releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/network/soup/SoupNetworkSession.cpp	2016-10-11 13:50:31 UTC (rev 207130)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/network/soup/SoupNetworkSession.cpp	2016-10-11 13:52:21 UTC (rev 207131)
@@ -108,6 +108,8 @@
         SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_PROXY_RESOLVER_DEFAULT,
         SOUP_SESSION_ADD_FEATURE, cookieJar,
         SOUP_SESSION_USE_THREAD_CONTEXT, TRUE,
+        SOUP_SESSION_SSL_USE_SYSTEM_CA_FILE, TRUE,
+        SOUP_SESSION_SSL_STRICT, FALSE,
         nullptr);
 
 #if SOUP_CHECK_VERSION(2, 53, 92)
@@ -203,30 +205,6 @@
     }
 }
 
-void SoupNetworkSession::setSSLPolicy(SSLPolicy flags)
-{
-    g_object_set(m_soupSession.get(),
-        SOUP_SESSION_SSL_USE_SYSTEM_CA_FILE, flags & SSLUseSystemCAFile ? TRUE : FALSE,
-        SOUP_SESSION_SSL_STRICT, flags & SSLStrict ? TRUE : FALSE,
-        nullptr);
-}
-
-SoupNetworkSession::SSLPolicy SoupNetworkSession::sslPolicy() const
-{
-    gboolean useSystemCAFile, strict;
-    g_object_get(m_soupSession.get(),
-        SOUP_SESSION_SSL_USE_SYSTEM_CA_FILE, &useSystemCAFile,
-        SOUP_SESSION_SSL_STRICT, &strict,
-        nullptr);
-
-    SSLPolicy flags = 0;
-    if (useSystemCAFile)
-        flags |= SSLUseSystemCAFile;
-    if (strict)
-        flags |= SSLStrict;
-    return flags;
-}
-
 void SoupNetworkSession::setHTTPProxy(const char* httpProxy, const char* httpProxyExceptions)
 {
 #if PLATFORM(EFL)

Modified: releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/network/soup/SoupNetworkSession.h (207130 => 207131)


--- releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/network/soup/SoupNetworkSession.h	2016-10-11 13:50:31 UTC (rev 207130)
+++ releases/WebKitGTK/webkit-2.14/Source/WebCore/platform/network/soup/SoupNetworkSession.h	2016-10-11 13:52:21 UTC (rev 207131)
@@ -47,12 +47,6 @@
     static std::unique_ptr<SoupNetworkSession> createTestingSession();
     static std::unique_ptr<SoupNetworkSession> createForSoupSession(SoupSession*);
 
-    enum SSLPolicyFlags {
-        SSLStrict = 1 << 0,
-        SSLUseSystemCAFile = 1 << 1
-    };
-    typedef unsigned SSLPolicy;
-
     SoupSession* soupSession() const { return m_soupSession.get(); }
 
     void setCookieJar(SoupCookieJar*);
@@ -62,9 +56,6 @@
     SoupCache* cache() const;
     static void clearCache(const String& cacheDirectory);
 
-    void setSSLPolicy(SSLPolicy);
-    SSLPolicy sslPolicy() const;
-
     void setupHTTPProxyFromEnvironment();
 
     void setAcceptLanguages(const Vector<String>&);

Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/ChangeLog (207130 => 207131)


--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/ChangeLog	2016-10-11 13:50:31 UTC (rev 207130)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/ChangeLog	2016-10-11 13:52:21 UTC (rev 207131)
@@ -1,3 +1,13 @@
+2016-10-04  Carlos Garcia Campos  <[email protected]>
+
+        [SOUP] Remove SSLPolicyFlags from SoupNetworkSession
+        https://bugs.webkit.org/show_bug.cgi?id=162906
+
+        Reviewed by Michael Catanzaro.
+
+        * NetworkProcess/soup/NetworkProcessMainSoup.cpp:
+        (WebKit::NetworkProcessMainUnix):
+
 2016-09-27  Michael Catanzaro  <[email protected]>
 
         [GTK] Unreviewed typo fix

Modified: releases/WebKitGTK/webkit-2.14/Source/WebKit2/NetworkProcess/soup/NetworkProcessMainSoup.cpp (207130 => 207131)


--- releases/WebKitGTK/webkit-2.14/Source/WebKit2/NetworkProcess/soup/NetworkProcessMainSoup.cpp	2016-10-11 13:50:31 UTC (rev 207130)
+++ releases/WebKitGTK/webkit-2.14/Source/WebKit2/NetworkProcess/soup/NetworkProcessMainSoup.cpp	2016-10-11 13:52:21 UTC (rev 207131)
@@ -29,25 +29,12 @@
 
 #include "ChildProcessMain.h"
 #include "NetworkProcessMainUnix.h"
-#include <WebCore/SoupNetworkSession.h>
-#include <libsoup/soup.h>
 
-using namespace WebCore;
-
 namespace WebKit {
 
-class NetworkProcessMain final: public ChildProcessMainBase {
-public:
-    bool platformInitialize() override
-    {
-        SoupNetworkSession::defaultSession().setSSLPolicy(SoupNetworkSession::SSLUseSystemCAFile);
-        return true;
-    }
-};
-
 int NetworkProcessMainUnix(int argc, char** argv)
 {
-    return ChildProcessMain<NetworkProcess, NetworkProcessMain>(argc, argv);
+    return ChildProcessMain<NetworkProcess, ChildProcessMainBase>(argc, argv);
 }
 
 } // namespace WebKit
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to