Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Issue 1357773002: WKWebView: Implemented recoverable SSL interstitials. (Closed)

Created:
5 years, 3 months ago by Eugene But (OOO till 7-30)
Modified:
5 years, 1 month ago
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@lock_coloring
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

WKWebView: Implemented recoverable SSL interstitials. Load decision is made inside didReceiveAuthenticationChallenge: and for recoverable errors cached user decision is read from CertPolicyCache. That method is called for good and bad certs as long as request is not served from caches. This method allows accepting bad certs. SSL Interstitial is presented inside didFailProvisionalNavigation: which is called when top level frame has bad ssl cert and default behavior was not overridden inside didReceiveAuthenticationChallenge. CertStatus is evaluated inside didReceiveAuthenticationChallenge and its status is cached so it can be reused inside didFailProvisionalNavigation. It is not possible to re-evaluate cert inside didFailProvisionalNavigation because that callback does not provide complete cert chain. BUG=462427 Committed: https://crrev.com/4e0758a248f23e4cc60465431a013a532ea96c89 Cr-Commit-Position: refs/heads/master@{#357018}

Patch Set 1 #

Patch Set 2 : Merged with parent CL #

Total comments: 8

Patch Set 3 : Resolved Stuart's review comments #

Total comments: 32

Patch Set 4 : Addressed review comments #

Patch Set 5 : Resolved review comments #

Patch Set 6 : Purge cert cache where necessary #

Patch Set 7 : Merged with origin/master #

Patch Set 8 : Merged with origin/master #

Total comments: 12

Patch Set 9 : Addressed review comments #

Patch Set 10 : Self review #

Total comments: 2

Patch Set 11 : Addressed Stuart's review comments #

Patch Set 12 : Merged with parent CL #

Patch Set 13 : Merged with parent branch #

Total comments: 6

Patch Set 14 : Addressed Joel's review comments #

Total comments: 32

Patch Set 15 : Addressed review comments #

Total comments: 36

Patch Set 16 : Resolved Ryan's review comments #

Total comments: 2

Patch Set 17 : Addressed unit tests review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+548 lines, -306 lines) Patch
M ios/web/ios_web.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -2 lines 0 comments Download
M ios/web/ios_web_unittests.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
A ios/web/net/cert_host_pair.h View 1 2 3 4 5 6 7 8 9 1 chunk +33 lines, -0 lines 0 comments Download
A ios/web/net/cert_host_pair.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +23 lines, -0 lines 0 comments Download
A ios/web/net/cert_host_pair_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +94 lines, -0 lines 0 comments Download
D ios/web/net/crw_cert_policy_cache.h View 1 chunk +0 lines, -45 lines 0 comments Download
D ios/web/net/crw_cert_policy_cache.mm View 1 chunk +0 lines, -57 lines 0 comments Download
D ios/web/net/crw_cert_policy_cache_unittest.mm View 1 chunk +0 lines, -104 lines 0 comments Download
M ios/web/net/crw_cert_verification_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +36 lines, -20 lines 0 comments Download
M ios/web/net/crw_cert_verification_controller.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 11 chunks +129 lines, -23 lines 0 comments Download
M ios/web/net/crw_cert_verification_controller_unittest.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +76 lines, -25 lines 0 comments Download
M ios/web/web_state/ui/crw_web_controller_unittest.mm View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M ios/web/web_state/ui/crw_wk_web_view_web_controller.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 12 chunks +149 lines, -26 lines 0 comments Download
M ios/web/web_state/wk_web_view_security_util.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M ios/web/web_state/wk_web_view_security_util.mm View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 38 (4 generated)
Eugene But (OOO till 7-30)
5 years, 3 months ago (2015-09-19 00:34:06 UTC) #2
Ryan Sleevi
On 2015/09/19 00:34:06, eugenebut wrote: Quick detail regarding "does not provide complete cert chain." Can ...
5 years, 3 months ago (2015-09-19 00:37:54 UTC) #3
stuartmorgan
https://codereview.chromium.org/1357773002/diff/20001/ios/web/net/cert_verification_cache.h File ios/web/net/cert_verification_cache.h (right): https://codereview.chromium.org/1357773002/diff/20001/ios/web/net/cert_verification_cache.h#newcode17 ios/web/net/cert_verification_cache.h:17: template <typename ValueType> Why templated? The actual code only ...
5 years, 3 months ago (2015-09-23 17:36:09 UTC) #4
Eugene But (OOO till 7-30)
Thanks, Stuart! Ryan, I've shared sample chains with you. PTAL. https://codereview.chromium.org/1357773002/diff/20001/ios/web/net/cert_verification_cache.h File ios/web/net/cert_verification_cache.h (right): https://codereview.chromium.org/1357773002/diff/20001/ios/web/net/cert_verification_cache.h#newcode17 ...
5 years, 3 months ago (2015-09-23 20:40:48 UTC) #5
Ryan Sleevi
Going to hold off on this further until the dependent CL is worked through. https://codereview.chromium.org/1357773002/diff/40001/ios/web/net/cert_verification_cache.h ...
5 years, 3 months ago (2015-09-24 22:48:39 UTC) #6
Eugene But (OOO till 7-30)
Just replying to the comments. I agree that it makes sense to hold on review ...
5 years, 2 months ago (2015-09-25 21:24:23 UTC) #7
Ryan Sleevi
https://codereview.chromium.org/1357773002/diff/40001/ios/web/net/cert_verification_cache.h File ios/web/net/cert_verification_cache.h (right): https://codereview.chromium.org/1357773002/diff/40001/ios/web/net/cert_verification_cache.h#newcode25 ios/web/net/cert_verification_cache.h:25: bool get(const scoped_refptr<net::X509Certificate>& cert, On 2015/09/25 21:24:23, eugenebut wrote: ...
5 years, 2 months ago (2015-09-28 22:46:52 UTC) #8
Eugene But (OOO till 7-30)
https://codereview.chromium.org/1357773002/diff/40001/ios/web/net/cert_verification_cache.h File ios/web/net/cert_verification_cache.h (right): https://codereview.chromium.org/1357773002/diff/40001/ios/web/net/cert_verification_cache.h#newcode25 ios/web/net/cert_verification_cache.h:25: bool get(const scoped_refptr<net::X509Certificate>& cert, On 2015/09/28 22:46:52, Ryan Sleevi ...
5 years, 2 months ago (2015-09-29 18:29:07 UTC) #9
Ryan Sleevi
https://codereview.chromium.org/1357773002/diff/40001/ios/web/net/cert_verification_cache.h File ios/web/net/cert_verification_cache.h (right): https://codereview.chromium.org/1357773002/diff/40001/ios/web/net/cert_verification_cache.h#newcode41 ios/web/net/cert_verification_cache.h:41: map_[KeyType(cert, host)] = value; On 2015/09/29 18:29:07, eugenebut wrote: ...
5 years, 2 months ago (2015-09-29 20:28:38 UTC) #10
Eugene But (OOO till 7-30)
https://codereview.chromium.org/1357773002/diff/40001/ios/web/net/cert_verification_cache.h File ios/web/net/cert_verification_cache.h (right): https://codereview.chromium.org/1357773002/diff/40001/ios/web/net/cert_verification_cache.h#newcode41 ios/web/net/cert_verification_cache.h:41: map_[KeyType(cert, host)] = value; On 2015/09/29 20:28:38, Ryan Sleevi ...
5 years, 2 months ago (2015-09-29 21:16:47 UTC) #11
Ryan Sleevi
https://codereview.chromium.org/1357773002/diff/40001/ios/web/net/cert_verification_cache.h File ios/web/net/cert_verification_cache.h (right): https://codereview.chromium.org/1357773002/diff/40001/ios/web/net/cert_verification_cache.h#newcode41 ios/web/net/cert_verification_cache.h:41: map_[KeyType(cert, host)] = value; On 2015/09/29 21:16:47, eugenebut wrote: ...
5 years, 2 months ago (2015-09-29 21:25:28 UTC) #12
Eugene But (OOO till 7-30)
Ok I guess we are in the agreement that using cert+host key does not use ...
5 years, 2 months ago (2015-09-29 21:48:33 UTC) #13
Eugene But (OOO till 7-30)
On 2015/09/29 21:48:33, eugenebut wrote: > Ok I guess we are in the agreement that ...
5 years, 2 months ago (2015-09-30 17:34:16 UTC) #14
Eugene But (OOO till 7-30)
Joel, could you please review this CL. We want to land this in M47 timeframe.
5 years, 2 months ago (2015-10-06 20:29:25 UTC) #15
stuartmorgan
On 2015/09/29 21:25:28, Ryan Sleevi (busy till 10-12) wrote: > I'm not sure I'd agree ...
5 years, 2 months ago (2015-10-07 22:38:00 UTC) #16
stuartmorgan
https://codereview.chromium.org/1357773002/diff/140001/ios/web/net/cert_verification_cache.h File ios/web/net/cert_verification_cache.h (right): https://codereview.chromium.org/1357773002/diff/140001/ios/web/net/cert_verification_cache.h#newcode36 ios/web/net/cert_verification_cache.h:36: class CertVerificationCache { Per Ryan's earlier comments, can this ...
5 years, 2 months ago (2015-10-08 16:52:39 UTC) #17
Eugene But (OOO till 7-30)
https://codereview.chromium.org/1357773002/diff/40001/ios/web/net/cert_verification_cache.h File ios/web/net/cert_verification_cache.h (right): https://codereview.chromium.org/1357773002/diff/40001/ios/web/net/cert_verification_cache.h#newcode41 ios/web/net/cert_verification_cache.h:41: map_[KeyType(cert, host)] = value; On 2015/09/28 22:46:52, Ryan Sleevi ...
5 years, 2 months ago (2015-10-09 16:32:36 UTC) #18
stuartmorgan
LGTM assuming we go with this design; per my earlier comment I'd like to fully ...
5 years, 2 months ago (2015-10-09 21:30:00 UTC) #19
Eugene But (OOO till 7-30)
Thanks! https://codereview.chromium.org/1357773002/diff/140001/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm File ios/web/web_state/ui/crw_wk_web_view_web_controller.mm (right): https://codereview.chromium.org/1357773002/diff/140001/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm#newcode899 ios/web/web_state/ui/crw_wk_web_view_web_controller.mm:899: if (_certVerificationErrors.Get(leafCert, base::SysNSStringToUTF8(host), On 2015/10/09 21:30:00, stuartmorgan wrote: ...
5 years, 2 months ago (2015-10-12 18:19:40 UTC) #20
Ryan Sleevi
5 years, 2 months ago (2015-10-13 17:02:44 UTC) #22
Eugene But (OOO till 7-30)
David, could you please take a look at this CL as well! Thank you.
5 years, 2 months ago (2015-10-16 15:13:56 UTC) #23
jww
lgtm, with some clarifications. Also, are there any browser_tests/integration tests for iOS where you can ...
5 years, 2 months ago (2015-10-17 20:47:19 UTC) #24
Eugene But (OOO till 7-30)
Thank you Joel! We working on integration tests in parallel and I will add you ...
5 years, 2 months ago (2015-10-17 22:43:55 UTC) #25
Ryan Sleevi
https://codereview.chromium.org/1357773002/diff/260001/ios/web/net/cert_host_pair_unittest.cc File ios/web/net/cert_host_pair_unittest.cc (right): https://codereview.chromium.org/1357773002/diff/260001/ios/web/net/cert_host_pair_unittest.cc#newcode19 ios/web/net/cert_host_pair_unittest.cc:19: const char kHostName2[] = "www.chromium.org"; www.example.com is specially reserved ...
5 years, 2 months ago (2015-10-19 23:56:22 UTC) #26
Eugene But (OOO till 7-30)
Thanks! PTAL. https://codereview.chromium.org/1357773002/diff/260001/ios/web/net/cert_host_pair_unittest.cc File ios/web/net/cert_host_pair_unittest.cc (right): https://codereview.chromium.org/1357773002/diff/260001/ios/web/net/cert_host_pair_unittest.cc#newcode19 ios/web/net/cert_host_pair_unittest.cc:19: const char kHostName2[] = "www.chromium.org"; On 2015/10/19 ...
5 years, 2 months ago (2015-10-21 04:01:03 UTC) #27
Ryan Sleevi
https://codereview.chromium.org/1357773002/diff/260001/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm File ios/web/web_state/ui/crw_wk_web_view_web_controller.mm (right): https://codereview.chromium.org/1357773002/diff/260001/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm#newcode921 ios/web/web_state/ui/crw_wk_web_view_web_controller.mm:921: // This cache will be purged anyway so there ...
5 years, 1 month ago (2015-10-28 21:28:51 UTC) #28
Eugene But (OOO till 7-30)
PTAL. Would really appreciate quick feedback here. https://codereview.chromium.org/1357773002/diff/260001/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm File ios/web/web_state/ui/crw_wk_web_view_web_controller.mm (right): https://codereview.chromium.org/1357773002/diff/260001/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm#newcode921 ios/web/web_state/ui/crw_wk_web_view_web_controller.mm:921: // This ...
5 years, 1 month ago (2015-10-29 00:39:15 UTC) #29
stuartmorgan
https://codereview.chromium.org/1357773002/diff/280001/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm File ios/web/web_state/ui/crw_wk_web_view_web_controller.mm (right): https://codereview.chromium.org/1357773002/diff/280001/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm#newcode1545 ios/web/web_state/ui/crw_wk_web_view_web_controller.mm:1545: _certVerificationErrors->Clear(); On 2015/10/29 00:39:14, eugenebut wrote: > Stuart seems ...
5 years, 1 month ago (2015-10-29 16:41:06 UTC) #30
stuartmorgan
https://codereview.chromium.org/1357773002/diff/280001/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm File ios/web/web_state/ui/crw_wk_web_view_web_controller.mm (right): https://codereview.chromium.org/1357773002/diff/280001/ios/web/web_state/ui/crw_wk_web_view_web_controller.mm#newcode1545 ios/web/web_state/ui/crw_wk_web_view_web_controller.mm:1545: _certVerificationErrors->Clear(); On 2015/10/29 16:41:06, stuartmorgan wrote: > Right, I ...
5 years, 1 month ago (2015-10-29 22:21:15 UTC) #31
Ryan Sleevi
LGTM % nits https://codereview.chromium.org/1357773002/diff/300001/ios/web/net/cert_host_pair_unittest.cc File ios/web/net/cert_host_pair_unittest.cc (right): https://codereview.chromium.org/1357773002/diff/300001/ios/web/net/cert_host_pair_unittest.cc#newcode45 ios/web/net/cert_host_pair_unittest.cc:45: ASSERT_TRUE(GetCert(kCertFileName2)); I was more trying to ...
5 years, 1 month ago (2015-10-29 22:37:27 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1357773002/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1357773002/320001
5 years, 1 month ago (2015-10-30 01:39:39 UTC) #35
Eugene But (OOO till 7-30)
Thank you very much for reviews! https://codereview.chromium.org/1357773002/diff/300001/ios/web/net/cert_host_pair_unittest.cc File ios/web/net/cert_host_pair_unittest.cc (right): https://codereview.chromium.org/1357773002/diff/300001/ios/web/net/cert_host_pair_unittest.cc#newcode45 ios/web/net/cert_host_pair_unittest.cc:45: ASSERT_TRUE(GetCert(kCertFileName2)); On 2015/10/29 ...
5 years, 1 month ago (2015-10-30 01:40:56 UTC) #36
commit-bot: I haz the power
Committed patchset #17 (id:320001)
5 years, 1 month ago (2015-10-30 02:03:41 UTC) #37
commit-bot: I haz the power
5 years, 1 month ago (2015-10-30 02:04:36 UTC) #38
Message was sent while issue was closed.
Patchset 17 (id:??) landed as
https://crrev.com/4e0758a248f23e4cc60465431a013a532ea96c89
Cr-Commit-Position: refs/heads/master@{#357018}

Powered by Google App Engine
This is Rietveld 408576698