Revert r157445 since it broke certificates on Mac.
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Oct 2013 01:15:44 +0000 (01:15 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Oct 2013 01:15:44 +0000 (01:15 +0000)
<rdar://problem/15246926&15254017&15269117>

Source/WebCore:

* GNUmakefile.list.am:
* PlatformEfl.cmake:
* WebCore.exp.in:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* platform/network/ResourceErrorBase.h:
* platform/network/ResourceResponseBase.h:
* platform/network/cf/CertificateInfoCFNet.cpp: Removed.
* platform/network/cf/ResourceResponse.h:
* platform/network/mac/ResourceResponseMac.mm:
(WebCore::ResourceResponse::setCertificateChain):
(WebCore::ResourceResponse::certificateChain):
* platform/network/soup/ResourceError.h:
(WebCore::ResourceError::ResourceError):
(WebCore::ResourceError::tlsErrors):
(WebCore::ResourceError::setTLSErrors):
(WebCore::ResourceError::certificate):
(WebCore::ResourceError::setCertificate):
* platform/network/soup/ResourceErrorSoup.cpp:
(WebCore::ResourceError::tlsError):
(WebCore::ResourceError::platformCopy):
(WebCore::ResourceError::platformCompare):
* platform/network/soup/ResourceResponse.h:
(WebCore::ResourceResponse::ResourceResponse):
(WebCore::ResourceResponse::soupMessageCertificate):
(WebCore::ResourceResponse::setSoupMessageCertificate):
(WebCore::ResourceResponse::soupMessageTLSErrors):
(WebCore::ResourceResponse::setSoupMessageTLSErrors):
* platform/network/soup/ResourceResponseSoup.cpp:
(WebCore::ResourceResponse::toSoupMessage):
(WebCore::ResourceResponse::updateFromSoupMessage):

Source/WebKit2:

* GNUmakefile.list.am:
* NetworkProcess/AsynchronousNetworkLoaderClient.cpp:
(WebKit::AsynchronousNetworkLoaderClient::didReceiveResponse):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkResourceLoader.cpp:
* NetworkProcess/mac/NetworkProcessMac.mm:
(WebKit::NetworkProcess::allowSpecificHTTPSCertificateForHost):
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* Shared/API/c/mac/WKCertificateInfoMac.mm:
(WKCertificateInfoCreateWithCertficateChain):
(WKCertificateInfoGetCertificateChain):
* Shared/Authentication/AuthenticationManager.cpp:
(WebKit::AuthenticationManager::tryUsePlatformCertificateInfoForChallenge):
(WebKit::AuthenticationManager::useCredentialForChallenge):
* Shared/Authentication/AuthenticationManager.h:
* Shared/Authentication/AuthenticationManager.messages.in:
* Shared/Authentication/mac/AuthenticationManager.mac.mm:
(WebKit::AuthenticationManager::tryUsePlatformCertificateInfoForChallenge):
* Shared/UserMessageCoders.h:
(WebKit::UserMessageEncoder::baseEncode):
(WebKit::UserMessageDecoder::baseDecode):
* Shared/WebCertificateInfo.h:
(WebKit::WebCertificateInfo::create):
(WebKit::WebCertificateInfo::platformCertificateInfo):
(WebKit::WebCertificateInfo::WebCertificateInfo):
* Shared/WebCoreArgumentCoders.cpp:
* Shared/WebCoreArgumentCoders.h:
* Shared/mac/PlatformCertificateInfo.h: Renamed from Source/WebCore/platform/network/soup/CertificateInfoSoup.cpp.
(WebKit::PlatformCertificateInfo::certificateChain):
* Shared/mac/PlatformCertificateInfo.mm: Renamed from Source/WebCore/platform/network/mac/CertificateInfoMac.mm.
(WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
(WebKit::PlatformCertificateInfo::encode):
(WebKit::PlatformCertificateInfo::decode):
(WebKit::PlatformCertificateInfo::dump):
* Shared/mac/WebCoreArgumentCodersMac.mm:
(CoreIPC::::encodePlatformData):
(CoreIPC::::decodePlatformData):
* Shared/soup/PlatformCertificateInfo.cpp: Added.
(WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
(WebKit::PlatformCertificateInfo::~PlatformCertificateInfo):
(WebKit::PlatformCertificateInfo::encode):
(WebKit::PlatformCertificateInfo::decode):
* Shared/soup/PlatformCertificateInfo.h: Renamed from Source/WebCore/platform/network/CertificateInfo.h.
(WebKit::PlatformCertificateInfo::certificate):
(WebKit::PlatformCertificateInfo::tlsErrors):
* Shared/soup/WebCoreArgumentCodersSoup.cpp:
(CoreIPC::::encodePlatformData):
(CoreIPC::::decodePlatformData):
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_get_tls_info):
* UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
(WebKit::AuthenticationChallengeProxy::useCredential):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::allowSpecificHTTPSCertificateForHost):
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::didCommitLoad):
* UIProcess/WebFrameProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
* WebProcess/Network/WebResourceLoader.h:
* WebProcess/Network/WebResourceLoader.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157842 268f45cc-cd09-0410-ab3c-d52691b4dbfc

55 files changed:
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/PlatformEfl.cmake
Source/WebCore/WebCore.exp.in
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/network/ResourceErrorBase.h
Source/WebCore/platform/network/ResourceResponseBase.h
Source/WebCore/platform/network/cf/CertificateInfoCFNet.cpp [deleted file]
Source/WebCore/platform/network/cf/ResourceResponse.h
Source/WebCore/platform/network/mac/ResourceResponseMac.mm
Source/WebCore/platform/network/soup/ResourceError.h
Source/WebCore/platform/network/soup/ResourceErrorSoup.cpp
Source/WebCore/platform/network/soup/ResourceResponse.h
Source/WebCore/platform/network/soup/ResourceResponseSoup.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/GNUmakefile.list.am
Source/WebKit2/NetworkProcess/AsynchronousNetworkLoaderClient.cpp
Source/WebKit2/NetworkProcess/NetworkProcess.h
Source/WebKit2/NetworkProcess/NetworkProcess.messages.in
Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp
Source/WebKit2/NetworkProcess/mac/NetworkProcessMac.mm
Source/WebKit2/NetworkProcess/soup/NetworkProcessSoup.cpp
Source/WebKit2/PlatformEfl.cmake
Source/WebKit2/PlatformGTK.cmake
Source/WebKit2/Shared/API/c/mac/WKCertificateInfoMac.mm
Source/WebKit2/Shared/Authentication/AuthenticationManager.cpp
Source/WebKit2/Shared/Authentication/AuthenticationManager.h
Source/WebKit2/Shared/Authentication/AuthenticationManager.messages.in
Source/WebKit2/Shared/Authentication/mac/AuthenticationManager.mac.mm
Source/WebKit2/Shared/UserMessageCoders.h
Source/WebKit2/Shared/WebCertificateInfo.h
Source/WebKit2/Shared/WebCoreArgumentCoders.cpp
Source/WebKit2/Shared/WebCoreArgumentCoders.h
Source/WebKit2/Shared/mac/PlatformCertificateInfo.h [moved from Source/WebCore/platform/network/soup/CertificateInfoSoup.cpp with 60% similarity]
Source/WebKit2/Shared/mac/PlatformCertificateInfo.mm [moved from Source/WebCore/platform/network/mac/CertificateInfoMac.mm with 62% similarity]
Source/WebKit2/Shared/mac/WebCoreArgumentCodersMac.mm
Source/WebKit2/Shared/soup/PlatformCertificateInfo.cpp [new file with mode: 0644]
Source/WebKit2/Shared/soup/PlatformCertificateInfo.h [moved from Source/WebCore/platform/network/CertificateInfo.h with 66% similarity]
Source/WebKit2/Shared/soup/WebCoreArgumentCodersSoup.cpp
Source/WebKit2/UIProcess/API/gtk/WebKitLoaderClient.cpp
Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp
Source/WebKit2/UIProcess/Authentication/AuthenticationChallengeProxy.cpp
Source/WebKit2/UIProcess/WebContext.cpp
Source/WebKit2/UIProcess/WebFrameProxy.cpp
Source/WebKit2/UIProcess/WebFrameProxy.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/WebPageProxy.h
Source/WebKit2/UIProcess/WebPageProxy.messages.in
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp
Source/WebKit2/WebProcess/Network/WebResourceLoader.h
Source/WebKit2/WebProcess/Network/WebResourceLoader.messages.in
Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp

index ad3c838..0f2b385 100644 (file)
@@ -1,3 +1,41 @@
+2013-10-22  Anders Carlsson  <andersca@apple.com>
+
+        Revert r157445 since it broke certificates on Mac.
+        <rdar://problem/15246926&15254017&15269117>
+
+        * GNUmakefile.list.am:
+        * PlatformEfl.cmake:
+        * WebCore.exp.in:
+        * WebCore.vcxproj/WebCore.vcxproj:
+        * WebCore.vcxproj/WebCore.vcxproj.filters:
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/network/ResourceErrorBase.h:
+        * platform/network/ResourceResponseBase.h:
+        * platform/network/cf/CertificateInfoCFNet.cpp: Removed.
+        * platform/network/cf/ResourceResponse.h:
+        * platform/network/mac/ResourceResponseMac.mm:
+        (WebCore::ResourceResponse::setCertificateChain):
+        (WebCore::ResourceResponse::certificateChain):
+        * platform/network/soup/ResourceError.h:
+        (WebCore::ResourceError::ResourceError):
+        (WebCore::ResourceError::tlsErrors):
+        (WebCore::ResourceError::setTLSErrors):
+        (WebCore::ResourceError::certificate):
+        (WebCore::ResourceError::setCertificate):
+        * platform/network/soup/ResourceErrorSoup.cpp:
+        (WebCore::ResourceError::tlsError):
+        (WebCore::ResourceError::platformCopy):
+        (WebCore::ResourceError::platformCompare):
+        * platform/network/soup/ResourceResponse.h:
+        (WebCore::ResourceResponse::ResourceResponse):
+        (WebCore::ResourceResponse::soupMessageCertificate):
+        (WebCore::ResourceResponse::setSoupMessageCertificate):
+        (WebCore::ResourceResponse::soupMessageTLSErrors):
+        (WebCore::ResourceResponse::setSoupMessageTLSErrors):
+        * platform/network/soup/ResourceResponseSoup.cpp:
+        (WebCore::ResourceResponse::toSoupMessage):
+        (WebCore::ResourceResponse::updateFromSoupMessage):
+
 2013-10-22  Jer Noble  <jer.noble@apple.com>
 
         [Media] Refactor supportsType() factory method to take a parameters object.
         Now that fetching the RenderStyle has to go through the parent,
         we should avoid unnecessary loads by caching style() in a local.
 
-2013-10-15  Csaba Osztrogonác  <ossy@webkit.org>
-
-        Move PlatformCertificateInfo to WebCore and make the ResourceResponse primitives work in terms of that platform agnostic object
-        https://bugs.webkit.org/show_bug.cgi?id=118520
-
-        Reviewed by Anders Carlsson.
-
-        Added PlatformCertificateInfo getter and setter to ResourceErrorBase
-        and ResourceResponseBase so that getting and setting certificates
-        becomes cross platform.
-
-        Changed the existing platform specific certificate getters and setters
-        of ResourceError and ResourceResponse to use the
-        PlatformCertificateInfo member.
-
-        Original patch by Kwang Yul Seo  <skyul@company100.net>
-
-        The following things were fixed by Csaba Osztrogonác:
-        - trivial conflicts resolved in WebCore.exp.in, project.pbxproj, NetworkResourceLoader.cpp,
-          WebPageProxy.h, WebFrameLoaderClient.cpp and PlatformEfl.cmake.
-        - trivial fix in the new AsynchronousNetworkLoaderClient.cpp
-        - style fixed (NULL -> 0 and smaller indentation in WebCoreArgumentCodersSoup.cpp)
-        - obsolete change removed from NetworkResourceLoader.cpp
-        - unneeded typo removed from ResourceHandleSoup.cpp
-        - Fixed the if guard of including RetainPtr.h in PlatformCertificateInfo.h to make Windows build happy.
-        - add PlatformCertificateInfoCFNet.cpp with empty constructor and destructor to make Windows build happy.
-        - resolved conflict in Source/WebCore/WebCore.xcodeproj/project.pbxproj after r156488
-        - renamed KURL to URL after r156550.
-        - removed obsolete Qt changes
-        - added back initializers for m_soupFlags
-        - included gio/gio.h instead of libsoup/soup.h in PlatformCertificateInfo.h
-        - removed unused class forward declarations and includes
-
-        * GNUmakefile.list.am:
-        * PlatformEfl.cmake:
-        * Target.pri:
-        * WebCore.exp.in:
-        * WebCore.vcxproj/WebCore.vcxproj:
-        * WebCore.vcxproj/WebCore.vcxproj.filters:
-        * WebCore.xcodeproj/project.pbxproj:
-        * platform/network/PlatformCertificateInfo.h: Renamed from Source/WebKit2/Shared/soup/PlatformCertificateInfo.h.
-        (WebCore::PlatformCertificateInfo::certificate):
-        (WebCore::PlatformCertificateInfo::setCertificate):
-        (WebCore::PlatformCertificateInfo::tlsErrors):
-        (WebCore::PlatformCertificateInfo::setTLSErrors):
-        * platform/network/ResourceErrorBase.h:
-        (WebCore::ResourceErrorBase::platformCertificateInfo):
-        (WebCore::ResourceErrorBase::setPlatformCertificateInfo):
-        * platform/network/ResourceResponseBase.h:
-        (WebCore::ResourceResponseBase::platformCertificateInfo):
-        (WebCore::ResourceResponseBase::setPlatformCertificateInfo):
-        * platform/network/cf/ResourceResponse.h:
-        * platform/network/mac/PlatformCertificateInfoMac.mm: Renamed from Source/WebKit2/Shared/mac/PlatformCertificateInfo.mm.
-        (WebCore::PlatformCertificateInfo::PlatformCertificateInfo):
-        (WebCore::PlatformCertificateInfo::~PlatformCertificateInfo):
-        (WebCore::PlatformCertificateInfo::setCertificateChain):
-        (WebCore::PlatformCertificateInfo::certificateChain):
-        (WebCore::PlatformCertificateInfo::dump):
-        * platform/network/mac/ResourceResponseMac.mm:
-        (WebCore::ResourceResponse::setCertificateChain):
-        (WebCore::ResourceResponse::certificateChain):
-        * platform/network/soup/PlatformCertificateInfoSoup.cpp:
-        (WebCore::PlatformCertificateInfo::PlatformCertificateInfo):
-        (WebCore::PlatformCertificateInfo::~PlatformCertificateInfo):
-        * platform/network/soup/ResourceError.h:
-        (WebCore::ResourceError::ResourceError):
-        (WebCore::ResourceError::tlsErrors):
-        (WebCore::ResourceError::setTLSErrors):
-        (WebCore::ResourceError::certificate):
-        (WebCore::ResourceError::setCertificate):
-        * platform/network/soup/ResourceErrorSoup.cpp:
-        (WebCore::ResourceError::platformCopy):
-        * platform/network/soup/ResourceResponse.h:
-        (WebCore::ResourceResponse::ResourceResponse):
-        (WebCore::ResourceResponse::soupMessageCertificate):
-        (WebCore::ResourceResponse::setSoupMessageCertificate):
-        (WebCore::ResourceResponse::soupMessageTLSErrors):
-        (WebCore::ResourceResponse::setSoupMessageTLSErrors):
-        * platform/network/soup/ResourceResponseSoup.cpp:
-        (WebCore::ResourceResponse::toSoupMessage):
-        (WebCore::ResourceResponse::updateFromSoupMessage):
-
 2013-10-15  Ryosuke Niwa  <rniwa@webkit.org>
 
         Remove redundant Document::getElementById
index 94e9738..1da89e4 100644 (file)
@@ -5424,7 +5424,6 @@ webcore_platform_sources += \
        Source/WebCore/platform/network/BlobResourceHandle.cpp \
        Source/WebCore/platform/network/BlobResourceHandle.h \
        Source/WebCore/platform/network/BlobStorageData.h \
-       Source/WebCore/platform/network/CertificateInfo.h \
        Source/WebCore/platform/network/CookieStorage.h \
        Source/WebCore/platform/network/FormDataBuilder.cpp \
        Source/WebCore/platform/network/FormDataBuilder.h \
@@ -5459,7 +5458,6 @@ webcore_platform_sources += \
        Source/WebCore/platform/network/SocketStreamHandleClient.h \
        Source/WebCore/platform/network/soup/AuthenticationChallenge.h \
        Source/WebCore/platform/network/soup/AuthenticationChallengeSoup.cpp \
-       Source/WebCore/platform/network/soup/CertificateInfoSoup.cpp \
        Source/WebCore/platform/network/soup/CookieJarSoup.cpp \
        Source/WebCore/platform/network/soup/CookieJarSoup.h \
        Source/WebCore/platform/network/soup/CookieStorageSoup.cpp \
index 0ea50e1..4d75cb4 100644 (file)
@@ -150,7 +150,6 @@ list(APPEND WebCore_SOURCES
     platform/network/efl/NetworkStateNotifierEfl.cpp
 
     platform/network/soup/AuthenticationChallengeSoup.cpp
-    platform/network/soup/CertificateInfoSoup.cpp
     platform/network/soup/CookieJarSoup.cpp
     platform/network/soup/CookieStorageSoup.cpp
     platform/network/soup/CredentialStorageSoup.cpp
index ff0869d..c724419 100644 (file)
@@ -442,10 +442,6 @@ __ZN7WebCore15BackForwardList8backItemEv
 __ZN7WebCore15BackForwardList8capacityEv
 __ZN7WebCore15BackForwardList9goForwardEv
 __ZN7WebCore15BackForwardListC1EPNS_4PageE
-__ZN7WebCore15CertificateInfo19setCertificateChainEPK9__CFArray
-__ZN7WebCore15CertificateInfoC1EPK9__CFArray
-__ZN7WebCore15CertificateInfoC1Ev
-__ZN7WebCore15CertificateInfoD1Ev
 __ZN7WebCore15DOMWrapperWorld13clearWrappersEv
 __ZN7WebCore15DOMWrapperWorldD1Ev
 __ZN7WebCore15DatabaseManager10initializeERKN3WTF6StringE
@@ -1537,7 +1533,6 @@ __ZNK7WebCore15AffineTransform7inverseEv
 __ZNK7WebCore15AffineTransform7mapRectERKNS_9FloatRectE
 __ZNK7WebCore15AffineTransform8mapPointERKNS_10FloatPointE
 __ZNK7WebCore15AffineTransform8mapPointERKNS_8IntPointE
-__ZNK7WebCore15CertificateInfo16certificateChainEv
 __ZNK7WebCore15FocusController18focusedOrMainFrameEv
 __ZNK7WebCore15GraphicsContext15platformContextEv
 __ZNK7WebCore15GraphicsContext16paintingDisabledEv
index 2f5cfeb..d810e7d 100644 (file)
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
     </ClCompile>
-    <ClCompile Include="..\platform\network\cf\CertificateInfoCFNet.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
-    </ClCompile>
     <ClCompile Include="..\platform\network\cf\CookieJarCFNet.cpp">
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
     <ClInclude Include="..\platform\network\BlobRegistryImpl.h" />
     <ClInclude Include="..\platform\network\BlobResourceHandle.h" />
     <ClInclude Include="..\platform\network\BlobStorageData.h" />
-    <ClInclude Include="..\platform\network\CertificateInfo.h" />
     <ClInclude Include="..\platform\network\CookieStorage.h" />
     <ClInclude Include="..\platform\network\Credential.h" />
     <ClInclude Include="..\platform\network\CredentialStorage.h" />
   <ImportGroup Label="ExtensionTargets">
     <Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
   </ImportGroup>
-</Project>
\ No newline at end of file
+</Project>
index ac7722b..cd937d0 100644 (file)
     <ClInclude Include="..\platform\network\BlobStorageData.h">
       <Filter>platform\network</Filter>
     </ClInclude>
-    <ClInclude Include="..\platform\network\CertificateInfo.h">
-      <Filter>platform\network</Filter>
-    </ClInclude>
     <ClInclude Include="..\platform\network\CookieStorage.h">
       <Filter>platform\network</Filter>
     </ClInclude>
       <Filter>platform\win</Filter>
     </MASM>
   </ItemGroup>
-</Project>
\ No newline at end of file
+</Project>
index aa94c28..ece177a 100644 (file)
                5DF7F5C20F01F92A00526B4B /* CSSPropertyNames.h in Copy Generated Headers */ = {isa = PBXBuildFile; fileRef = 656580EF09D12B20000E61D7 /* CSSPropertyNames.h */; };
                5DFE8F560D16477B0076E937 /* ScheduledAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCA378BA0D15F64200B793D6 /* ScheduledAction.cpp */; };
                5DFE8F570D16477C0076E937 /* ScheduledAction.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA378BB0D15F64200B793D6 /* ScheduledAction.h */; };
-               5F2DBBE9178E3C8100141486 /* CertificateInfoMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5F2DBBE7178E332D00141486 /* CertificateInfoMac.mm */; };
-               5FA904CA178E61F5004C8A2D /* CertificateInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 5F2DBBE8178E336900141486 /* CertificateInfo.h */; settings = {ATTRIBUTES = (Private, ); }; };
                5FC7DC26CFE2563200B85AE4 /* JSEventTarget.h in Headers */ = {isa = PBXBuildFile; fileRef = 5FC7DC26CFE2563200B85AE5 /* JSEventTarget.h */; };
-               5FE1D292178FD1F3001AA3C3 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5FE1D291178FD1F3001AA3C3 /* Security.framework */; };
                626CDE0E1140424C001E5A68 /* SpatialNavigation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 626CDE0C1140424C001E5A68 /* SpatialNavigation.cpp */; };
                626CDE0F1140424C001E5A68 /* SpatialNavigation.h in Headers */ = {isa = PBXBuildFile; fileRef = 626CDE0D1140424C001E5A68 /* SpatialNavigation.h */; settings = {ATTRIBUTES = (Private, ); }; };
                628D214C12131ED10055DCFC /* NetworkingContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 628D214B12131ED10055DCFC /* NetworkingContext.h */; settings = {ATTRIBUTES = (Private, ); }; };
                5DA97ECC168E787B000E3676 /* SystemVersionMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SystemVersionMac.mm; sourceTree = "<group>"; };
                5DB1BC6810715A6400EFAA49 /* TransformSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TransformSource.h; sourceTree = "<group>"; };
                5DB1BC6910715A6400EFAA49 /* TransformSourceLibxslt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TransformSourceLibxslt.cpp; sourceTree = "<group>"; };
-               5F2DBBE7178E332D00141486 /* CertificateInfoMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CertificateInfoMac.mm; sourceTree = "<group>"; };
-               5F2DBBE8178E336900141486 /* CertificateInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CertificateInfo.h; sourceTree = "<group>"; };
                5FC7DC26CFE2563200B85AE5 /* JSEventTarget.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSEventTarget.h; sourceTree = "<group>"; };
-               5FE1D291178FD1F3001AA3C3 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = ../../../../../System/Library/Frameworks/Security.framework; sourceTree = "<group>"; };
                626CDE0C1140424C001E5A68 /* SpatialNavigation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SpatialNavigation.cpp; sourceTree = "<group>"; };
                626CDE0D1140424C001E5A68 /* SpatialNavigation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SpatialNavigation.h; sourceTree = "<group>"; };
                628D214B12131ED10055DCFC /* NetworkingContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetworkingContext.h; sourceTree = "<group>"; };
                        isa = PBXFrameworksBuildPhase;
                        buildActionMask = 2147483647;
                        files = (
-                               5FE1D292178FD1F3001AA3C3 /* Security.framework in Frameworks */,
                                FD2DBF1212B048A300ED98C6 /* Accelerate.framework in Frameworks */,
                                93F19B1308245E59001E9ABC /* ApplicationServices.framework in Frameworks */,
                                FD2DBF1312B048A300ED98C6 /* AudioToolbox.framework in Frameworks */,
                0867D691FE84028FC02AAC07 /* WebKit */ = {
                        isa = PBXGroup;
                        children = (
-                               5FE1D291178FD1F3001AA3C3 /* Security.framework */,
                                65C97AF208EA908800ACD273 /* config.h */,
                                EDEC98020AED7E170059137F /* WebCorePrefix.h */,
                                9307061309E0CA8200B17FE4 /* DerivedSources.make */,
                                2EB4BCD0121F03E300EC4885 /* BlobResourceHandle.cpp */,
                                2EB4BCD1121F03E300EC4885 /* BlobResourceHandle.h */,
                                2EDEF1F2121B0EFC00726DB2 /* BlobStorageData.h */,
-                               5F2DBBE8178E336900141486 /* CertificateInfo.h */,
                                E13F01EA1270E10D00DFBA71 /* CookieStorage.h */,
                                514C76580CE923A1007EF3CD /* Credential.cpp */,
                                514C76590CE923A1007EF3CD /* Credential.h */,
                        children = (
                                514C76420CE9234E007EF3CD /* AuthenticationMac.h */,
                                514C76430CE9234E007EF3CD /* AuthenticationMac.mm */,
-                               5F2DBBE7178E332D00141486 /* CertificateInfoMac.mm */,
                                E1424C8F164B460B00F32D40 /* CookieJarMac.mm */,
                                E13F01F01270E19000DFBA71 /* CookieStorageMac.mm */,
                                E1B4CD2410B322E200BFFD7E /* CredentialStorageMac.mm */,
                                0F13163E16ED0CC80035CC04 /* PlatformCAFilters.h in Headers */,
                                499B3EC5128CCC4700E726C2 /* PlatformCALayer.h in Headers */,
                                493E5E0912D6420500020081 /* PlatformCALayerClient.h in Headers */,
-                               5FA904CA178E61F5004C8A2D /* CertificateInfo.h in Headers */,
                                07C59B5417F4AC15000FBCBB /* AudioStreamTrack.h in Headers */,
                                E1424C8A164B3B4E00F32D40 /* PlatformCookieJar.h in Headers */,
                                BC5C762B1497FE1400BC4775 /* PlatformEvent.h in Headers */,
                                977E2E0E12F0FC9C00C13379 /* XSSAuditor.cpp in Sources */,
                                977E2E0E12F0FC9C00C13380 /* XSSAuditorDelegate.cpp in Sources */,
                                FD537352137B651800008DCE /* ZeroPole.cpp in Sources */,
-                               5F2DBBE9178E3C8100141486 /* CertificateInfoMac.mm in Sources */,
                                FD1762DF176686D900D836A8 /* UpSampler.cpp in Sources */,
                                FD1762E3176686EA00D836A8 /* DownSampler.cpp in Sources */,
                                6E84E9E017668BEE00815B68 /* RasterShape.cpp in Sources */,
index ffdcab6..5b7909f 100644 (file)
@@ -26,7 +26,6 @@
 #ifndef ResourceErrorBase_h
 #define ResourceErrorBase_h
 
-#include "CertificateInfo.h"
 #include <wtf/text/WTFString.h>
 
 namespace WebCore {
@@ -53,9 +52,6 @@ public:
     void setIsTimeout(bool isTimeout) { m_isTimeout = isTimeout; }
     bool isTimeout() const { return m_isTimeout; }
 
-    const CertificateInfo& certificateInfo() const { return m_certificateInfo; }
-    void setCertificateInfo(const CertificateInfo& certificateInfo) { m_certificateInfo = certificateInfo; }
-
     static bool compare(const ResourceError&, const ResourceError&);
 
 protected:
@@ -93,7 +89,6 @@ protected:
     int m_errorCode;
     String m_failingURL;
     String m_localizedDescription;
-    CertificateInfo m_certificateInfo;
     bool m_isNull;
     bool m_isCancellation;
     bool m_isTimeout;
index d30c8a4..2cfb53a 100644 (file)
 #ifndef ResourceResponseBase_h
 #define ResourceResponseBase_h
 
-#include "CertificateInfo.h"
 #include "HTTPHeaderMap.h"
-#include "ResourceLoadTiming.h"
 #include "URL.h"
+#include "ResourceLoadTiming.h"
 
 #include <wtf/PassOwnPtr.h>
 #include <wtf/RefPtr.h>
@@ -113,9 +112,6 @@ public:
     ResourceLoadTiming* resourceLoadTiming() const;
     void setResourceLoadTiming(PassRefPtr<ResourceLoadTiming>);
 
-    const CertificateInfo& certificateInfo() const { return m_certificateInfo; }
-    void setCertificateInfo(const CertificateInfo& certificateInfo) { m_certificateInfo = certificateInfo; }
-
     // The ResourceResponse subclass may "shadow" this method to provide platform-specific memory usage information
     unsigned memoryUsage() const
     {
@@ -156,7 +152,6 @@ protected:
     unsigned m_connectionID;
     bool m_connectionReused : 1;
     RefPtr<ResourceLoadTiming> m_resourceLoadTiming;
-    CertificateInfo m_certificateInfo;
 
     bool m_isNull : 1;
     
diff --git a/Source/WebCore/platform/network/cf/CertificateInfoCFNet.cpp b/Source/WebCore/platform/network/cf/CertificateInfoCFNet.cpp
deleted file mode 100644 (file)
index 9a4619d..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2013 Company 100 Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "CertificateInfo.h"
-
-namespace WebCore {
-
-CertificateInfo::CertificateInfo()
-{
-}
-
-CertificateInfo::~CertificateInfo()
-{
-}
-
-} // namespace WebCore
index 5a36a0e..13a5811 100644 (file)
@@ -117,6 +117,10 @@ private:
 #if PLATFORM(MAC)
     mutable RetainPtr<NSURLResponse> m_nsResponse;
 #endif
+#if PLATFORM(MAC) || USE(CFNETWORK)
+    // Certificate chain is normally part of NS/CFURLResponse, but there is no way to re-add it to a deserialized response after IPC.
+    RetainPtr<CFArrayRef> m_externalCertificateChain;
+#endif
     InitLevel m_initLevel;
     bool m_platformResponseIsUpToDate;
 };
index 18ca308..5425e1f 100644 (file)
@@ -181,13 +181,13 @@ bool ResourceResponse::platformCompare(const ResourceResponse& a, const Resource
 void ResourceResponse::setCertificateChain(CFArrayRef certificateChain)
 {
     ASSERT(!wkCopyNSURLResponseCertificateChain(nsURLResponse()));
-    m_certificateInfo.setCertificateChain(certificateChain);
+    m_externalCertificateChain = certificateChain;
 }
 
 RetainPtr<CFArrayRef> ResourceResponse::certificateChain() const
 {
-    if (m_certificateInfo.certificateChain())
-        return adoptCF(m_certificateInfo.certificateChain());
+    if (m_externalCertificateChain)
+        return m_externalCertificateChain;
 
     return adoptCF(wkCopyNSURLResponseCertificateChain(nsURLResponse()));
 }
index a86ece4..1a705f1 100644 (file)
@@ -40,10 +40,12 @@ class ResourceError : public ResourceErrorBase
 public:
     ResourceError(const String& domain, int errorCode, const String& failingURL, const String& localizedDescription)
         : ResourceErrorBase(domain, errorCode, failingURL, localizedDescription)
+        , m_tlsErrors(0)
     {
     }
 
     ResourceError()
+        : m_tlsErrors(0)
     {
     }
 
@@ -54,9 +56,17 @@ public:
     static ResourceError timeoutError(const String& failingURL);
     static ResourceError authenticationError(SoupMessage*);
 
+    unsigned tlsErrors() const { return m_tlsErrors; }
+    void setTLSErrors(unsigned tlsErrors) { m_tlsErrors = tlsErrors; }
+    GTlsCertificate* certificate() const { return m_certificate.get(); }
+    void setCertificate(GTlsCertificate* certificate) { m_certificate = certificate; }
+
 private:
     void platformCopy(ResourceError&) const;
     static bool platformCompare(const ResourceError& a, const ResourceError& b);
+
+    unsigned m_tlsErrors;
+    GRefPtr<GTlsCertificate> m_certificate;
 };
 
 }
index 787c747..ba8657b 100644 (file)
@@ -1,6 +1,5 @@
 /*
  * Copyright (C) 2012 Igalia S.L.
- * Copyright (C) 2013 Company 100 Inc.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -79,8 +78,8 @@ ResourceError ResourceError::tlsError(SoupRequest* request, unsigned tlsErrors,
 {
     ResourceError resourceError(g_quark_to_string(SOUP_HTTP_ERROR), SOUP_STATUS_SSL_FAILED,
         failingURI(request), unacceptableTLSCertificate());
-    resourceError.m_certificateInfo.setTLSErrors(static_cast<GTlsCertificateFlags>(tlsErrors));
-    resourceError.m_certificateInfo.setCertificate(certificate);
+    resourceError.setTLSErrors(tlsErrors);
+    resourceError.setCertificate(certificate);
     return resourceError;
 }
 
@@ -99,12 +98,13 @@ ResourceError ResourceError::timeoutError(const String& failingURL)
 
 void ResourceError::platformCopy(ResourceError& errorCopy) const
 {
-    errorCopy.setCertificateInfo(m_certificateInfo);
+    errorCopy.m_certificate = m_certificate;
+    errorCopy.m_tlsErrors = m_tlsErrors;
 }
 
 bool ResourceError::platformCompare(const ResourceError& a, const ResourceError& b)
 {
-    return a.m_certificateInfo.tlsErrors() == b.m_certificateInfo.tlsErrors();
+    return a.tlsErrors() == b.tlsErrors();
 }
 
 } // namespace WebCore
index 39e1d37..4891f93 100644 (file)
@@ -38,18 +38,21 @@ public:
     ResourceResponse()
         : ResourceResponseBase()
         , m_soupFlags(static_cast<SoupMessageFlags>(0))
+        , m_tlsErrors(static_cast<GTlsCertificateFlags>(0))
     {
     }
 
     ResourceResponse(const URL& url, const String& mimeType, long long expectedLength, const String& textEncodingName, const String& filename)
         : ResourceResponseBase(url, mimeType, expectedLength, textEncodingName, filename)
         , m_soupFlags(static_cast<SoupMessageFlags>(0))
+        , m_tlsErrors(static_cast<GTlsCertificateFlags>(0))
     {
     }
 
     ResourceResponse(SoupMessage* soupMessage)
         : ResourceResponseBase()
         , m_soupFlags(static_cast<SoupMessageFlags>(0))
+        , m_tlsErrors(static_cast<GTlsCertificateFlags>(0))
     {
         updateFromSoupMessage(soupMessage);
     }
@@ -64,11 +67,11 @@ public:
     const String& sniffedContentType() const { return m_sniffedContentType; }
     void setSniffedContentType(const String& value) { m_sniffedContentType = value; }
 
-    GTlsCertificate* soupMessageCertificate() const { return m_certificateInfo.certificate(); }
-    void setSoupMessageCertificate(GTlsCertificate* certificate) { m_certificateInfo.setCertificate(certificate); }
+    GTlsCertificate* soupMessageCertificate() const { return m_certificate.get(); }
+    void setSoupMessageCertificate(GTlsCertificate* certificate) { m_certificate = certificate; }
 
-    GTlsCertificateFlags soupMessageTLSErrors() const { return m_certificateInfo.tlsErrors(); }
-    void setSoupMessageTLSErrors(GTlsCertificateFlags tlsErrors) { m_certificateInfo.setTLSErrors(tlsErrors); }
+    GTlsCertificateFlags soupMessageTLSErrors() const { return m_tlsErrors; }
+    void setSoupMessageTLSErrors(GTlsCertificateFlags tlsErrors) { m_tlsErrors = tlsErrors; }
 
     bool platformResponseIsUpToDate() const { return false; }
 
@@ -77,6 +80,8 @@ private:
 
     SoupMessageFlags m_soupFlags;
     String m_sniffedContentType;
+    GRefPtr<GTlsCertificate> m_certificate;
+    GTlsCertificateFlags m_tlsErrors;
 
     void doUpdateResourceResponse() { }
 
index 98d18cf..9c3b0ed 100644 (file)
@@ -52,7 +52,7 @@ SoupMessage* ResourceResponse::toSoupMessage() const
 
     soup_message_set_flags(soupMessage, m_soupFlags);
 
-    g_object_set(G_OBJECT(soupMessage), "tls-certificate", m_certificateInfo.certificate(), "tls-errors", m_certificateInfo.tlsErrors(), NULL);
+    g_object_set(G_OBJECT(soupMessage), "tls-certificate", m_certificate.get(), "tls-errors", m_tlsErrors, NULL);
 
     // Body data is not in the message.
     return soupMessage;
@@ -68,10 +68,8 @@ void ResourceResponse::updateFromSoupMessage(SoupMessage* soupMessage)
     m_soupFlags = soup_message_get_flags(soupMessage);
 
     GTlsCertificate* certificate = 0;
-    GTlsCertificateFlags tlsErrors;
-    soup_message_get_https_status(soupMessage, &certificate, &tlsErrors);
-    m_certificateInfo.setTLSErrors(tlsErrors);
-    m_certificateInfo.setCertificate(certificate);
+    soup_message_get_https_status(soupMessage, &certificate, &m_tlsErrors);
+    m_certificate = certificate;
 
     updateFromSoupMessageHeaders(soupMessage->response_headers);
 }
index e06ee90..f6a4ac9 100644 (file)
@@ -1,3 +1,79 @@
+2013-10-22  Anders Carlsson  <andersca@apple.com>
+
+        Revert r157445 since it broke certificates on Mac.
+        <rdar://problem/15246926&15254017&15269117>
+
+        * GNUmakefile.list.am:
+        * NetworkProcess/AsynchronousNetworkLoaderClient.cpp:
+        (WebKit::AsynchronousNetworkLoaderClient::didReceiveResponse):
+        * NetworkProcess/NetworkProcess.h:
+        * NetworkProcess/NetworkProcess.messages.in:
+        * NetworkProcess/NetworkResourceLoader.cpp:
+        * NetworkProcess/mac/NetworkProcessMac.mm:
+        (WebKit::NetworkProcess::allowSpecificHTTPSCertificateForHost):
+        * PlatformEfl.cmake:
+        * PlatformGTK.cmake:
+        * Shared/API/c/mac/WKCertificateInfoMac.mm:
+        (WKCertificateInfoCreateWithCertficateChain):
+        (WKCertificateInfoGetCertificateChain):
+        * Shared/Authentication/AuthenticationManager.cpp:
+        (WebKit::AuthenticationManager::tryUsePlatformCertificateInfoForChallenge):
+        (WebKit::AuthenticationManager::useCredentialForChallenge):
+        * Shared/Authentication/AuthenticationManager.h:
+        * Shared/Authentication/AuthenticationManager.messages.in:
+        * Shared/Authentication/mac/AuthenticationManager.mac.mm:
+        (WebKit::AuthenticationManager::tryUsePlatformCertificateInfoForChallenge):
+        * Shared/UserMessageCoders.h:
+        (WebKit::UserMessageEncoder::baseEncode):
+        (WebKit::UserMessageDecoder::baseDecode):
+        * Shared/WebCertificateInfo.h:
+        (WebKit::WebCertificateInfo::create):
+        (WebKit::WebCertificateInfo::platformCertificateInfo):
+        (WebKit::WebCertificateInfo::WebCertificateInfo):
+        * Shared/WebCoreArgumentCoders.cpp:
+        * Shared/WebCoreArgumentCoders.h:
+        * Shared/mac/PlatformCertificateInfo.h: Renamed from Source/WebCore/platform/network/soup/CertificateInfoSoup.cpp.
+        (WebKit::PlatformCertificateInfo::certificateChain):
+        * Shared/mac/PlatformCertificateInfo.mm: Renamed from Source/WebCore/platform/network/mac/CertificateInfoMac.mm.
+        (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
+        (WebKit::PlatformCertificateInfo::encode):
+        (WebKit::PlatformCertificateInfo::decode):
+        (WebKit::PlatformCertificateInfo::dump):
+        * Shared/mac/WebCoreArgumentCodersMac.mm:
+        (CoreIPC::::encodePlatformData):
+        (CoreIPC::::decodePlatformData):
+        * Shared/soup/PlatformCertificateInfo.cpp: Added.
+        (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
+        (WebKit::PlatformCertificateInfo::~PlatformCertificateInfo):
+        (WebKit::PlatformCertificateInfo::encode):
+        (WebKit::PlatformCertificateInfo::decode):
+        * Shared/soup/PlatformCertificateInfo.h: Renamed from Source/WebCore/platform/network/CertificateInfo.h.
+        (WebKit::PlatformCertificateInfo::certificate):
+        (WebKit::PlatformCertificateInfo::tlsErrors):
+        * Shared/soup/WebCoreArgumentCodersSoup.cpp:
+        (CoreIPC::::encodePlatformData):
+        (CoreIPC::::decodePlatformData):
+        * UIProcess/API/gtk/WebKitWebView.cpp:
+        (webkit_web_view_get_tls_info):
+        * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
+        (WebKit::AuthenticationChallengeProxy::useCredential):
+        * UIProcess/WebContext.cpp:
+        (WebKit::WebContext::allowSpecificHTTPSCertificateForHost):
+        * UIProcess/WebFrameProxy.cpp:
+        (WebKit::WebFrameProxy::didCommitLoad):
+        * UIProcess/WebFrameProxy.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::didCommitLoadForFrame):
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/WebPageProxy.messages.in:
+        * WebKit2.xcodeproj/project.pbxproj:
+        * WebProcess/Network/WebResourceLoader.cpp:
+        (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
+        * WebProcess/Network/WebResourceLoader.h:
+        * WebProcess/Network/WebResourceLoader.messages.in:
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
+
 2013-10-22  Tim Horton  <timothy_horton@apple.com>
 
         Remote Layer Tree: Disable threaded scrolling for RemoteLayerTreeDrawingArea
         (WebKit::serviceName):
         (WebKit::createProcess):
 
-2013-10-15  Csaba Osztrogonác  <ossy@webkit.org>
-
-        [Soup] Unreviewed buildfix after r157445 for ENABLE(NETWORK_PROCESS) builds.
-
-        * NetworkProcess/soup/NetworkProcessSoup.cpp:
-        (WebKit::NetworkProcess::allowSpecificHTTPSCertificateForHost):
-
-2013-10-15  Carlos Garcia Campos  <cgarcia@igalia.com>
-
-        Unreviewed. Fix the GTK+ build after r157445.
-
-        * UIProcess/API/gtk/WebKitLoaderClient.cpp:
-        (didFailProvisionalLoadWithErrorForFrame):
-
-2013-10-15  Csaba Osztrogonác  <ossy@webkit.org>
-
-        Move PlatformCertificateInfo to WebCore and make the ResourceResponse primitives work in terms of that platform agnostic object
-        https://bugs.webkit.org/show_bug.cgi?id=118520
-
-        Reviewed by Anders Carlsson.
-
-        Added PlatformCertificateInfo getter and setter to ResourceErrorBase
-        and ResourceResponseBase so that getting and setting certificates
-        becomes cross platform.
-
-        Changed the existing platform specific certificate getters and setters
-        of ResourceError and ResourceResponse to use the
-        PlatformCertificateInfo member.
-
-        Original patch by Kwang Yul Seo  <skyul@company100.net>
-
-        The following things were fixed by Csaba Osztrogonác:
-        - trivial conflicts resolved in WebCore.exp.in, project.pbxproj, NetworkResourceLoader.cpp,
-          WebPageProxy.h, WebFrameLoaderClient.cpp and PlatformEfl.cmake.
-        - trivial fix in the new AsynchronousNetworkLoaderClient.cpp
-        - style fixed (NULL -> 0 and smaller indentation in WebCoreArgumentCodersSoup.cpp)
-        - obsolete change removed from NetworkResourceLoader.cpp
-        - unneeded typo removed from ResourceHandleSoup.cpp
-        - Fixed the if guard of including RetainPtr.h in PlatformCertificateInfo.h to make Windows build happy.
-        - add PlatformCertificateInfoCFNet.cpp with empty constructor and destructor to make Windows build happy.
-        - resolve conflict in Source/WebCore/WebCore.xcodeproj/project.pbxproj after r156488
-        - rename KURL to URL after r156550.
-        - remove obsolete Qt changes
-        - added back initializers for m_soupFlags
-        - included gio/gio.h instead of libsoup/soup.h in PlatformCertificateInfo.h
-        - removed unused class forward declarations and includes
-
-        * GNUmakefile.list.am:
-        * NetworkProcess/AsynchronousNetworkLoaderClient.cpp:
-        (WebKit::AsynchronousNetworkLoaderClient::didReceiveResponse):
-        * NetworkProcess/NetworkProcess.h:
-        * NetworkProcess/NetworkProcess.messages.in:
-        * NetworkProcess/NetworkResourceLoader.cpp:
-        * NetworkProcess/mac/NetworkProcessMac.mm:
-        * PlatformEfl.cmake:
-        * PlatformGTK.cmake:
-        * Shared/API/c/mac/WKCertificateInfoMac.mm:
-        (WKCertificateInfoCreateWithCertficateChain):
-        * Shared/Authentication/AuthenticationManager.h:
-        * Shared/Authentication/AuthenticationManager.messages.in:
-        * Shared/Authentication/mac/AuthenticationManager.mac.mm:
-        * Shared/UserMessageCoders.h:
-        (WebKit::UserMessageDecoder::baseDecode):
-        * Shared/WebCertificateInfo.h:
-        (WebKit::WebCertificateInfo::create):
-        (WebKit::WebCertificateInfo::platformCertificateInfo):
-        (WebKit::WebCertificateInfo::WebCertificateInfo):
-        * Shared/WebCoreArgumentCoders.cpp:
-        (CoreIPC::::decode):
-        (CoreIPC::::encode):
-        * Shared/WebCoreArgumentCoders.h:
-        * Shared/mac/WebCoreArgumentCodersMac.mm:
-        (CoreIPC::::encodePlatformData):
-        (CoreIPC::::decodePlatformData):
-        * Shared/soup/PlatformCertificateInfo.cpp: Removed.
-        * Shared/soup/WebCoreArgumentCodersSoup.cpp:
-        (CoreIPC::::encodePlatformData):
-        (CoreIPC::::decodePlatformData):
-        * Target.pri:
-        * UIProcess/API/gtk/WebKitWebView.cpp:
-        (webkit_web_view_get_tls_info):
-        * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
-        (WebKit::AuthenticationChallengeProxy::useCredential):
-        * UIProcess/WebFrameProxy.cpp:
-        (WebKit::WebFrameProxy::didCommitLoad):
-        * UIProcess/WebFrameProxy.h:
-        * UIProcess/WebPageProxy.h:
-        * UIProcess/WebPageProxy.messages.in:
-        * WebKit2.xcodeproj/project.pbxproj:
-        * WebProcess/Network/WebResourceLoader.cpp:
-        (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
-        * WebProcess/Network/WebResourceLoader.h:
-        * WebProcess/Network/WebResourceLoader.messages.in:
-        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
-        (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
-
 2013-10-14  Csaba Osztrogonác  <ossy@webkit.org>
 
         [WK2][Efl][Soup] Make NetworkProcessMainUnix handle proxy settings.
index 503bfe0..936b478 100644 (file)
@@ -487,6 +487,8 @@ webkit2_sources += \
        Source/WebKit2/Shared/SessionState.h \
        Source/WebKit2/Shared/StatisticsData.cpp \
        Source/WebKit2/Shared/StatisticsData.h \
+       Source/WebKit2/Shared/soup/PlatformCertificateInfo.cpp \
+       Source/WebKit2/Shared/soup/PlatformCertificateInfo.h \
        Source/WebKit2/Shared/soup/SoupCookiePersistentStorageType.h \
        Source/WebKit2/Shared/soup/WebCoreArgumentCodersSoup.cpp \
        Source/WebKit2/Shared/TextCheckerState.h \
@@ -1368,6 +1370,8 @@ webkit2_plugin_process_sources += \
        Source/WebKit2/Shared/gtk/ProcessExecutablePathGtk.cpp \
        Source/WebKit2/Shared/gtk/WebEventFactory.cpp \
        Source/WebKit2/Shared/cairo/ShareableBitmapCairo.cpp \
+       Source/WebKit2/Shared/soup/PlatformCertificateInfo.cpp \
+       Source/WebKit2/Shared/soup/PlatformCertificateInfo.h \
        Source/WebKit2/Shared/soup/WebCoreArgumentCodersSoup.cpp \
        Source/WebKit2/UIProcess/Launcher/ProcessLauncher.cpp \
        Source/WebKit2/UIProcess/Launcher/ProcessLauncher.h \
index 496d075..1baf5b1 100644 (file)
 
 #include "DataReference.h"
 #include "NetworkResourceLoader.h"
+#include "PlatformCertificateInfo.h"
 #include "WebCoreArgumentCoders.h"
 #include "WebResourceLoaderMessages.h"
-#include <WebCore/CertificateInfo.h>
 #include <WebCore/ResourceError.h>
-#include <WebCore/ResourceResponse.h>
 #include <WebCore/SharedBuffer.h>
 #include <wtf/CurrentTime.h>
 
@@ -64,7 +63,7 @@ void AsynchronousNetworkLoaderClient::canAuthenticateAgainstProtectionSpace(Netw
 
 void AsynchronousNetworkLoaderClient::didReceiveResponse(NetworkResourceLoader* loader, const ResourceResponse& response)
 {
-    loader->sendAbortingOnFailure(Messages::WebResourceLoader::DidReceiveResponseWithCertificateInfo(response, response.certificateInfo(), loader->isLoadingMainResource()));
+    loader->sendAbortingOnFailure(Messages::WebResourceLoader::DidReceiveResponseWithCertificateInfo(response, PlatformCertificateInfo(response), loader->isLoadingMainResource()));
 }
 
 void AsynchronousNetworkLoaderClient::didReceiveBuffer(NetworkResourceLoader* loader, SharedBuffer* buffer, int encodedDataLength)
index d6f0e0d..0128174 100644 (file)
@@ -36,8 +36,7 @@
 #include <wtf/Forward.h>
 
 namespace WebCore {
-class CertificateInfo;
-class RunLoop;
+    class RunLoop;
 }
 
 namespace WebKit {
@@ -45,6 +44,7 @@ namespace WebKit {
 class AuthenticationManager;
 class NetworkConnectionToWebProcess;
 class NetworkProcessSupplement;
+class PlatformCertificateInfo;
 struct NetworkProcessCreationParameters;
 
 class NetworkProcess : public ChildProcess, private DownloadManager::Client {
@@ -108,7 +108,7 @@ private:
     void downloadRequest(uint64_t downloadID, const WebCore::ResourceRequest&);
     void cancelDownload(uint64_t downloadID);
     void setCacheModel(uint32_t);
-    void allowSpecificHTTPSCertificateForHost(const WebCore::CertificateInfo&, const String& host);
+    void allowSpecificHTTPSCertificateForHost(const PlatformCertificateInfo&, const String& host);
     void getNetworkProcessStatistics(uint64_t callbackID);
     void clearCacheForAllOrigins(uint32_t cachesToClear);
 
index 32bce05..a5fcbc7 100644 (file)
@@ -39,7 +39,7 @@ messages -> NetworkProcess LegacyReceiver {
     SetProcessSuppressionEnabled(bool flag)
 #endif
 
-    AllowSpecificHTTPSCertificateForHost(WebCore::CertificateInfo certificate, WTF::String host)
+    AllowSpecificHTTPSCertificateForHost(WebKit::PlatformCertificateInfo certificate, WTF::String host)
     
     GetNetworkProcessStatistics(uint64_t callbackID)
     
index 2f8a49f..1630a2b 100644 (file)
@@ -37,6 +37,7 @@
 #include "NetworkProcess.h"
 #include "NetworkProcessConnectionMessages.h"
 #include "NetworkResourceLoadParameters.h"
+#include "PlatformCertificateInfo.h"
 #include "RemoteNetworkingContext.h"
 #include "ShareableResource.h"
 #include "SharedMemory.h"
index f64d2fe..e197ff3 100644 (file)
 
 #import "NetworkProcessCreationParameters.h"
 #import "NetworkResourceLoader.h"
+#import "PlatformCertificateInfo.h"
 #import "ResourceCachesToClear.h"
 #import "SandboxExtension.h"
 #import "SandboxInitializationParameters.h"
 #import "StringUtilities.h"
 #import <WebCore/FileSystem.h>
 #import <WebCore/LocalizedStrings.h>
-#import <WebCore/CertificateInfo.h>
 #import <WebKitSystemInterface.h>
 #import <mach/host_info.h>
 #import <mach/mach.h>
@@ -185,7 +185,7 @@ void NetworkProcess::platformSetCacheModel(CacheModel cacheModel)
     [nsurlCache setDiskCapacity:std::max<unsigned long>(urlCacheDiskCapacity, [nsurlCache diskCapacity])]; // Don't shrink a big disk cache, since that would cause churn.
 }
 
-void NetworkProcess::allowSpecificHTTPSCertificateForHost(const CertificateInfo& certificateInfo, const String& host)
+void NetworkProcess::allowSpecificHTTPSCertificateForHost(const PlatformCertificateInfo& certificateInfo, const String& host)
 {
     [NSURLRequest setAllowsSpecificHTTPSCertificate:(NSArray *)certificateInfo.certificateChain() forHost:(NSString *)host];
 }
index bd4e6c2..d8ebacb 100644 (file)
@@ -44,7 +44,7 @@ void NetworkProcess::platformSetCacheModel(CacheModel)
     notImplemented();
 }
 
-void NetworkProcess::allowSpecificHTTPSCertificateForHost(const CertificateInfo&, const String&)
+void NetworkProcess::allowSpecificHTTPSCertificateForHost(const PlatformCertificateInfo&, const String&)
 {
     notImplemented();
 }
index bbaf062..84e8f06 100644 (file)
@@ -49,6 +49,7 @@ list(APPEND WebKit2_SOURCES
     Shared/linux/SeccompFilters/Syscall.cpp
     Shared/linux/SeccompFilters/SyscallPolicy.cpp
 
+    Shared/soup/PlatformCertificateInfo.cpp
     Shared/soup/WebCoreArgumentCodersSoup.cpp
 
     UIProcess/DefaultUndoController.cpp
index a2eb057..11c6d4e 100644 (file)
@@ -61,6 +61,7 @@ list(APPEND WebKit2_SOURCES
     Shared/linux/SeccompFilters/Syscall.cpp
     Shared/linux/SeccompFilters/SyscallPolicy.cpp
 
+    Shared/soup/PlatformCertificateInfo.cpp
     Shared/soup/WebCoreArgumentCodersSoup.cpp
 
     UIProcess/DefaultUndoController.cpp
index 32fa21f..34dd431 100644 (file)
 #import "WKAPICast.h"
 #import "WebCertificateInfo.h"
 
-using namespace WebCore;
 using namespace WebKit;
 
 WKCertificateInfoRef WKCertificateInfoCreateWithCertficateChain(CFArrayRef certificateChain)
 {
-    RefPtr<WebCertificateInfo> certificateInfo = WebCertificateInfo::create(CertificateInfo(certificateChain));
+    RefPtr<WebCertificateInfo> certificateInfo = WebCertificateInfo::create(PlatformCertificateInfo(certificateChain));
     return toAPI(certificateInfo.release().leakRef());
 }
 
 CFArrayRef WKCertificateInfoGetCertificateChain(WKCertificateInfoRef certificateInfoRef)
 {
-    return toImpl(certificateInfoRef)->certificateInfo().certificateChain();
+    return toImpl(certificateInfoRef)->platformCertificateInfo().certificateChain();
 }
index e2f4532..7f7dca2 100644 (file)
@@ -98,20 +98,20 @@ void AuthenticationManager::didReceiveAuthenticationChallenge(Download* download
 
 // Currently, only Mac knows how to respond to authentication challenges with certificate info.
 #if !USE(SECURITY_FRAMEWORK)
-bool AuthenticationManager::tryUseCertificateInfoForChallenge(const WebCore::AuthenticationChallenge&, const CertificateInfo&)
+bool AuthenticationManager::tryUsePlatformCertificateInfoForChallenge(const WebCore::AuthenticationChallenge&, const PlatformCertificateInfo&)
 {
     return false;
 }
 #endif
 
-void AuthenticationManager::useCredentialForChallenge(uint64_t challengeID, const Credential& credential, const CertificateInfo& certificateInfo)
+void AuthenticationManager::useCredentialForChallenge(uint64_t challengeID, const Credential& credential, const PlatformCertificateInfo& certificateInfo)
 {
     ASSERT(isMainThread());
 
     AuthenticationChallenge challenge = m_challenges.take(challengeID);
     ASSERT(!challenge.isNull());
     
-    if (tryUseCertificateInfoForChallenge(challenge, certificateInfo))
+    if (tryUsePlatformCertificateInfoForChallenge(challenge, certificateInfo))
         return;
     
     AuthenticationClient* coreClient = challenge.authenticationClient();
index dfe1e61..4c6f81e 100644 (file)
 namespace WebCore {
     class AuthenticationChallenge;
     class Credential;
-    class CertificateInfo;
 }
 
 namespace WebKit {
 
 class ChildProcess;
 class Download;
+class PlatformCertificateInfo;
 class WebFrame;
 
 class AuthenticationManager : public WebProcessSupplement, public NetworkProcessSupplement, public CoreIPC::MessageReceiver {
@@ -59,7 +59,7 @@ public:
     // Called for downloads with or without the NetworkProcess
     void didReceiveAuthenticationChallenge(Download*, const WebCore::AuthenticationChallenge&);
 
-    void useCredentialForChallenge(uint64_t challengeID, const WebCore::Credential&, const WebCore::CertificateInfo&);
+    void useCredentialForChallenge(uint64_t challengeID, const WebCore::Credential&, const PlatformCertificateInfo&);
     void continueWithoutCredentialForChallenge(uint64_t challengeID);
     void cancelChallenge(uint64_t challengeID);
     
@@ -69,7 +69,7 @@ private:
     // CoreIPC::MessageReceiver
     virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&) OVERRIDE;
 
-    bool tryUseCertificateInfoForChallenge(const WebCore::AuthenticationChallenge&, const WebCore::CertificateInfo&);
+    bool tryUsePlatformCertificateInfoForChallenge(const WebCore::AuthenticationChallenge&, const PlatformCertificateInfo&);
 
     uint64_t establishIdentifierForChallenge(const WebCore::AuthenticationChallenge&);
 
index 34db9b2..bb1cc30 100644 (file)
@@ -21,7 +21,7 @@
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 messages -> AuthenticationManager {
-    void UseCredentialForChallenge(uint64_t challengeID, WebCore::Credential credential, WebCore::CertificateInfo certificate);
+    void UseCredentialForChallenge(uint64_t challengeID, WebCore::Credential credential, WebKit::PlatformCertificateInfo certificate);
     void ContinueWithoutCredentialForChallenge(uint64_t challengeID);
     void CancelChallenge(uint64_t challengeID);
 }
index 8b6d713..c0b92f1 100644 (file)
 
 #if USE(SECURITY_FRAMEWORK)
 
+#include "PlatformCertificateInfo.h"
 #include <Security/SecIdentity.h>
 #include <WebCore/AuthenticationChallenge.h>
-#include <WebCore/CertificateInfo.h>
 
 using namespace WebCore;
 
 namespace WebKit {
 
-bool AuthenticationManager::tryUseCertificateInfoForChallenge(const AuthenticationChallenge& challenge, const CertificateInfo& certificateInfo)
+bool AuthenticationManager::tryUsePlatformCertificateInfoForChallenge(const AuthenticationChallenge& challenge, const PlatformCertificateInfo& certificateInfo)
 {
     CFArrayRef chain = certificateInfo.certificateChain();
     if (!chain)
index d9b1409..0022f31 100644 (file)
@@ -215,7 +215,7 @@ public:
         }
         case APIObject::TypeCertificateInfo: {
             WebCertificateInfo* certificateInfo = static_cast<WebCertificateInfo*>(m_root);
-            encoder << certificateInfo->certificateInfo();
+            encoder << certificateInfo->platformCertificateInfo();
             return true;
         }
         case APIObject::TypeError: {
@@ -504,10 +504,10 @@ public:
             break;
         }
         case APIObject::TypeCertificateInfo: {
-            WebCore::CertificateInfo certificateInfo;
-            if (!decoder.decode(certificateInfo))
+            PlatformCertificateInfo platformCertificateInfo;
+            if (!decoder.decode(platformCertificateInfo))
                 return false;
-            coder.m_root = WebCertificateInfo::create(certificateInfo);
+            coder.m_root = WebCertificateInfo::create(platformCertificateInfo);
             break;
         }
         case APIObject::TypeError: {
index c8fbacc..06182fc 100644 (file)
 #define WebCertificateInfo_h
 
 #include "APIObject.h"
-#include <WebCore/CertificateInfo.h>
+#include "PlatformCertificateInfo.h"
 #include <wtf/PassRefPtr.h>
 
 namespace WebKit {
 
 class WebCertificateInfo : public TypedAPIObject<APIObject::TypeCertificateInfo> {
 public:
-    static PassRefPtr<WebCertificateInfo> create(const WebCore::CertificateInfo& info)
+    static PassRefPtr<WebCertificateInfo> create(const PlatformCertificateInfo& info)
     {
         return adoptRef(new WebCertificateInfo(info));
     }
 
-    const WebCore::CertificateInfo& certificateInfo() const { return m_certificateInfo; }
+    const PlatformCertificateInfo& platformCertificateInfo() const { return m_platformCertificateInfo; }
 
 private:
-    explicit WebCertificateInfo(const WebCore::CertificateInfo& info)
-        : m_certificateInfo(info)
+    explicit WebCertificateInfo(const PlatformCertificateInfo& info)
+        : m_platformCertificateInfo(info)
     {
     }
 
-    WebCore::CertificateInfo m_certificateInfo;
+    PlatformCertificateInfo m_platformCertificateInfo;
 };
 
 } // namespace WebKit
index 6bb97f0..029ef3d 100644 (file)
@@ -28,7 +28,6 @@
 
 #include "ShareableBitmap.h"
 #include <WebCore/AuthenticationChallenge.h>
-#include <WebCore/CertificateInfo.h>
 #include <WebCore/Cookie.h>
 #include <WebCore/Credential.h>
 #include <WebCore/Cursor.h>
@@ -584,22 +583,6 @@ bool ArgumentCoder<ResourceResponse>::decode(ArgumentDecoder& decoder, ResourceR
     return true;
 }
 
-void ArgumentCoder<CertificateInfo>::encode(ArgumentEncoder& encoder, const CertificateInfo& certificateInfo)
-{
-    encodePlatformData(encoder, certificateInfo);
-}
-
-bool ArgumentCoder<CertificateInfo>::decode(ArgumentDecoder& decoder, CertificateInfo& certificateInfo)
-{
-    CertificateInfo certificate;
-
-    if (!decodePlatformData(decoder, certificate))
-        return false;
-
-    certificateInfo = certificate;
-    return true;
-}
-
 void ArgumentCoder<ResourceError>::encode(ArgumentEncoder& encoder, const ResourceError& resourceError)
 {
     if (kShouldSerializeWebCoreData) {
index 6771a29..66283cb 100644 (file)
@@ -47,7 +47,6 @@ class IntSize;
 class KeyframeValueList;
 class URL;
 class Notification;
-class CertificateInfo;
 class ProtectionSpace;
 class ResourceError;
 class ResourceRequest;
@@ -190,13 +189,6 @@ template<> struct ArgumentCoder<WebCore::ResourceResponse> {
     static bool decodePlatformData(ArgumentDecoder&, WebCore::ResourceResponse&);
 };
 
-template<> struct ArgumentCoder<WebCore::CertificateInfo> {
-    static void encode(ArgumentEncoder&, const WebCore::CertificateInfo&);
-    static bool decode(ArgumentDecoder&, WebCore::CertificateInfo&);
-    static void encodePlatformData(ArgumentEncoder&, const WebCore::CertificateInfo&);
-    static bool decodePlatformData(ArgumentDecoder&, WebCore::CertificateInfo&);
-};
-
 template<> struct ArgumentCoder<WebCore::ResourceError> {
 #if PLATFORM(MAC)
     static const bool kShouldSerializeWebCoreData = false;
@@ -1,6 +1,5 @@
 /*
- * Copyright (C) 2012 Igalia S.L.
- * Copyright (C) 2013 Company 100 Inc.
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include "config.h"
-#include "CertificateInfo.h"
+#ifndef PlatformCertificateInfo_h
+#define PlatformCertificateInfo_h
 
-namespace WebCore {
+#include <WebCore/ResourceResponse.h>
+#include <wtf/RetainPtr.h>
 
-CertificateInfo::CertificateInfo()
-    : m_tlsErrors(static_cast<GTlsCertificateFlags>(0))
-{
+namespace CoreIPC {
+    class ArgumentDecoder;
+    class ArgumentEncoder;
 }
 
-CertificateInfo::CertificateInfo(GTlsCertificate* certificate, GTlsCertificateFlags tlsErrors)
-    : m_certificate(certificate)
-    , m_tlsErrors(tlsErrors)
-{
-}
+namespace WebKit {
 
-CertificateInfo::~CertificateInfo()
-{
-}
+class PlatformCertificateInfo {
+public:
+    PlatformCertificateInfo();
+    explicit PlatformCertificateInfo(const WebCore::ResourceResponse&);
+    explicit PlatformCertificateInfo(CFArrayRef certificateChain);
+
+    CFArrayRef certificateChain() const { return m_certificateChain.get(); }
+
+    void encode(CoreIPC::ArgumentEncoder&) const;
+    static bool decode(CoreIPC::ArgumentDecoder&, PlatformCertificateInfo&);
+
+#ifndef NDEBUG
+    void dump() const;
+#endif
+
+private:
+    RetainPtr<CFArrayRef> m_certificateChain;
+};
+
+} // namespace WebKit
 
-} // namespace WebCore
+#endif // PlatformCertificateInfo_h
@@ -1,6 +1,5 @@
 /*
  * Copyright (C) 2010 Apple Inc. All rights reserved.
- * Copyright (C) 2013 Company 100 Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  */
 
 #import "config.h"
-#import "CertificateInfo.h"
+#import "PlatformCertificateInfo.h"
 
-namespace WebCore {
+#import "ArgumentCodersCF.h"
+#import "ArgumentDecoder.h"
+#import "ArgumentEncoder.h"
 
-CertificateInfo::CertificateInfo()
+using namespace WebCore;
+
+namespace WebKit {
+
+PlatformCertificateInfo::PlatformCertificateInfo()
 {
 }
 
-
-CertificateInfo::CertificateInfo(CFArrayRef certificateChain)
-    : m_certificateChain(certificateChain)
+PlatformCertificateInfo::PlatformCertificateInfo(const ResourceResponse& response)
+    : m_certificateChain(response.certificateChain())
 {
 }
 
-CertificateInfo::~CertificateInfo()
+PlatformCertificateInfo::PlatformCertificateInfo(CFArrayRef certificateChain)
+    : m_certificateChain(certificateChain)
 {
 }
 
-void CertificateInfo::setCertificateChain(CFArrayRef certificateChain)
+void PlatformCertificateInfo::encode(CoreIPC::ArgumentEncoder& encoder) const
 {
-    m_certificateChain = certificateChain;
+    if (!m_certificateChain) {
+        encoder << false;
+        return;
+    }
+
+    encoder << true;
+    CoreIPC::encode(encoder, m_certificateChain.get());
 }
 
-CFArrayRef CertificateInfo::certificateChain() const
+bool PlatformCertificateInfo::decode(CoreIPC::ArgumentDecoder& decoder, PlatformCertificateInfo& c)
 {
-    return m_certificateChain.get();
+    bool hasCertificateChain;
+    if (!decoder.decode(hasCertificateChain))
+        return false;
+
+    if (!hasCertificateChain)
+        return true;
+
+    if (!CoreIPC::decode(decoder, c.m_certificateChain))
+        return false;
+
+    return true;
 }
 
 #ifndef NDEBUG
-void CertificateInfo::dump() const
+void PlatformCertificateInfo::dump() const
 {
     unsigned entries = m_certificateChain ? CFArrayGetCount(m_certificateChain.get()) : 0;
 
-    NSLog(@"CertificateInfo\n");
+    NSLog(@"PlatformCertificateInfo\n");
     NSLog(@"  Entries: %d\n", entries);
     for (unsigned i = 0; i < entries; ++i) {
         RetainPtr<CFStringRef> summary = adoptCF(SecCertificateCopySubjectSummary((SecCertificateRef)CFArrayGetValueAtIndex(m_certificateChain.get(), i)));
@@ -67,4 +88,4 @@ void CertificateInfo::dump() const
 }
 #endif
 
-} // namespace WebCore
+} // namespace WebKit
index 9026609..c126000 100644 (file)
@@ -1,6 +1,5 @@
 /*
  * Copyright (C) 2010 Apple Inc. All rights reserved.
- * Copyright (C) 2013 Company 100 Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 #import "WebCoreArgumentCoders.h"
 
 #import "ArgumentCodersCF.h"
+#import "PlatformCertificateInfo.h"
 #import "WebKitSystemInterface.h"
 #import <WebCore/KeyboardEvent.h>
-#import <WebCore/CertificateInfo.h>
 #import <WebCore/ResourceError.h>
 #import <WebCore/ResourceRequest.h>
-#import <WebCore/ResourceResponse.h>
 
 using namespace WebCore;
+using namespace WebKit;
 
 namespace CoreIPC {
 
@@ -133,37 +132,6 @@ bool ArgumentCoder<ResourceResponse>::decodePlatformData(ArgumentDecoder& decode
     return true;
 }
 
-
-void ArgumentCoder<CertificateInfo>::encodePlatformData(ArgumentEncoder& encoder, const CertificateInfo& certificateInfo)
-{
-    CFArrayRef certificateChain = certificateInfo.certificateChain();
-    if (!certificateChain) {
-        encoder << false;
-        return;
-    }
-
-    encoder << true;
-    CoreIPC::encode(encoder, certificateChain);
-}
-
-bool ArgumentCoder<CertificateInfo>::decodePlatformData(ArgumentDecoder& decoder, CertificateInfo& certificateInfo)
-{
-    bool hasCertificateChain;
-    if (!decoder.decode(hasCertificateChain))
-        return false;
-
-    if (!hasCertificateChain)
-        return true;
-
-    RetainPtr<CFArrayRef> certificateChain;
-    if (!CoreIPC::decode(decoder, certificateChain))
-        return false;
-
-    certificateInfo.setCertificateChain(certificateChain.get());
-
-    return true;
-}
-
 static NSString* nsString(const String& string)
 {
     return string.impl() ? [NSString stringWithCharacters:reinterpret_cast<const UniChar*>(string.characters()) length:string.length()] : @"";
@@ -200,7 +168,7 @@ void ArgumentCoder<ResourceError>::encodePlatformData(ArgumentEncoder& encoder,
 
     id peerCertificateChain = [userInfo objectForKey:@"NSErrorPeerCertificateChainKey"];
     ASSERT(!peerCertificateChain || [peerCertificateChain isKindOfClass:[NSArray class]]);
-    encoder << CertificateInfo((CFArrayRef)peerCertificateChain);
+    encoder << PlatformCertificateInfo((CFArrayRef)peerCertificateChain);
 }
 
 bool ArgumentCoder<ResourceError>::decodePlatformData(ArgumentDecoder& decoder, ResourceError& resourceError)
@@ -226,7 +194,7 @@ bool ArgumentCoder<ResourceError>::decodePlatformData(ArgumentDecoder& decoder,
     if (!decoder.decode(stringUserInfoMap))
         return false;
 
-    CertificateInfo certificate;
+    PlatformCertificateInfo certificate;
     if (!decoder.decode(certificate))
         return false;
 
diff --git a/Source/WebKit2/Shared/soup/PlatformCertificateInfo.cpp b/Source/WebKit2/Shared/soup/PlatformCertificateInfo.cpp
new file mode 100644 (file)
index 0000000..c6904b4
--- /dev/null
@@ -0,0 +1,110 @@
+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "PlatformCertificateInfo.h"
+
+#include "ArgumentDecoder.h"
+#include "ArgumentEncoder.h"
+#include "DataReference.h"
+#include <WebCore/ResourceError.h>
+#include <WebCore/ResourceResponse.h>
+#include <libsoup/soup.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+PlatformCertificateInfo::PlatformCertificateInfo()
+    : m_tlsErrors(static_cast<GTlsCertificateFlags>(0))
+{
+}
+
+PlatformCertificateInfo::PlatformCertificateInfo(const ResourceResponse& response)
+    : m_certificate(response.soupMessageCertificate())
+    , m_tlsErrors(response.soupMessageTLSErrors())
+{
+}
+
+PlatformCertificateInfo::PlatformCertificateInfo(const ResourceError& resourceError)
+    : m_certificate(resourceError.certificate())
+    , m_tlsErrors(static_cast<GTlsCertificateFlags>(resourceError.tlsErrors()))
+{
+}
+
+PlatformCertificateInfo::~PlatformCertificateInfo()
+{
+}
+
+void PlatformCertificateInfo::encode(CoreIPC::ArgumentEncoder& encoder) const
+{
+    if (!m_certificate) {
+        encoder << false;
+        return;
+    }
+
+    GByteArray* certificateData = 0;
+    g_object_get(G_OBJECT(m_certificate.get()), "certificate", &certificateData, NULL);
+    if (!certificateData) {
+        encoder << false;
+        return;
+    }
+
+    encoder << true;
+    GRefPtr<GByteArray> certificate = adoptGRef(certificateData);
+    encoder.encodeVariableLengthByteArray(CoreIPC::DataReference(certificate->data, certificate->len));
+    encoder << static_cast<uint32_t>(m_tlsErrors);
+}
+
+bool PlatformCertificateInfo::decode(CoreIPC::ArgumentDecoder& decoder, PlatformCertificateInfo& certificateInfo)
+{
+    bool hasCertificate;
+    if (!decoder.decode(hasCertificate))
+        return false;
+
+    if (!hasCertificate)
+        return true;
+
+    CoreIPC::DataReference certificateDataReference;
+    if (!decoder.decodeVariableLengthByteArray(certificateDataReference))
+        return false;
+
+    GByteArray* certificateData = g_byte_array_sized_new(certificateDataReference.size());
+    certificateData = g_byte_array_append(certificateData, certificateDataReference.data(), certificateDataReference.size());
+    GRefPtr<GByteArray> certificate = adoptGRef(certificateData);
+
+    GTlsBackend* backend = g_tls_backend_get_default();
+    certificateInfo.m_certificate = adoptGRef(G_TLS_CERTIFICATE(g_initable_new(g_tls_backend_get_certificate_type(backend), 0, 0,
+                                                                               "certificate", certificate.get(), NULL)));
+
+    uint32_t tlsErrors;
+    if (!decoder.decode(tlsErrors))
+        return false;
+    certificateInfo.m_tlsErrors = static_cast<GTlsCertificateFlags>(tlsErrors);
+
+    return true;
+}
+
+} // namespace WebKit
@@ -1,7 +1,6 @@
 /*
  * Copyright (C) 2010 Apple Inc. All rights reserved.
  * Portions Copyright (c) 2010 Motorola Mobility, Inc.  All rights reserved.
- * Portions Copyright (c) 2013 Company 100 Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef CertificateInfo_h
-#define CertificateInfo_h
+#ifndef PlatformCertificateInfo_h
+#define PlatformCertificateInfo_h
 
-#if PLATFORM(MAC) || USE(CFNETWORK)
-#include <wtf/RetainPtr.h>
-#elif USE(SOUP)
-#include <gio/gio.h>
+#include <libsoup/soup.h>
 #include <wtf/gobject/GRefPtr.h>
-#endif
 
-namespace WebCore {
-
-class CertificateInfo {
-public:
-    CertificateInfo();
+namespace CoreIPC {
+class ArgumentDecoder;
+class ArgumentEncoder;
+}
 
+<<<<<<< HEAD:Source/WebCore/platform/network/CertificateInfo.h
 #if PLATFORM(MAC)
     explicit CertificateInfo(CFArrayRef certificateChain);
 #elif USE(SOUP)
     explicit CertificateInfo(GTlsCertificate*, GTlsCertificateFlags);
 #endif
+=======
+namespace WebCore {
+class ResourceError;
+class ResourceResponse;
+}
+>>>>>>> parent of baccb1d... Move PlatformCertificateInfo to WebCore and make the ResourceResponse primitives work in terms of that platform agnostic object:Source/WebKit2/Shared/soup/PlatformCertificateInfo.h
 
-    ~CertificateInfo();
+namespace WebKit {
 
-#if PLATFORM(MAC) || USE(CFNETWORK)
-    void setCertificateChain(CFArrayRef);
-    CFArrayRef certificateChain() const;
-#ifndef NDEBUG
-    void dump() const;
-#endif
+class PlatformCertificateInfo {
+public:
+    PlatformCertificateInfo();
+    explicit PlatformCertificateInfo(const WebCore::ResourceResponse&);
+    explicit PlatformCertificateInfo(const WebCore::ResourceError&);
+    ~PlatformCertificateInfo();
 
-#elif USE(SOUP)
     GTlsCertificate* certificate() const { return m_certificate.get(); }
-    void setCertificate(GTlsCertificate* certificate) { m_certificate = certificate; }
-
     GTlsCertificateFlags tlsErrors() const { return m_tlsErrors; }
-    void setTLSErrors(GTlsCertificateFlags tlsErrors) { m_tlsErrors = tlsErrors; }
-#endif
+
+    void encode(CoreIPC::ArgumentEncoder&) const;
+    static bool decode(CoreIPC::ArgumentDecoder&, PlatformCertificateInfo&);
 
 private:
-#if PLATFORM(MAC) || USE(CFNETWORK)
-    // Certificate chain is normally part of NS/CFURLResponse, but there is no way to re-add it to a deserialized response after IPC.
-    RetainPtr<CFArrayRef> m_certificateChain;
-#elif USE(SOUP)
     GRefPtr<GTlsCertificate> m_certificate;
     GTlsCertificateFlags m_tlsErrors;
-#endif
 };
 
-} // namespace WebCore
+} // namespace WebKit
 
-#endif // CertificateInfo_h
+#endif // PlatformCertificateInfo_h
index 7617b36..dc4e119 100644 (file)
@@ -1,7 +1,6 @@
 /*
  * Copyright (C) 2010 Apple Inc. All rights reserved.
  * Portions Copyright (c) 2010 Motorola Mobility, Inc.  All rights reserved.
- * Portions Copyright (c) 2013 Company 100 Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  */
 
 #include "config.h"
-#include "DataReference.h"
 #include "WebCoreArgumentCoders.h"
 
-#include <WebCore/CertificateInfo.h>
+#include "PlatformCertificateInfo.h"
 #include <WebCore/ResourceError.h>
 #include <WebCore/ResourceRequest.h>
 #include <WebCore/ResourceResponse.h>
 #include <wtf/text/CString.h>
 
 using namespace WebCore;
+using namespace WebKit;
 
 namespace CoreIPC {
 
@@ -69,69 +68,19 @@ bool ArgumentCoder<ResourceResponse>::decodePlatformData(ArgumentDecoder& decode
 }
 
 
-void ArgumentCoder<CertificateInfo>::encodePlatformData(ArgumentEncoder& encoder, const CertificateInfo& certificateInfo)
-{
-    if (!certificateInfo.certificate()) {
-        encoder << false;
-        return;
-    }
-
-    GByteArray* certificateData = 0;
-    g_object_get(G_OBJECT(certificateInfo.certificate()), "certificate", &certificateData, NULL);
-    if (!certificateData) {
-        encoder << false;
-        return;
-    }
-
-    encoder << true;
-    GRefPtr<GByteArray> certificate = adoptGRef(certificateData);
-    encoder.encodeVariableLengthByteArray(CoreIPC::DataReference(certificate->data, certificate->len));
-    encoder << static_cast<uint32_t>(certificateInfo.tlsErrors());
-}
-
-bool ArgumentCoder<CertificateInfo>::decodePlatformData(ArgumentDecoder& decoder, CertificateInfo& certificateInfo)
-{
-    bool hasCertificate;
-    if (!decoder.decode(hasCertificate))
-        return false;
-
-    if (!hasCertificate)
-        return true;
-
-    CoreIPC::DataReference certificateDataReference;
-    if (!decoder.decodeVariableLengthByteArray(certificateDataReference))
-        return false;
-
-    GByteArray* certificateData = g_byte_array_sized_new(certificateDataReference.size());
-    certificateData = g_byte_array_append(certificateData, certificateDataReference.data(), certificateDataReference.size());
-    GRefPtr<GByteArray> certificateBytes = adoptGRef(certificateData);
-
-    GTlsBackend* backend = g_tls_backend_get_default();
-    GRefPtr<GTlsCertificate> certificate = adoptGRef(G_TLS_CERTIFICATE(g_initable_new(g_tls_backend_get_certificate_type(backend), 0, 0,
-        "certificate", certificateBytes.get(), 0)));
-    certificateInfo.setCertificate(certificate.get());
-
-    uint32_t tlsErrors;
-    if (!decoder.decode(tlsErrors))
-        return false;
-    certificateInfo.setTLSErrors(static_cast<GTlsCertificateFlags>(tlsErrors));
-
-    return true;
-}
-
-
 void ArgumentCoder<ResourceError>::encodePlatformData(ArgumentEncoder& encoder, const ResourceError& resourceError)
 {
-    encoder << resourceError.certificateInfo();
+    encoder << PlatformCertificateInfo(resourceError);
 }
 
 bool ArgumentCoder<ResourceError>::decodePlatformData(ArgumentDecoder& decoder, ResourceError& resourceError)
 {
-    CertificateInfo certificateInfo;
+    PlatformCertificateInfo certificateInfo;
     if (!decoder.decode(certificateInfo))
         return false;
 
-    resourceError.setCertificateInfo(certificateInfo);
+    resourceError.setCertificate(certificateInfo.certificate());
+    resourceError.setTLSErrors(certificateInfo.tlsErrors());
     return true;
 }
 
index 7e91f46..c3c4a23 100644 (file)
@@ -56,9 +56,9 @@ static void didFailProvisionalLoadWithErrorForFrame(WKPageRef page, WKFrameRef f
     GOwnPtr<GError> webError(g_error_new_literal(g_quark_from_string(resourceError.domain().utf8().data()),
                                                  resourceError.errorCode(),
                                                  resourceError.localizedDescription().utf8().data()));
-    if (resourceError.certificateInfo().tlsErrors()) {
+    if (resourceError.tlsErrors()) {
         webkitWebViewLoadFailedWithTLSErrors(WEBKIT_WEB_VIEW(clientInfo), resourceError.failingURL().utf8().data(), webError.get(),
-            static_cast<GTlsCertificateFlags>(resourceError.certificateInfo().tlsErrors()), resourceError.certificateInfo().certificate());
+            static_cast<GTlsCertificateFlags>(resourceError.tlsErrors()), resourceError.certificate());
     } else
         webkitWebViewLoadFailed(WEBKIT_WEB_VIEW(clientInfo), WEBKIT_LOAD_STARTED, resourceError.failingURL().utf8().data(), webError.get());
 }
index 7145f76..d4e4d37 100644 (file)
@@ -22,6 +22,7 @@
 #include "WebKitWebView.h"
 
 #include "ImageOptions.h"
+#include "PlatformCertificateInfo.h"
 #include "WebCertificateInfo.h"
 #include "WebContextMenuItem.h"
 #include "WebContextMenuItemData.h"
@@ -59,7 +60,6 @@
 #include "WebKitWebViewPrivate.h"
 #include "WebKitWindowPropertiesPrivate.h"
 #include <JavaScriptCore/APICast.h>
-#include <WebCore/CertificateInfo.h>
 #include <WebCore/DragIcon.h>
 #include <WebCore/GOwnPtrGtk.h>
 #include <WebCore/GtkUtilities.h>
@@ -3026,7 +3026,7 @@ gboolean webkit_web_view_get_tls_info(WebKitWebView* webView, GTlsCertificate**
     if (!mainFrame)
         return FALSE;
 
-    const WebCore::CertificateInfo& certificateInfo = mainFrame->certificateInfo()->certificateInfo();
+    const PlatformCertificateInfo& certificateInfo = mainFrame->certificateInfo()->platformCertificateInfo();
     if (certificate)
         *certificate = certificateInfo.certificate();
     if (errors)
index d5573da..9f64885 100644 (file)
@@ -66,7 +66,7 @@ void AuthenticationChallengeProxy::useCredential(WebCredential* credential)
         m_connection->send(Messages::AuthenticationManager::ContinueWithoutCredentialForChallenge(m_challengeID), 0);
     else {
         WebCertificateInfo* certificateInfo = credential->certificateInfo();
-        WebCore::CertificateInfo platformInfo = certificateInfo ? certificateInfo->certificateInfo() : WebCore::CertificateInfo();
+        PlatformCertificateInfo platformInfo = certificateInfo ? certificateInfo->platformCertificateInfo() : PlatformCertificateInfo();
         m_connection->send(Messages::AuthenticationManager::UseCredentialForChallenge(m_challengeID, credential->core(), platformInfo), 0);
     }
 
index fe34485..7f4788f 100644 (file)
@@ -1085,7 +1085,7 @@ void WebContext::allowSpecificHTTPSCertificateForHost(const WebCertificateInfo*
 {
 #if ENABLE(NETWORK_PROCESS)
     if (m_usesNetworkProcess && m_networkProcess) {
-        m_networkProcess->send(Messages::NetworkProcess::AllowSpecificHTTPSCertificateForHost(certificate->certificateInfo(), host), 0);
+        m_networkProcess->send(Messages::NetworkProcess::AllowSpecificHTTPSCertificateForHost(certificate->platformCertificateInfo(), host), 0);
         return;
     }
 #else
index c29e035..a57087c 100644 (file)
@@ -138,7 +138,7 @@ void WebFrameProxy::didFailProvisionalLoad()
     m_unreachableURL = m_lastUnreachableURL;
 }
 
-void WebFrameProxy::didCommitLoad(const String& contentType, const WebCore::CertificateInfo& certificateInfo)
+void WebFrameProxy::didCommitLoad(const String& contentType, const PlatformCertificateInfo& certificateInfo)
 {
     ASSERT(m_loadState == LoadStateProvisional);
     m_loadState = LoadStateCommitted;
index 495f346..0bee666 100644 (file)
@@ -40,14 +40,10 @@ namespace CoreIPC {
     class Connection;
 }
 
-namespace WebCore {
-class CertificateInfo;
-}
-
 namespace WebKit {
 
 class ImmutableArray;
-
+class PlatformCertificateInfo;
 class WebCertificateInfo;
 class WebFormSubmissionListenerProxy;
 class WebFramePolicyListenerProxy;
@@ -110,7 +106,7 @@ public:
     void didStartProvisionalLoad(const String& url);
     void didReceiveServerRedirectForProvisionalLoad(const String& url);
     void didFailProvisionalLoad();
-    void didCommitLoad(const String& contentType, const WebCore::CertificateInfo&);
+    void didCommitLoad(const String& contentType, const PlatformCertificateInfo&);
     void didFinishLoad();
     void didFailLoad();
     void didSameDocumentNavigation(const String&); // eg. anchor navigation, session state change.
index 2f20cc5..a743ec6 100644 (file)
@@ -2190,7 +2190,7 @@ void WebPageProxy::clearLoadDependentCallbacks()
     }
 }
 
-void WebPageProxy::didCommitLoadForFrame(uint64_t frameID, const String& mimeType, uint32_t opaqueFrameLoadType, const CertificateInfo& certificateInfo, CoreIPC::MessageDecoder& decoder)
+void WebPageProxy::didCommitLoadForFrame(uint64_t frameID, const String& mimeType, uint32_t opaqueFrameLoadType, const PlatformCertificateInfo& certificateInfo, CoreIPC::MessageDecoder& decoder)
 {
     RefPtr<APIObject> userData;
     WebContextUserMessageDecoder messageDecoder(userData, m_process.get());
index 9180a1b..2c94c51 100644 (file)
@@ -102,7 +102,6 @@ class DragData;
 class FloatRect;
 class GraphicsLayer;
 class IntSize;
-class CertificateInfo;
 class ProtectionSpace;
 class SharedBuffer;
 struct FileChooserSettings;
@@ -126,6 +125,7 @@ class NativeWebKeyboardEvent;
 class NativeWebMouseEvent;
 class NativeWebWheelEvent;
 class PageClient;
+class PlatformCertificateInfo;
 class StringPairVector;
 class WebBackForwardList;
 class WebBackForwardListItem;
@@ -784,7 +784,7 @@ private:
     void didStartProvisionalLoadForFrame(uint64_t frameID, const String& url, const String& unreachableURL, CoreIPC::MessageDecoder&);
     void didReceiveServerRedirectForProvisionalLoadForFrame(uint64_t frameID, const String&, CoreIPC::MessageDecoder&);
     void didFailProvisionalLoadForFrame(uint64_t frameID, const WebCore::ResourceError&, CoreIPC::MessageDecoder&);
-    void didCommitLoadForFrame(uint64_t frameID, const String& mimeType, uint32_t frameLoadType, const WebCore::CertificateInfo&, CoreIPC::MessageDecoder&);
+    void didCommitLoadForFrame(uint64_t frameID, const String& mimeType, uint32_t frameLoadType, const PlatformCertificateInfo&, CoreIPC::MessageDecoder&);
     void didFinishDocumentLoadForFrame(uint64_t frameID, CoreIPC::MessageDecoder&);
     void didFinishLoadForFrame(uint64_t frameID, CoreIPC::MessageDecoder&);
     void didFailLoadForFrame(uint64_t frameID, const WebCore::ResourceError&, CoreIPC::MessageDecoder&);
index 1afdf01..a98538b 100644 (file)
@@ -111,7 +111,7 @@ messages -> WebPageProxy {
     DidCreateSubframe(uint64_t frameID)
 
     # Frame load messages
-    DidCommitLoadForFrame(uint64_t frameID, WTF::String mimeType, uint32_t loadType, WebCore::CertificateInfo certificateInfo, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
+    DidCommitLoadForFrame(uint64_t frameID, WTF::String mimeType, uint32_t loadType, WebKit::PlatformCertificateInfo certificateInfo, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
     DidFailLoadForFrame(uint64_t frameID, WebCore::ResourceError error, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
     DidFailProvisionalLoadForFrame(uint64_t frameID, WebCore::ResourceError error, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
     DidFinishDocumentLoadForFrame(uint64_t frameID, WebKit::InjectedBundleUserMessageEncoder userData) Variadic
index ae12f58..90f5b8f 100644 (file)
                BCF18638167D071E00A1A85A /* CacheModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCF18637167D071E00A1A85A /* CacheModel.cpp */; };
                BCF4DE23168E4BD500C94AFC /* NetworkProcessSupplement.h in Headers */ = {isa = PBXBuildFile; fileRef = BCF4DE22168E4BD500C94AFC /* NetworkProcessSupplement.h */; };
                BCF4DE25168FA44800C94AFC /* WebContextSupplement.h in Headers */ = {isa = PBXBuildFile; fileRef = BCF4DE24168FA44800C94AFC /* WebContextSupplement.h */; };
+               BCF505E71243047B005955AE /* PlatformCertificateInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = BCF505E51243047B005955AE /* PlatformCertificateInfo.h */; };
+               BCF505E81243047B005955AE /* PlatformCertificateInfo.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCF505E61243047B005955AE /* PlatformCertificateInfo.mm */; };
                BCF50728124329AA005955AE /* WebCertificateInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = BCF50726124329AA005955AE /* WebCertificateInfo.h */; };
                BCF69F861176CD6F00471A52 /* WebHistoryClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCF69F841176CD6F00471A52 /* WebHistoryClient.cpp */; };
                BCF69F871176CD6F00471A52 /* WebHistoryClient.h in Headers */ = {isa = PBXBuildFile; fileRef = BCF69F851176CD6F00471A52 /* WebHistoryClient.h */; };
                BCF18637167D071E00A1A85A /* CacheModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CacheModel.cpp; sourceTree = "<group>"; };
                BCF4DE22168E4BD500C94AFC /* NetworkProcessSupplement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NetworkProcessSupplement.h; path = Network/NetworkProcessSupplement.h; sourceTree = "<group>"; };
                BCF4DE24168FA44800C94AFC /* WebContextSupplement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebContextSupplement.h; sourceTree = "<group>"; };
+               BCF505E51243047B005955AE /* PlatformCertificateInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformCertificateInfo.h; sourceTree = "<group>"; };
+               BCF505E61243047B005955AE /* PlatformCertificateInfo.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformCertificateInfo.mm; sourceTree = "<group>"; };
                BCF5068412431861005955AE /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = /System/Library/Frameworks/Security.framework; sourceTree = "<absolute>"; };
                BCF50726124329AA005955AE /* WebCertificateInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCertificateInfo.h; sourceTree = "<group>"; };
                BCF69F841176CD6F00471A52 /* WebHistoryClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebHistoryClient.cpp; sourceTree = "<group>"; };
                                C574A58012E66681002DFE98 /* PasteboardTypes.mm */,
                                E19582D2153CBFD700B60875 /* PDFKitImports.h */,
                                E19582D4153CC05300B60875 /* PDFKitImports.mm */,
+                               BCF505E51243047B005955AE /* PlatformCertificateInfo.h */,
+                               BCF505E61243047B005955AE /* PlatformCertificateInfo.mm */,
                                E1CC1B8F12D7EADF00625838 /* PrintInfoMac.mm */,
                                1AF1AC6A1651759E00C17D7F /* RemoteLayerTreeTransaction.h */,
                                1AF1AC691651759E00C17D7F /* RemoteLayerTreeTransaction.mm */,
                                C574A58112E66681002DFE98 /* PasteboardTypes.h in Headers */,
                                E19582D3153CBFD700B60875 /* PDFKitImports.h in Headers */,
                                51FCB18917BBFE0300394CD8 /* SynchronousNetworkLoaderClient.h in Headers */,
+                               BCF505E71243047B005955AE /* PlatformCertificateInfo.h in Headers */,
                                BCC43ABB127B95DC00317F16 /* PlatformPopupMenuData.h in Headers */,
                                BC8780FC1161C2B800CC2768 /* PlatformProcessIdentifier.h in Headers */,
                                1A6FB7D311E651E200DB1371 /* Plugin.h in Headers */,
                                2D2ADF1016364D8200197E47 /* PDFPluginChoiceAnnotation.mm in Sources */,
                                2D429BFD1721E2C700EC681F /* PDFPluginPasswordField.mm in Sources */,
                                2D2ADF0916362DD500197E47 /* PDFPluginTextAnnotation.mm in Sources */,
+                               BCF505E81243047B005955AE /* PlatformCertificateInfo.mm in Sources */,
                                BCC43ABA127B95DC00317F16 /* PlatformPopupMenuData.cpp in Sources */,
                                1A6FB7D211E651E200DB1371 /* Plugin.cpp in Sources */,
                                31A67E0C165B2A99006CBA66 /* PlugInAutoStartProvider.cpp in Sources */,
index b16a015..d575173 100644 (file)
 #include "Logging.h"
 #include "NetworkProcessConnection.h"
 #include "NetworkResourceLoaderMessages.h"
+#include "PlatformCertificateInfo.h"
 #include "WebCoreArgumentCoders.h"
 #include "WebErrors.h"
 #include "WebProcess.h"
-#include <WebCore/CertificateInfo.h>
 #include <WebCore/DocumentLoader.h>
 #include <WebCore/ResourceBuffer.h>
 #include <WebCore/ResourceError.h>
@@ -99,14 +99,14 @@ void WebResourceLoader::didSendData(uint64_t bytesSent, uint64_t totalBytesToBeS
     m_coreLoader->didSendData(bytesSent, totalBytesToBeSent);
 }
 
-void WebResourceLoader::didReceiveResponseWithCertificateInfo(const ResourceResponse& response, const CertificateInfo& certificateInfo, bool needsContinueDidReceiveResponseMessage)
+void WebResourceLoader::didReceiveResponseWithCertificateInfo(const ResourceResponse& response, const PlatformCertificateInfo& certificateInfo, bool needsContinueDidReceiveResponseMessage)
 {
     LOG(Network, "(WebProcess) WebResourceLoader::didReceiveResponseWithCertificateInfo for '%s'. Status %d.", m_coreLoader->url().string().utf8().data(), response.httpStatusCode());
 
     Ref<WebResourceLoader> protect(*this);
 
     ResourceResponse responseCopy(response);
-    responseCopy.setCertificateInfo(certificateInfo);
+    responseCopy.setCertificateChain(certificateInfo.certificateChain());
     m_coreLoader->didReceiveResponse(responseCopy);
 
     // If m_coreLoader becomes null as a result of the didReceiveResponse callback, we can't use the send function(). 
index f745219..0812c99 100644 (file)
@@ -40,7 +40,6 @@ class DataReference;
 }
 
 namespace WebCore {
-class CertificateInfo;
 class ProtectionSpace;
 class ResourceBuffer;
 class ResourceError;
@@ -51,6 +50,7 @@ class ResourceResponse;
 
 namespace WebKit {
 
+class PlatformCertificateInfo;
 typedef uint64_t ResourceLoadIdentifier;
 
 class WebResourceLoader : public RefCounted<WebResourceLoader>, public CoreIPC::MessageSender {
@@ -76,7 +76,7 @@ private:
 
     void willSendRequest(const WebCore::ResourceRequest&, const WebCore::ResourceResponse& redirectResponse);
     void didSendData(uint64_t bytesSent, uint64_t totalBytesToBeSent);
-    void didReceiveResponseWithCertificateInfo(const WebCore::ResourceResponse&, const WebCore::CertificateInfo&, bool needsContinueDidReceiveResponseMessage);
+    void didReceiveResponseWithCertificateInfo(const WebCore::ResourceResponse&, const PlatformCertificateInfo&, bool needsContinueDidReceiveResponseMessage);
     void didReceiveData(const CoreIPC::DataReference&, int64_t encodedDataLength);
     void didFinishResourceLoad(double finishTime);
     void didFailResourceLoad(const WebCore::ResourceError&);
index 4a62042..7b4045e 100644 (file)
@@ -29,7 +29,7 @@ messages -> WebResourceLoader LegacyReceiver {
     // FIXME (NetworkProcess): We'll need much more granularity for response messages.
     WillSendRequest(WebCore::ResourceRequest request, WebCore::ResourceResponse redirectResponse)
     DidSendData(uint64_t bytesSent, uint64_t totalBytesToBeSent)
-    DidReceiveResponseWithCertificateInfo(WebCore::ResourceResponse response, WebCore::CertificateInfo certificateInfo, bool needsContinueDidReceiveResponseMessage)
+    DidReceiveResponseWithCertificateInfo(WebCore::ResourceResponse response, WebKit::PlatformCertificateInfo certificateInfo, bool needsContinueDidReceiveResponseMessage)
     DidReceiveData(CoreIPC::DataReference data, int64_t encodedDataLength)
     DidFinishResourceLoad(double finishTime)
     DidFailResourceLoad(WebCore::ResourceError error)
index f8774cd..a843970 100644 (file)
@@ -33,6 +33,7 @@
 #include "InjectedBundleDOMWindowExtension.h"
 #include "InjectedBundleNavigationAction.h"
 #include "InjectedBundleUserMessageCoders.h"
+#include "PlatformCertificateInfo.h"
 #include "PluginView.h"
 #include "WebBackForwardListProxy.h"
 #include "WebContextMessages.h"
@@ -50,7 +51,6 @@
 #include "WebProcessProxyMessages.h"
 #include <JavaScriptCore/APICast.h>
 #include <JavaScriptCore/JSObject.h>
-#include <WebCore/CertificateInfo.h>
 #include <WebCore/Chrome.h>
 #include <WebCore/DOMWrapperWorld.h>
 #include <WebCore/DocumentLoader.h>
@@ -441,7 +441,7 @@ void WebFrameLoaderClient::dispatchDidCommitLoad()
 
     // Notify the UIProcess.
 
-    webPage->send(Messages::WebPageProxy::DidCommitLoadForFrame(m_frame->frameID(), response.mimeType(), m_frame->coreFrame()->loader().loadType(), response.certificateInfo(), InjectedBundleUserMessageEncoder(userData.get())));
+    webPage->send(Messages::WebPageProxy::DidCommitLoadForFrame(m_frame->frameID(), response.mimeType(), m_frame->coreFrame()->loader().loadType(), PlatformCertificateInfo(response), InjectedBundleUserMessageEncoder(userData.get())));
 
     webPage->didCommitLoad(m_frame);
 }