RESOLVED FIXED 204159
Use SecTrustEvaluateWithError instead of SecTrustEvaluate where available
https://bugs.webkit.org/show_bug.cgi?id=204159
Summary Use SecTrustEvaluateWithError instead of SecTrustEvaluate where available
Alex Christensen
Reported 2019-11-13 08:33:32 PST
Use SecTrustEvaluateWithError instead of SecTrustEvaluate where available
Attachments
Patch (4.89 KB, patch)
2019-11-13 08:34 PST, Alex Christensen
no flags
Patch (4.90 KB, patch)
2019-11-14 20:54 PST, Alex Christensen
no flags
Alex Christensen
Comment 1 2019-11-13 08:34:24 PST
Alex Christensen
Comment 2 2019-11-13 08:34:27 PST
Darin Adler
Comment 3 2019-11-13 09:13:32 PST
Comment on attachment 383459 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=383459&action=review > Source/WebCore/platform/network/cocoa/ResourceResponseCocoa.mm:101 > + bool success = SecTrustEvaluateWithError(trust, &error); This will leak the CFErrorRef. Note that the error argument is marked CF_RETURNS_RETAINED that indicates it’s the caller’s responsibility to release. > Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:938 > + bool success = SecTrustEvaluateWithError(trust, &error); Ditto. > Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm:947 > + infoDictionary = [(__bridge NSDictionary *)SecTrustCopyInfo(trust) autorelease]; Not important, but a side note. This line is just re-indented and this is not new code, but I would write this instead: infoDictionary = CFBridgingRelease(SecTrustCopyInfo(trust));
Alex Christensen
Comment 4 2019-11-14 20:54:55 PST
Alex Christensen
Comment 5 2019-11-14 21:09:44 PST
Turns out having an error and returning false are the same, and we do nothing with the error, so I'm just passing nullptr to not receive the error.
WebKit Commit Bot
Comment 6 2019-11-18 14:41:57 PST
Comment on attachment 383599 [details] Patch Clearing flags on attachment: 383599 Committed r252595: <https://trac.webkit.org/changeset/252595>
WebKit Commit Bot
Comment 7 2019-11-18 14:41:59 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.