commit 89acb810aa0f622316b43812bb07cb56eb9c9377 Author: Alex Catarineu acat@torproject.org Date: Mon Sep 30 13:10:29 2019 +0200
fixup! Bug 26690: Port padlock states for .onion services to mobile --- mobile/android/chrome/content/browser.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/mobile/android/chrome/content/browser.js b/mobile/android/chrome/content/browser.js index fc66e8b4f23e..b1921562e53d 100644 --- a/mobile/android/chrome/content/browser.js +++ b/mobile/android/chrome/content/browser.js @@ -6770,6 +6770,12 @@ var IdentityHandler = { */ getIdentityData: function() { let result = {}; + + // Even if the connection is secure, it may not have a certificate + if (!this._lastSecInfo) { + return result; + } + let cert = this._lastSecInfo.serverCert;
// Human readable name of Subject @@ -6933,7 +6939,7 @@ var IdentityHandler = {
result.host = this.getEffectiveHost(); result.isOnionHost = this.isOnionHost(); - result.hasCert = !!this._lastStatus; + result.hasCert = !!this._lastSecInfo;
// Don't show identity data for pages with an unknown identity or if any // mixed content is loaded (mixed display content is loaded by default).