WebKit Bugzilla
Attachment 343741 Details for
Bug 187102
: [Curl] Embed certificate information into ResourceResponse.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix style
187102.diff (text/plain), 21.55 KB, created by
Basuke Suzuki
on 2018-06-27 12:40:57 PDT
(
hide
)
Description:
Fix style
Filename:
MIME Type:
Creator:
Basuke Suzuki
Created:
2018-06-27 12:40:57 PDT
Size:
21.55 KB
patch
obsolete
>diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 2be8419cace..49d79d284d5 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,58 @@ >+2018-06-27 Basuke Suzuki <Basuke.Suzuki@sony.com> >+ >+ [Curl] Embed certificate information into ResourceResponse. >+ https://bugs.webkit.org/show_bug.cgi?id=187102 >+ >+ Collect certificate information from the communication and put them into >+ ResourceResponse for the sake of advanced security checking and information >+ providing to the user. >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ No new tests but tested internally. >+ >+ * platform/Curl.cmake: >+ * platform/network/curl/CertificateInfo.cpp: Copied from Source/WebCore/platform/network/curl/CertificateInfo.h. >+ (WebCore::CertificateInfo::CertificateInfo): >+ (WebCore::CertificateInfo::isolatedCopy const): >+ * platform/network/curl/CertificateInfo.h: >+ (WebCore::CertificateInfo::verificationError const): >+ (WebCore::CertificateInfo::certificateChain const): >+ (WebCore::CertificateInfo::compare): >+ (WebCore::operator==): >+ (WebCore::CertificateInfo::CertificateInfo): Deleted. >+ * platform/network/curl/CurlRequest.cpp: >+ (WebCore::CurlRequest::didReceiveHeader): >+ (WebCore::CurlRequest::didCompleteTransfer): >+ * platform/network/curl/CurlRequest.h: >+ (WebCore::CurlRequest::getCertificateInfo const): >+ (WebCore::CurlRequest::getNetworkLoadMetrics const): >+ (WebCore::CurlRequest::getNetworkLoadMetrics): Deleted. >+ * platform/network/curl/CurlResourceHandleDelegate.cpp: >+ (WebCore::CurlResourceHandleDelegate::curlDidReceiveResponse): >+ * platform/network/curl/CurlSSLVerifier.cpp: >+ (WebCore::CurlSSLVerifier::CurlSSLVerifier): >+ (WebCore::CurlSSLVerifier::verifyCallback): >+ (WebCore::StackOfX509::StackOfX509): For RAII. Used in getPemDataFromCtx callback. >+ (WebCore::StackOfX509::~StackOfX509): Ditto. >+ (WebCore::StackOfX509::count): Ditto. >+ (WebCore::StackOfX509::get): Ditto. >+ (WebCore::BIOHolder::BIOHolder): Ditto. >+ (WebCore::BIOHolder::~BIOHolder): Ditto. >+ (WebCore::BIOHolder::write): Ditto. >+ (WebCore::BIOHolder::getCertificateData): Ditto. >+ (WebCore::CurlSSLVerifier::getPemDataFromCtx): >+ (WebCore::CurlSSLVerifier::certVerifyCallback): Deleted. >+ * platform/network/curl/CurlSSLVerifier.h: >+ (WebCore::CurlSSLVerifier::verificationError): >+ (WebCore::CurlSSLVerifier::certificateChain const): >+ * platform/network/curl/ResourceError.h: >+ * platform/network/curl/ResourceErrorCurl.cpp: >+ (WebCore::ResourceError::isSSLConnectError const): >+ (WebCore::ResourceError::isSSLCertVerificationError const): >+ (WebCore::ResourceError::hasSSLConnectError const): Deleted. >+ * platform/network/curl/ResourceResponse.h: >+ > 2018-06-27 Zalan Bujtas <zalan@apple.com> > > [LFC] Move formatting context root layout logic to a dedicated function. >diff --git a/Source/WebCore/platform/Curl.cmake b/Source/WebCore/platform/Curl.cmake >index 1c277965e36..10511306964 100644 >--- a/Source/WebCore/platform/Curl.cmake >+++ b/Source/WebCore/platform/Curl.cmake >@@ -4,6 +4,7 @@ list(APPEND WebCore_INCLUDE_DIRECTORIES > > list(APPEND WebCore_SOURCES > platform/network/curl/AuthenticationChallengeCurl.cpp >+ platform/network/curl/CertificateInfo.cpp > platform/network/curl/CookieJarCurl.cpp > platform/network/curl/CookieJarCurlDatabase.cpp > platform/network/curl/CookieJarDB.cpp >diff --git a/Source/WebCore/platform/network/curl/CertificateInfo.cpp b/Source/WebCore/platform/network/curl/CertificateInfo.cpp >new file mode 100644 >index 00000000000..a3f8a085711 >--- /dev/null >+++ b/Source/WebCore/platform/network/curl/CertificateInfo.cpp >@@ -0,0 +1,53 @@ >+/* >+ * Copyright (C) 2018 Sony Interactive Entertainment 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" >+ >+#if USE(CURL) >+ >+namespace WebCore { >+ >+CertificateInfo::CertificateInfo(int verificationError, const Vector<String>& certificateChain) >+ : m_verificationError(verificationError) >+ , m_certificateChain(certificateChain) >+{ >+} >+ >+CertificateInfo CertificateInfo::isolatedCopy() const >+{ >+ CertificateInfo copy; >+ >+ copy.m_verificationError = m_verificationError; >+ >+ for (auto certificate : m_certificateChain) >+ copy.m_certificateChain.append(certificate.isolatedCopy()); >+ >+ return copy; >+} >+ >+} >+ >+#endif >diff --git a/Source/WebCore/platform/network/curl/CertificateInfo.h b/Source/WebCore/platform/network/curl/CertificateInfo.h >index 798bf1e2c36..f8d49b74d54 100644 >--- a/Source/WebCore/platform/network/curl/CertificateInfo.h >+++ b/Source/WebCore/platform/network/curl/CertificateInfo.h >@@ -26,14 +26,36 @@ > #pragma once > > #include "NotImplemented.h" >+#include <wtf/Vector.h> >+#include <wtf/text/WTFString.h> > > namespace WebCore { > > class CertificateInfo { > public: >- CertificateInfo() { } >+ CertificateInfo() = default; >+ WEBCORE_EXPORT CertificateInfo(int verificationError, const Vector<String>& certificateChain); >+ >+ WEBCORE_EXPORT CertificateInfo isolatedCopy() const; >+ >+ int verificationError() const { return m_verificationError; } >+ const Vector<String>& certificateChain() const { return m_certificateChain; } > > bool containsNonRootSHA1SignedCertificate() const { notImplemented(); return false; } >+ >+ static bool compare(const CertificateInfo& a, const CertificateInfo& b) >+ { >+ if (a.verificationError() != b.verificationError()) >+ return false; >+ >+ return (a.certificateChain() == b.certificateChain()); >+ } >+ >+private: >+ int m_verificationError { 0 }; >+ Vector<String> m_certificateChain; > }; > >+inline bool operator==(const CertificateInfo& a, const CertificateInfo& b) { return CertificateInfo::compare(a, b); } >+ > } // namespace WebCore >diff --git a/Source/WebCore/platform/network/curl/CurlRequest.cpp b/Source/WebCore/platform/network/curl/CurlRequest.cpp >index b6b5dfd270d..4f7521d79aa 100644 >--- a/Source/WebCore/platform/network/curl/CurlRequest.cpp >+++ b/Source/WebCore/platform/network/curl/CurlRequest.cpp >@@ -352,6 +352,9 @@ size_t CurlRequest::didReceiveHeader(String&& header) > if (m_response.availableProxyAuth) > CurlContext::singleton().setProxyAuthMethod(m_response.availableProxyAuth); > >+ if (m_sslVerifier) >+ m_certificateInfo = CertificateInfo(m_sslVerifier->verificationError(), m_sslVerifier->certificateChain()); >+ > if (m_enableMultipart) > m_multipartHandle = CurlMultipartHandle::createIfNeeded(*this, m_response); > >@@ -460,8 +463,10 @@ void CurlRequest::didCompleteTransfer(CURLcode result) > } else { > auto type = (result == CURLE_OPERATION_TIMEDOUT && m_request.timeoutInterval() > 0.0) ? ResourceError::Type::Timeout : ResourceError::Type::General; > auto resourceError = ResourceError::httpError(result, m_request.url(), type); >- if (m_sslVerifier && m_sslVerifier->sslErrors()) >+ if (m_sslVerifier) { > resourceError.setSslErrors(m_sslVerifier->sslErrors()); >+ m_certificateInfo = CertificateInfo(m_sslVerifier->verificationError(), m_sslVerifier->certificateChain()); >+ } > > finalizeTransfer(); > callClient([error = resourceError.isolatedCopy()](CurlRequest& request, CurlRequestClient& client) { >diff --git a/Source/WebCore/platform/network/curl/CurlRequest.h b/Source/WebCore/platform/network/curl/CurlRequest.h >index e9e1021aea6..9cd74e211f9 100644 >--- a/Source/WebCore/platform/network/curl/CurlRequest.h >+++ b/Source/WebCore/platform/network/curl/CurlRequest.h >@@ -25,6 +25,7 @@ > > #pragma once > >+#include "CertificateInfo.h" > #include "CurlFormDataStream.h" > #include "CurlMultipartHandle.h" > #include "CurlMultipartHandleClient.h" >@@ -87,7 +88,8 @@ public: > void enableDownloadToFile(); > const String& getDownloadedFilePath(); > >- NetworkLoadMetrics getNetworkLoadMetrics() { return m_networkLoadMetrics.isolatedCopy(); } >+ CertificateInfo getCertificateInfo() const { return m_certificateInfo.isolatedCopy(); } >+ NetworkLoadMetrics getNetworkLoadMetrics() const { return m_networkLoadMetrics.isolatedCopy(); } > > private: > enum class Action { >@@ -193,6 +195,7 @@ private: > String m_downloadFilePath; > FileSystem::PlatformFileHandle m_downloadFileHandle { FileSystem::invalidPlatformFileHandle }; > >+ CertificateInfo m_certificateInfo; > NetworkLoadMetrics m_networkLoadMetrics; > }; > >diff --git a/Source/WebCore/platform/network/curl/CurlResourceHandleDelegate.cpp b/Source/WebCore/platform/network/curl/CurlResourceHandleDelegate.cpp >index 416b96872da..8f6d66a22d0 100644 >--- a/Source/WebCore/platform/network/curl/CurlResourceHandleDelegate.cpp >+++ b/Source/WebCore/platform/network/curl/CurlResourceHandleDelegate.cpp >@@ -108,6 +108,7 @@ void CurlResourceHandleDelegate::curlDidReceiveResponse(CurlRequest& request, co > return; > > m_response = ResourceResponse(receivedResponse); >+ m_response.setCertificateInfo(request.getCertificateInfo()); > m_response.setDeprecatedNetworkLoadMetrics(request.getNetworkLoadMetrics()); > > handleCookieHeaders(receivedResponse); >diff --git a/Source/WebCore/platform/network/curl/CurlSSLVerifier.cpp b/Source/WebCore/platform/network/curl/CurlSSLVerifier.cpp >index 3209c8b0dac..ef486bf0181 100644 >--- a/Source/WebCore/platform/network/curl/CurlSSLVerifier.cpp >+++ b/Source/WebCore/platform/network/curl/CurlSSLVerifier.cpp >@@ -31,6 +31,7 @@ > #include "CurlContext.h" > #include "CurlSSLHandle.h" > #include <openssl/ssl.h> >+#include <wtf/ListHashSet.h> > > namespace WebCore { > >@@ -39,10 +40,10 @@ CurlSSLVerifier::CurlSSLVerifier(CurlHandle* curlHandle, const String& hostName, > , m_hostName(hostName) > { > auto* ctx = static_cast<SSL_CTX*>(sslCtx); >- auto& sslHandle = CurlContext::singleton().sslHandle(); >+ const auto& sslHandle = CurlContext::singleton().sslHandle(); > > SSL_CTX_set_app_data(ctx, this); >- SSL_CTX_set_verify(ctx, SSL_CTX_get_verify_mode(ctx), certVerifyCallback); >+ SSL_CTX_set_verify(ctx, SSL_CTX_get_verify_mode(ctx), verifyCallback); > > #if defined(LIBRESSL_VERSION_NUMBER) > if (auto data = WTF::get_if<Vector<char>>(sslHandle.getCACertInfo())) >@@ -50,39 +51,41 @@ CurlSSLVerifier::CurlSSLVerifier(CurlHandle* curlHandle, const String& hostName, > #endif > > #if (!defined(LIBRESSL_VERSION_NUMBER)) >- auto signatureAlgorithmsList = sslHandle.getSignatureAlgorithmsList(); >+ const auto& signatureAlgorithmsList = sslHandle.getSignatureAlgorithmsList(); > if (!signatureAlgorithmsList.isEmpty()) > SSL_CTX_set1_sigalgs_list(ctx, signatureAlgorithmsList->utf8().data()); > #endif > >- auto curvesList = sslHandle.getCurvesList(); >+ const auto& curvesList = sslHandle.getCurvesList(); > if (!curvesList.isEmpty()) > SSL_CTX_set1_curves_list(ctx, curvesList.utf8().data()); > } > >-int CurlSSLVerifier::certVerifyCallback(int ok, X509_STORE_CTX* storeCtx) >+int CurlSSLVerifier::verifyCallback(int ok, X509_STORE_CTX* ctx) > { >+ auto ssl = static_cast<SSL*>(X509_STORE_CTX_get_ex_data(ctx, SSL_get_ex_data_X509_STORE_CTX_idx())); >+ auto sslCtx = SSL_get_SSL_CTX(ssl); >+ auto verifier = static_cast<CurlSSLVerifier*>(SSL_CTX_get_app_data(sslCtx)); >+ > // whether the verification of the certificate in question was passed (preverify_ok=1) or not (preverify_ok=0) >- int certErrCd = X509_STORE_CTX_get_error(storeCtx); >- if (!certErrCd) >- return 1; >+ verifier->m_verificationError = X509_STORE_CTX_get_error(ctx); >+ >+ if (auto certificates = getPemDataFromCtx(ctx)) >+ verifier->m_certificateChain = *certificates; > >- SSL* ssl = static_cast<SSL*>(X509_STORE_CTX_get_ex_data(storeCtx, SSL_get_ex_data_X509_STORE_CTX_idx())); >- SSL_CTX* sslCtx = SSL_get_SSL_CTX(ssl); >- CurlSSLVerifier* verifier = static_cast<CurlSSLVerifier*>(SSL_CTX_get_app_data(sslCtx)); >- if (!verifier) >- return 0; >+ if (!verifier->m_verificationError) >+ return 1; > >- verifier->m_sslErrors = static_cast<int>(verifier->convertToSSLCertificateFlags(certErrCd)); >+ verifier->m_sslErrors = static_cast<int>(verifier->convertToSSLCertificateFlags(verifier->m_verificationError)); > > #if PLATFORM(WIN) > ok = CurlContext::singleton().sslHandle().isAllowedHTTPSCertificateHost(verifier->m_hostName); > #else >- ListHashSet<String> certificates; >- if (!getPemDataFromCtx(storeCtx, certificates)) >- return 0; >+ ListHashSet<String> certList; >+ for (auto cert : verifier->m_certificateChain) >+ certList.add(cert); > >- ok = CurlContext::singleton().sslHandle().canIgnoredHTTPSCertificate(verifier->m_hostName, certificates); >+ ok = CurlContext::singleton().sslHandle().canIgnoredHTTPSCertificate(verifier->m_hostName, certList); > #endif > > if (ok) { >@@ -95,41 +98,71 @@ int CurlSSLVerifier::certVerifyCallback(int ok, X509_STORE_CTX* storeCtx) > return ok; > } > >-#if !PLATFORM(WIN) >+struct StackOfX509 { >+ StackOfX509(X509_STORE_CTX* ctx) >+ : m_certs { X509_STORE_CTX_get1_chain(ctx) } >+ { >+ } > >-bool CurlSSLVerifier::getPemDataFromCtx(X509_STORE_CTX* ctx, ListHashSet<String>& certificates) >-{ >- bool ok = true; >- STACK_OF(X509)* certs = X509_STORE_CTX_get1_chain(ctx); >- for (int i = 0; i < sk_X509_num(certs); i++) { >- X509* uCert = sk_X509_value(certs, i); >- BIO* bio = BIO_new(BIO_s_mem()); >- int res = PEM_write_bio_X509(bio, uCert); >- if (!res) { >- ok = false; >- BIO_free(bio); >- break; >- } >+ ~StackOfX509() >+ { >+ if (m_certs) >+ sk_X509_pop_free(m_certs, X509_free); >+ } >+ >+ unsigned count() { return sk_X509_num(m_certs); } >+ X509* get(unsigned i) { return sk_X509_value(m_certs, i); } >+ >+private: >+ STACK_OF(X509)* m_certs { }; >+}; >+ >+struct BIOHolder { >+ BIOHolder() >+ : m_bio { BIO_new(BIO_s_mem()) } >+ { >+ } >+ >+ ~BIOHolder() >+ { >+ if (m_bio) >+ BIO_free(m_bio); >+ } > >+ bool write(X509* cert) { return !!PEM_write_bio_X509(m_bio, cert); } >+ String getCertificateData() >+ { > unsigned char* certificateData; >- long length = BIO_get_mem_data(bio, &certificateData); >- if (length < 0) { >- ok = false; >- BIO_free(bio); >- break; >- } >- >- certificateData[length] = '\0'; >- String certificate = certificateData; >- certificates.add(certificate); >- BIO_free(bio); >+ long length = BIO_get_mem_data(m_bio, &certificateData); >+ if (length < 0) >+ return String(); >+ >+ return String(certificateData, length); > } > >- sk_X509_pop_free(certs, X509_free); >- return ok; >-} >+private: >+ BIO* m_bio { }; >+}; > >-#endif >+std::optional<Vector<String>> CurlSSLVerifier::getPemDataFromCtx(X509_STORE_CTX* ctx) >+{ >+ std::optional<Vector<String>> result = Vector<String>(); >+ StackOfX509 certs { ctx }; >+ for (int i = 0; i < certs.count(); i++) { >+ BIOHolder bio; >+ >+ if (!bio.write(certs.get(i))) >+ return std::nullopt; >+ >+ auto certData = bio.getCertificateData(); >+ if (certData.isEmpty()) >+ return std::nullopt; >+ >+ result->append(WTFMove(certData)); >+ } >+ >+ return result; >+} > > CurlSSLVerifier::SSLCertificateFlags CurlSSLVerifier::convertToSSLCertificateFlags(const unsigned& sslError) > { >diff --git a/Source/WebCore/platform/network/curl/CurlSSLVerifier.h b/Source/WebCore/platform/network/curl/CurlSSLVerifier.h >index 6ec536c9862..7870eebb199 100644 >--- a/Source/WebCore/platform/network/curl/CurlSSLVerifier.h >+++ b/Source/WebCore/platform/network/curl/CurlSSLVerifier.h >@@ -26,7 +26,6 @@ > > #pragma once > >-#include <wtf/ListHashSet.h> > #include <wtf/Noncopyable.h> > #include <wtf/text/WTFString.h> > >@@ -54,18 +53,21 @@ public: > > int sslErrors() { return m_sslErrors; } > >-private: >- static int certVerifyCallback(int, X509_STORE_CTX*); >+ int verificationError() { return m_verificationError; } >+ const Vector<String>& certificateChain() const { return m_certificateChain; } > >-#if !PLATFORM(WIN) >- static bool getPemDataFromCtx(X509_STORE_CTX*, ListHashSet<String>&); >-#endif >+private: >+ static int verifyCallback(int, X509_STORE_CTX*); >+ static std::optional<Vector<String>> getPemDataFromCtx(X509_STORE_CTX*); > > SSLCertificateFlags convertToSSLCertificateFlags(const unsigned&); > > CurlHandle* m_curlHandle { }; > String m_hostName; >+ > int m_sslErrors { 0 }; >+ int m_verificationError { 0 }; // X509_V_OK >+ Vector<String> m_certificateChain; > }; > > } // namespace WebCore >diff --git a/Source/WebCore/platform/network/curl/ResourceError.h b/Source/WebCore/platform/network/curl/ResourceError.h >index 3dbb0d23798..f30ef3b0a4b 100644 >--- a/Source/WebCore/platform/network/curl/ResourceError.h >+++ b/Source/WebCore/platform/network/curl/ResourceError.h >@@ -49,7 +49,9 @@ public: > > unsigned sslErrors() const { return m_sslErrors; } > void setSslErrors(unsigned sslErrors) { m_sslErrors = sslErrors; } >- bool hasSSLConnectError() const; >+ >+ bool isSSLConnectError() const; >+ WEBCORE_EXPORT bool isSSLCertVerificationError() const; > > static bool platformCompare(const ResourceError& a, const ResourceError& b); > >diff --git a/Source/WebCore/platform/network/curl/ResourceErrorCurl.cpp b/Source/WebCore/platform/network/curl/ResourceErrorCurl.cpp >index ea57e95d546..6416fa88cf3 100644 >--- a/Source/WebCore/platform/network/curl/ResourceErrorCurl.cpp >+++ b/Source/WebCore/platform/network/curl/ResourceErrorCurl.cpp >@@ -46,11 +46,16 @@ ResourceError ResourceError::sslError(int errorCode, unsigned sslErrors, const U > return resourceError; > } > >-bool ResourceError::hasSSLConnectError() const >+bool ResourceError::isSSLConnectError() const > { > return errorCode() == CURLE_SSL_CONNECT_ERROR; > } > >+bool ResourceError::isSSLCertVerificationError() const >+{ >+ return errorCode() == CURLE_SSL_CACERT || errorCode() == CURLE_PEER_FAILED_VERIFICATION; >+} >+ > void ResourceError::doPlatformIsolatedCopy(const ResourceError& other) > { > m_sslErrors = other.m_sslErrors; >diff --git a/Source/WebCore/platform/network/curl/ResourceResponse.h b/Source/WebCore/platform/network/curl/ResourceResponse.h >index 4fa04e45210..537b350b020 100644 >--- a/Source/WebCore/platform/network/curl/ResourceResponse.h >+++ b/Source/WebCore/platform/network/curl/ResourceResponse.h >@@ -1,6 +1,6 @@ > /* > * Copyright (C) 2006 Apple Inc. All rights reserved. >- * Copyright (C) 2017 Sony Interactive Entertainment Inc. >+ * Copyright (C) 2018 Sony Interactive Entertainment Inc. > * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions >@@ -50,7 +50,8 @@ public: > > void appendHTTPHeaderField(const String&); > >- void setDeprecatedNetworkLoadMetrics(const NetworkLoadMetrics& networkLoadMetrics) { m_networkLoadMetrics = networkLoadMetrics; } >+ void setCertificateInfo(const CertificateInfo&); >+ void setDeprecatedNetworkLoadMetrics(const NetworkLoadMetrics&); > > bool shouldRedirect(); > bool isMovedPermanently() const; >@@ -68,6 +69,7 @@ private: > > static bool isAppendableHeader(const String &key); > String platformSuggestedFilename() const; >+ CertificateInfo platformCertificateInfo() const; > > void setStatusLine(const String&); > }; >diff --git a/Source/WebCore/platform/network/curl/ResourceResponseCurl.cpp b/Source/WebCore/platform/network/curl/ResourceResponseCurl.cpp >index ac45ba2b7a9..69d51ab1e90 100644 >--- a/Source/WebCore/platform/network/curl/ResourceResponseCurl.cpp >+++ b/Source/WebCore/platform/network/curl/ResourceResponseCurl.cpp >@@ -142,11 +142,26 @@ void ResourceResponse::setStatusLine(const String& header) > } > } > >+void ResourceResponse::setCertificateInfo(const CertificateInfo& certificateInfo) >+{ >+ m_certificateInfo = certificateInfo; >+} >+ >+void ResourceResponse::setDeprecatedNetworkLoadMetrics(const NetworkLoadMetrics& networkLoadMetrics) >+{ >+ m_networkLoadMetrics = networkLoadMetrics; >+} >+ > String ResourceResponse::platformSuggestedFilename() const > { > return filenameFromHTTPContentDisposition(httpHeaderField(HTTPHeaderName::ContentDisposition)); > } > >+CertificateInfo ResourceResponse::platformCertificateInfo() const >+{ >+ return m_certificateInfo ? *m_certificateInfo : CertificateInfo(); >+} >+ > bool ResourceResponse::shouldRedirect() > { > auto statusCode = httpStatusCode();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 187102
:
343736
|
343741
|
344123
|
344125
|
344164
|
344165
|
344166
|
344171
|
344191
|
344205
|
344213