Changeset 252595 in webkit


Ignore:
Timestamp:
Nov 18, 2019 2:41:50 PM (4 years ago)
Author:
commit-queue@webkit.org
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 <achristensen@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 <achristensen@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 <achristensen@webkit.org> on 2019-11-18
Reviewed by Darin Adler.

  • wtf/Platform.h:
Location:
trunk/Source
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r252525 r252595  
     12019-11-18  Alex Christensen  <achristensen@webkit.org>
     2
     3        Use SecTrustEvaluateWithError instead of SecTrustEvaluate where available
     4        https://bugs.webkit.org/show_bug.cgi?id=204159
     5        <rdar://problem/45894288>
     6
     7        Reviewed by Darin Adler.
     8
     9        * wtf/Platform.h:
     10
    1112019-11-15  Yusuke Suzuki  <ysuzuki@apple.com>
    212
  • trunk/Source/WTF/wtf/Platform.h

    r251896 r252595  
    16221622#endif
    16231623
     1624#if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400) || PLATFORM(WATCHOS) || PLATFORM(APPLETV) || PLATFORM(MACCATALYST)
     1625#define HAVE_SEC_TRUST_EVALUATE_WITH_ERROR 1
     1626#endif
     1627
    16241628#if PLATFORM(IOS) || PLATFORM(MACCATALYST)
    16251629#define USE_UICONTEXTMENU 1
  • trunk/Source/WebCore/ChangeLog

    r252563 r252595  
     12019-11-18  Alex Christensen  <achristensen@webkit.org>
     2
     3        Use SecTrustEvaluateWithError instead of SecTrustEvaluate where available
     4        https://bugs.webkit.org/show_bug.cgi?id=204159
     5        <rdar://problem/45894288>
     6
     7        Reviewed by Darin Adler.
     8
     9        * platform/network/cocoa/ResourceResponseCocoa.mm:
     10        (WebCore::ResourceResponse::platformCertificateInfo const):
     11
    1122019-11-18  Said Abou-Hallawa  <sabouhallawa@apple.com>
    213
  • trunk/Source/WebCore/platform/network/cocoa/ResourceResponseCocoa.mm

    r246490 r252595  
    9797
    9898    if (trustResultType == kSecTrustResultInvalid) {
    99         // FIXME: This is deprecated <rdar://problem/45894288>.
    100         ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     99#if HAVE(SEC_TRUST_EVALUATE_WITH_ERROR)
     100        if (!SecTrustEvaluateWithError(trust, nullptr))
     101            return { };
     102#else
    101103        result = SecTrustEvaluate(trust, &trustResultType);
    102         ALLOW_DEPRECATED_DECLARATIONS_END
    103104        if (result != errSecSuccess)
    104105            return { };
     106#endif
    105107    }
    106108
  • trunk/Source/WebKit/ChangeLog

    r252550 r252595  
     12019-11-18  Alex Christensen  <achristensen@webkit.org>
     2
     3        Use SecTrustEvaluateWithError instead of SecTrustEvaluate where available
     4        https://bugs.webkit.org/show_bug.cgi?id=204159
     5
     6        Reviewed by Darin Adler.
     7
     8        * UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:
     9        (-[WKFullScreenWindowController _EVOrganizationName]):
     10
    1112019-11-18  Darin Adler  <darin@apple.com>
    212
  • trunk/Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm

    r249147 r252595  
    930930        return nil;
    931931
    932     NSDictionary *infoDictionary = [(__bridge NSDictionary *)SecTrustCopyInfo(trust) autorelease];
     932    NSDictionary *infoDictionary = CFBridgingRelease(SecTrustCopyInfo(trust));
    933933    // If SecTrustCopyInfo returned NULL then it's likely that the SecTrustRef has not been evaluated
    934934    // and the only way to get the information we need is to call SecTrustEvaluate ourselves.
    935935    if (!infoDictionary) {
     936#if HAVE(SEC_TRUST_EVALUATE_WITH_ERROR)
     937        if (!SecTrustEvaluateWithError(trust, nullptr))
     938            return nil;
     939#else
    936940        SecTrustResultType result = kSecTrustResultProceed;
    937 
    938         // FIXME: This is deprecated <rdar://problem/45894288>.
    939         ALLOW_DEPRECATED_DECLARATIONS_BEGIN
    940941        OSStatus err = SecTrustEvaluate(trust, &result);
    941         ALLOW_DEPRECATED_DECLARATIONS_END
    942 
    943         if (err == noErr)
    944             infoDictionary = [(__bridge NSDictionary *)SecTrustCopyInfo(trust) autorelease];
     942        if (err != noErr)
     943            return nil;
     944#endif
     945        infoDictionary = CFBridgingRelease(SecTrustCopyInfo(trust));
    945946        if (!infoDictionary)
    946947            return nil;
Note: See TracChangeset for help on using the changeset viewer.