[WebLayer] Integrate showing bad clock interstitial
This CL integrates a check for whether to display the bad clock interstitial into WebLayer's SSLErrorHandler. The check is modeled on that in //chrome's SSLErrorHandler. However, we did not port the fetch of NetworkTimeTracker's time into //weblayer: this fetch introduces a fair degree of complexity into the flow by making it asynchronous, and it is not relevant on Android, where such fetches are not supported. This fetch will be incorporated when WebLayer shares //chrome's SSLErrorHandler implementation as part of crbug.com/1026547. Just like in Chrome, the bad clock interstitial is shown when there is an expired certificate and the network time is reported as being ahead or behind of the actual time. The network time is not always seeded, in which case the application defaults to showing the generic SSL interstitial. In particular, for Chrome on Android the network time is seeded either via sync or via the Variations Service. The latter will apply in WebLayer once variations is integrated. This CL adds a browsertest of the relevant functionality; the browsertest is adapted from one in //chrome and manually sets the network time in order to trigger the bad clock interstitial showing. (I did a similar exercise in the shell locally on Android and Linux to verify the showing of the interstitial). Note that opening the date/time from the interstitial is not yet supported; a followup CL will bring up that support by sharing the relevant implementation from //chrome. Change-Id: I176a342c5de328441d26a22f28742dba6793a1ed Bug: 1025059 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1983170 Commit-Queue: Colin Blundell <blundell@chromium.org> Reviewed-by:John Abd-El-Malek <jam@chromium.org> Cr-Commit-Position: refs/heads/master@{#730170}
Showing
This diff is collapsed.
Please register or sign in to comment