Title: [238426] trunk/Source/WebCore
- Revision
- 238426
- Author
- [email protected]
- Date
- 2018-11-21 10:58:13 -0800 (Wed, 21 Nov 2018)
Log Message
[SOUP] Follow-up robustness improvements to the certificate decoder
https://bugs.webkit.org/show_bug.cgi?id=191892
Reviewed by Michael Catanzaro.
If at any point the certificate fails to be constructed from
the DER data, bail out. Likewise, if the certificate returned
is NULL, return false from the decoder to notify the failure
to decode it.
* platform/network/soup/CertificateInfo.h:
(WTF::Persistence::certificateFromCertificatesDataList):
(WTF::Persistence::Coder<WebCore::CertificateInfo>::decode):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (238425 => 238426)
--- trunk/Source/WebCore/ChangeLog 2018-11-21 18:38:11 UTC (rev 238425)
+++ trunk/Source/WebCore/ChangeLog 2018-11-21 18:58:13 UTC (rev 238426)
@@ -1,3 +1,19 @@
+2018-11-21 Claudio Saavedra <[email protected]>
+
+ [SOUP] Follow-up robustness improvements to the certificate decoder
+ https://bugs.webkit.org/show_bug.cgi?id=191892
+
+ Reviewed by Michael Catanzaro.
+
+ If at any point the certificate fails to be constructed from
+ the DER data, bail out. Likewise, if the certificate returned
+ is NULL, return false from the decoder to notify the failure
+ to decode it.
+
+ * platform/network/soup/CertificateInfo.h:
+ (WTF::Persistence::certificateFromCertificatesDataList):
+ (WTF::Persistence::Coder<WebCore::CertificateInfo>::decode):
+
2018-11-21 Zalan Bujtas <[email protected]>
[LFC][IFC] Border should be considered as non-breakable space
Modified: trunk/Source/WebCore/platform/network/soup/CertificateInfo.h (238425 => 238426)
--- trunk/Source/WebCore/platform/network/soup/CertificateInfo.h 2018-11-21 18:38:11 UTC (rev 238425)
+++ trunk/Source/WebCore/platform/network/soup/CertificateInfo.h 2018-11-21 18:58:13 UTC (rev 238426)
@@ -119,6 +119,8 @@
for (auto& certificateData : certificatesDataList) {
certificate = adoptGRef(G_TLS_CERTIFICATE(g_initable_new(
certificateType, nullptr, nullptr, "certificate", certificateData.get(), "issuer", certificate.get(), nullptr)));
+ if (!certificate)
+ break;
}
return certificate;
@@ -145,7 +147,10 @@
if (certificatesDataList.isEmpty())
return true;
- certificateInfo.setCertificate(certificateFromCertificatesDataList(certificatesDataList).get());
+ auto certificate = certificateFromCertificatesDataList(certificatesDataList);
+ if (!certificate)
+ return false;
+ certificateInfo.setCertificate(certificate.get());
uint32_t tlsErrors;
if (!decoder.decode(tlsErrors))
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes