Title: [252595] trunk/Source
Revision
252595
Author
commit-qu...@webkit.org
Date
2019-11-18 14:41:50 -0800 (Mon, 18 Nov 2019)

Log Message

Use SecTrustEvaluateWithError instead of SecTrustEvaluate where available
https://bugs.webkit.org/show_bug.cgi?id=204159
Source/WebCore:

<rdar://problem/45894288>

Patch by Alex Christensen <achristen...@webkit.org> on 2019-11-18
Reviewed by Darin Adler.

* platform/network/cocoa/ResourceResponseCocoa.mm:
(WebCore::ResourceResponse::platformCertificateInfo const):

Source/WebKit:

Patch by Alex Christensen <achristen...@webkit.org> on 2019-11-18
Reviewed by Darin Adler.

* UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
(-[WKFullScreenWindowController _EVOrganizationName]):

Source/WTF:

<rdar://problem/45894288>

Patch by Alex Christensen <achristen...@webkit.org> on 2019-11-18
Reviewed by Darin Adler.

* wtf/Platform.h:

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (252594 => 252595)


--- trunk/Source/WTF/ChangeLog	2019-11-18 22:34:57 UTC (rev 252594)
+++ trunk/Source/WTF/ChangeLog	2019-11-18 22:41:50 UTC (rev 252595)
@@ -1,3 +1,13 @@
+2019-11-18  Alex Christensen  <achristen...@webkit.org>
+
+        Use SecTrustEvaluateWithError instead of SecTrustEvaluate where available
+        https://bugs.webkit.org/show_bug.cgi?id=204159
+        <rdar://problem/45894288>
+
+        Reviewed by Darin Adler.
+
+        * wtf/Platform.h:
+
 2019-11-15  Yusuke Suzuki  <ysuz...@apple.com>
 
         [JSC] Remove index-masking on ScopedArguments and put it in IsoSubspace

Modified: trunk/Source/WTF/wtf/Platform.h (252594 => 252595)


--- trunk/Source/WTF/wtf/Platform.h	2019-11-18 22:34:57 UTC (rev 252594)
+++ trunk/Source/WTF/wtf/Platform.h	2019-11-18 22:41:50 UTC (rev 252595)
@@ -1621,6 +1621,10 @@
 #define HAVE_TLS_PROTOCOL_VERSION_T 1
 #endif
 
+#if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) || PLATFORM(WATCHOS) || PLATFORM(APPLETV) || PLATFORM(MACCATALYST)
+#define HAVE_SEC_TRUST_EVALUATE_WITH_ERROR 1
+#endif
+
 #if PLATFORM(IOS) || PLATFORM(MACCATALYST)
 #define USE_UICONTEXTMENU 1
 #endif

Modified: trunk/Source/WebCore/ChangeLog (252594 => 252595)


--- trunk/Source/WebCore/ChangeLog	2019-11-18 22:34:57 UTC (rev 252594)
+++ trunk/Source/WebCore/ChangeLog	2019-11-18 22:41:50 UTC (rev 252595)
@@ -1,3 +1,14 @@
+2019-11-18  Alex Christensen  <achristen...@webkit.org>
+
+        Use SecTrustEvaluateWithError instead of SecTrustEvaluate where available
+        https://bugs.webkit.org/show_bug.cgi?id=204159
+        <rdar://problem/45894288>
+
+        Reviewed by Darin Adler.
+
+        * platform/network/cocoa/ResourceResponseCocoa.mm:
+        (WebCore::ResourceResponse::platformCertificateInfo const):
+
 2019-11-18  Said Abou-Hallawa  <sabouhall...@apple.com>
 
         Fix getTotalLength() and getPointAtLength() for optimized rect and ellipse renderers

Modified: trunk/Source/WebCore/platform/network/cocoa/ResourceResponseCocoa.mm (252594 => 252595)


--- trunk/Source/WebCore/platform/network/cocoa/ResourceResponseCocoa.mm	2019-11-18 22:34:57 UTC (rev 252594)
+++ trunk/Source/WebCore/platform/network/cocoa/ResourceResponseCocoa.mm	2019-11-18 22:41:50 UTC (rev 252595)
@@ -96,12 +96,14 @@
         return { };
 
     if (trustResultType == kSecTrustResultInvalid) {
-        // FIXME: This is deprecated <rdar://problem/45894288>.
-        ALLOW_DEPRECATED_DECLARATIONS_BEGIN
+#if HAVE(SEC_TRUST_EVALUATE_WITH_ERROR)
+        if (!SecTrustEvaluateWithError(trust, nullptr))
+            return { };
+#else
         result = SecTrustEvaluate(trust, &trustResultType);
-        ALLOW_DEPRECATED_DECLARATIONS_END
         if (result != errSecSuccess)
             return { };
+#endif
     }
 
 #if HAVE(SEC_TRUST_SERIALIZATION)

Modified: trunk/Source/WebKit/ChangeLog (252594 => 252595)


--- trunk/Source/WebKit/ChangeLog	2019-11-18 22:34:57 UTC (rev 252594)
+++ trunk/Source/WebKit/ChangeLog	2019-11-18 22:41:50 UTC (rev 252595)
@@ -1,3 +1,13 @@
+2019-11-18  Alex Christensen  <achristen...@webkit.org>
+
+        Use SecTrustEvaluateWithError instead of SecTrustEvaluate where available
+        https://bugs.webkit.org/show_bug.cgi?id=204159
+
+        Reviewed by Darin Adler.
+
+        * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
+        (-[WKFullScreenWindowController _EVOrganizationName]):
+
 2019-11-18  Darin Adler  <da...@apple.com>
 
         WKWebView.mediaType is nullable, not null_resettable

Modified: trunk/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm (252594 => 252595)


--- trunk/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm	2019-11-18 22:34:57 UTC (rev 252594)
+++ trunk/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm	2019-11-18 22:41:50 UTC (rev 252595)
@@ -929,19 +929,20 @@
     if (!trust)
         return nil;
 
-    NSDictionary *infoDictionary = [(__bridge NSDictionary *)SecTrustCopyInfo(trust) autorelease];
+    NSDictionary *infoDictionary = CFBridgingRelease(SecTrustCopyInfo(trust));
     // If SecTrustCopyInfo returned NULL then it's likely that the SecTrustRef has not been evaluated
     // and the only way to get the information we need is to call SecTrustEvaluate ourselves.
     if (!infoDictionary) {
+#if HAVE(SEC_TRUST_EVALUATE_WITH_ERROR)
+        if (!SecTrustEvaluateWithError(trust, nullptr))
+            return nil;
+#else
         SecTrustResultType result = kSecTrustResultProceed;
-
-        // FIXME: This is deprecated <rdar://problem/45894288>.
-        ALLOW_DEPRECATED_DECLARATIONS_BEGIN
         OSStatus err = SecTrustEvaluate(trust, &result);
-        ALLOW_DEPRECATED_DECLARATIONS_END
-
-        if (err == noErr)
-            infoDictionary = [(__bridge NSDictionary *)SecTrustCopyInfo(trust) autorelease];
+        if (err != noErr)
+            return nil;
+#endif
+        infoDictionary = CFBridgingRelease(SecTrustCopyInfo(trust));
         if (!infoDictionary)
             return nil;
     }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to