Index: third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js b/third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js |
index 63927d4d4080cb57572d6265fb4114e38034ef87..dc0e2d077564916cc8623efbdaaf4c3f53e1adca 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js |
+++ b/third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js |
@@ -65,11 +65,12 @@ WebInspector.SecurityPanel.prototype = { |
* @param {!Array<!SecurityAgent.SecurityStateExplanation>} explanations |
* @param {?SecurityAgent.MixedContentStatus} mixedContentStatus |
* @param {boolean} schemeIsCryptographic |
+ * @param {boolean} pkpBypassed |
*/ |
- _updateSecurityState: function(newSecurityState, explanations, mixedContentStatus, schemeIsCryptographic) |
+ _updateSecurityState: function(newSecurityState, explanations, mixedContentStatus, schemeIsCryptographic, pkpBypassed) |
{ |
this._sidebarMainViewElement.setSecurityState(newSecurityState); |
- this._mainView.updateSecurityState(newSecurityState, explanations, mixedContentStatus, schemeIsCryptographic); |
+ this._mainView.updateSecurityState(newSecurityState, explanations, mixedContentStatus, schemeIsCryptographic, pkpBypassed); |
}, |
/** |
@@ -82,7 +83,8 @@ WebInspector.SecurityPanel.prototype = { |
var explanations = /** @type {!Array<!SecurityAgent.SecurityStateExplanation>} */ (data.explanations); |
var mixedContentStatus = /** @type {?SecurityAgent.MixedContentStatus} */ (data.mixedContentStatus); |
var schemeIsCryptographic = /** @type {boolean} */ (data.schemeIsCryptographic); |
- this._updateSecurityState(securityState, explanations, mixedContentStatus, schemeIsCryptographic); |
+ var pkpBypassed = /** @type {boolean} */ (data.pkpBypassed); |
+ this._updateSecurityState(securityState, explanations, mixedContentStatus, schemeIsCryptographic, pkpBypassed); |
}, |
selectAndSwitchToMainView: function() |
@@ -597,8 +599,9 @@ WebInspector.SecurityMainView.prototype = { |
* @param {!Array<!SecurityAgent.SecurityStateExplanation>} explanations |
* @param {?SecurityAgent.MixedContentStatus} mixedContentStatus |
* @param {boolean} schemeIsCryptographic |
+ * @param {boolean} pkpBypassed |
*/ |
- updateSecurityState: function(newSecurityState, explanations, mixedContentStatus, schemeIsCryptographic) |
+ updateSecurityState: function(newSecurityState, explanations, mixedContentStatus, schemeIsCryptographic, pkpBypassed) |
{ |
// Remove old state. |
// It's safe to call this even when this._securityState is undefined. |
@@ -613,11 +616,13 @@ WebInspector.SecurityMainView.prototype = { |
"neutral": WebInspector.UIString("This page is not secure."), |
"secure": WebInspector.UIString("This page is secure (valid HTTPS).") |
} |
+ var pkpBypassedExplanation = WebInspector.UIString("Public-key pinning was bypassed by a local root certificate."); |
lgarron
2016/07/01 01:33:39
Unused? (It seems to be hardcoded separately below
dadrian
2016/07/01 01:58:45
Whoops, Done.
|
this._summaryText.textContent = summaryExplanationStrings[this._securityState]; |
this._explanations = explanations, |
this._mixedContentStatus = mixedContentStatus; |
this._schemeIsCryptographic = schemeIsCryptographic; |
+ this._pkpBypassed = pkpBypassed; |
this._panel.setRanInsecureContentStyle(mixedContentStatus.ranInsecureContentStyle); |
this._panel.setDisplayedInsecureContentStyle(mixedContentStatus.displayedInsecureContentStyle); |
@@ -632,8 +637,21 @@ WebInspector.SecurityMainView.prototype = { |
this._addExplanation(explanation); |
this._addMixedContentExplanations(); |
+ this._addPKPBypassExplanations(); |
}, |
+ _addPKPBypassExplanations: function() |
+ { |
+ if (!this._pkpBypassed) |
+ return; |
+ |
+ this._addExplanation(/** @type {!SecurityAgent.SecurityStateExplanation} */ ({ |
+ "securityState": SecurityAgent.SecurityState.Info, |
+ "summary": WebInspector.UIString("Public-Key Pinning"), |
+ "description": WebInspector.UIString("Public-key pinning was bypassed by a local root certificate.") |
+ })); |
+ }, |
+ |
_addMixedContentExplanations: function() |
{ |
if (!this._schemeIsCryptographic) |