brave / brave-ios

Brave iOS Browser
https://brave.com
Mozilla Public License 2.0
1.7k stars 440 forks source link

Fix #8703: Match Desktop Cert Display #8704

Closed Brandon-T closed 9 months ago

Brandon-T commented 9 months ago

Summary of Changes

TLDR: Sometimes webkit gives a trust in the handshake, but none in didFailProvisionalNavigation. Other times it gives a trust in didFailProvisionalNavigation, but none in the didReceiveChallenge handshake. Both times, there is no trust at the END of the function call. Once the functions are called and returned from, webView.serverTrust becomes nil. This is yet another edge case where the URL Bar can again show incorrectly. I'm not sure the reason why WebKit does this, but Chromium states that events come out of order and handles these edge cases the same way.

This pull request fixes #8703

Submitter Checklist:

Reviewer Checklist: