diff options
| author | Brian Carlstrom <bdc@google.com> | 2010-03-15 15:13:17 -0700 |
|---|---|---|
| committer | Brian Carlstrom <bdc@google.com> | 2010-03-16 15:14:22 -0700 |
| commit | 4ab72cb7e79c15b94b4b7aca4cdb28677a615f8a (patch) | |
| tree | b60083ea0b39a348af9b5e79b8d23fbcc417bd9b /core/java/android/webkit/CallbackProxy.java | |
| parent | beb0c1b3eca6e185c5a9dc71eff3c93686e1b836 (diff) | |
b/2511635 Browser displays incorrect SSL cert information
WebView's mCertificate member was not cleared when going to new
pages. Rather than clearing mCertificate as was done in previously in
WebView.goBackOrForward, we now clear when CallbackProxy receives a
PAGE_STARTED message.
This problem was highlighted whenever we went to a https page that was
in the cache, since the cache does not store certificate information,
so "More > Page Info > View Certifcate" was showing the certificate of
the last non-cached page because it had not been cleared. See also
b/2516638 "SslCertificate information not cached by CacheManager"
Change-Id: I40284f22ceb7150a6b20ecc2741f6153ed9a3276
Diffstat (limited to 'core/java/android/webkit/CallbackProxy.java')
| -rw-r--r-- | core/java/android/webkit/CallbackProxy.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/java/android/webkit/CallbackProxy.java b/core/java/android/webkit/CallbackProxy.java index a013a9b2d03a..4f2830bee90b 100644 --- a/core/java/android/webkit/CallbackProxy.java +++ b/core/java/android/webkit/CallbackProxy.java @@ -252,6 +252,13 @@ class CallbackProxy extends Handler { // 32-bit reads and writes. switch (msg.what) { case PAGE_STARTED: + // every time we start a new page, we want to reset the + // WebView certificate: + // if the new site is secure, we will reload it and get a + // new certificate set; + // if the new site is not secure, the certificate must be + // null, and that will be the case + mWebView.setCertificate(null); if (mWebViewClient != null) { mWebViewClient.onPageStarted(mWebView, msg.getData().getString("url"), |
