[webkit-reviews] review granted: [Bug 193355] Adopt new SPI to evaluate server certificate trust : [Attachment 360497] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 29 14:21:45 PST 2019


Alex Christensen <achristensen at apple.com> has granted youenn fablet
<youennf at gmail.com>'s request for review:
Bug 193355: Adopt new SPI to evaluate server certificate trust
https://bugs.webkit.org/show_bug.cgi?id=193355

Attachment 360497: Patch

https://bugs.webkit.org/attachment.cgi?id=360497&action=review




--- Comment #13 from Alex Christensen <achristensen at apple.com> ---
Comment on attachment 360497
  --> https://bugs.webkit.org/attachment.cgi?id=360497
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=360497&action=review

> Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:532
> +    if (trustResult == noErr || networkDataTask->state() ==
NetworkDataTask::State::Canceling || networkDataTask->state() ==
NetworkDataTask::State::Completed) {

We need to null check networkDataTask here before using it.  I'm also not sure
we should check these two states.

> Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:537
> +    RetainPtr<SecTrustRef> secTrust = challenge.protectionSpace.serverTrust;

This could be declared inside the lambda capture:
secTrust = retainPtr(challenge.protectionSpace.serverTrust)

> Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:1044
> +

extra space


More information about the webkit-reviews mailing list