OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @constructor | 6 * @constructor |
7 * @extends {WebInspector.PanelWithSidebar} | 7 * @extends {WebInspector.PanelWithSidebar} |
8 * @implements {WebInspector.TargetManager.Observer} | 8 * @implements {WebInspector.TargetManager.Observer} |
9 */ | 9 */ |
10 WebInspector.SecurityPanel = function() | 10 WebInspector.SecurityPanel = function() |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 this._explanations = explanations, | 612 this._explanations = explanations, |
613 this._mixedContentStatus = mixedContentStatus; | 613 this._mixedContentStatus = mixedContentStatus; |
614 this._schemeIsCryptographic = schemeIsCryptographic; | 614 this._schemeIsCryptographic = schemeIsCryptographic; |
615 | 615 |
616 this._panel.setRanInsecureContentStyle(mixedContentStatus.ranInsecureCon
tentStyle); | 616 this._panel.setRanInsecureContentStyle(mixedContentStatus.ranInsecureCon
tentStyle); |
617 this._panel.setDisplayedInsecureContentStyle(mixedContentStatus.displaye
dInsecureContentStyle); | 617 this._panel.setDisplayedInsecureContentStyle(mixedContentStatus.displaye
dInsecureContentStyle); |
618 | 618 |
619 this.refreshExplanations(); | 619 this.refreshExplanations(); |
620 }, | 620 }, |
621 | 621 |
622 refreshExplanations: function () | 622 refreshExplanations: function() |
623 { | 623 { |
624 this._securityExplanations.removeChildren(); | 624 this._securityExplanations.removeChildren(); |
625 for (var explanation of this._explanations) | 625 for (var explanation of this._explanations) |
626 this._addExplanation(explanation); | 626 this._addExplanation(explanation); |
627 | 627 |
628 this._addMixedContentExplanations(); | 628 this._addMixedContentExplanations(); |
629 }, | 629 }, |
630 | 630 |
631 _addMixedContentExplanations: function () | 631 _addMixedContentExplanations: function() |
632 { | 632 { |
633 if (!this._schemeIsCryptographic) | 633 if (!this._schemeIsCryptographic) |
634 return; | 634 return; |
635 | 635 |
636 if (this._mixedContentStatus && (this._mixedContentStatus.ranInsecureCon
tent || this._mixedContentStatus.displayedInsecureContent)) { | 636 if (this._mixedContentStatus && (this._mixedContentStatus.ranInsecureCon
tent || this._mixedContentStatus.displayedInsecureContent)) { |
637 if (this._mixedContentStatus.ranInsecureContent) | 637 if (this._mixedContentStatus.ranInsecureContent) |
638 this._addMixedContentExplanation(this._mixedContentStatus.ranIns
ecureContentStyle, WebInspector.UIString("Active Mixed Content"), WebInspector.U
IString("You have recently allowed insecure content (such as scripts or iframes)
to run on this site."), WebInspector.NetworkLogView.MixedContentFilterValues.Bl
ockOverridden, showBlockOverriddenMixedContentInNetworkPanel); | 638 this._addMixedContentExplanation(this._mixedContentStatus.ranIns
ecureContentStyle, WebInspector.UIString("Active Mixed Content"), WebInspector.U
IString("You have recently allowed insecure content (such as scripts or iframes)
to run on this site."), WebInspector.NetworkLogView.MixedContentFilterValues.Bl
ockOverridden, showBlockOverriddenMixedContentInNetworkPanel); |
639 if (this._mixedContentStatus.displayedInsecureContent) | 639 if (this._mixedContentStatus.displayedInsecureContent) |
640 this._addMixedContentExplanation(this._mixedContentStatus.displa
yedInsecureContentStyle, WebInspector.UIString("Mixed Content"), WebInspector.UI
String("The site includes HTTP resources."), WebInspector.NetworkLogView.MixedCo
ntentFilterValues.Displayed, showDisplayedMixedContentInNetworkPanel); | 640 this._addMixedContentExplanation(this._mixedContentStatus.displa
yedInsecureContentStyle, WebInspector.UIString("Mixed Content"), WebInspector.UI
String("The site includes HTTP resources."), WebInspector.NetworkLogView.MixedCo
ntentFilterValues.Displayed, showDisplayedMixedContentInNetworkPanel); |
641 } | 641 } |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
795 certificateSection.appendChild(table.element()); | 795 certificateSection.appendChild(table.element()); |
796 table.addRow(WebInspector.UIString("Subject"), certificateDetails.su
bject.name); | 796 table.addRow(WebInspector.UIString("Subject"), certificateDetails.su
bject.name); |
797 table.addRow(WebInspector.UIString("SAN"), sanDiv); | 797 table.addRow(WebInspector.UIString("SAN"), sanDiv); |
798 table.addRow(WebInspector.UIString("Valid From"), validFromString); | 798 table.addRow(WebInspector.UIString("Valid From"), validFromString); |
799 table.addRow(WebInspector.UIString("Valid Until"), validUntilString)
; | 799 table.addRow(WebInspector.UIString("Valid Until"), validUntilString)
; |
800 table.addRow(WebInspector.UIString("Issuer"), certificateDetails.iss
uer); | 800 table.addRow(WebInspector.UIString("Issuer"), certificateDetails.iss
uer); |
801 table.addRow(WebInspector.UIString("SCTs"), this.sctSummary(originSt
ate.securityDetails.certificateValidationDetails)); | 801 table.addRow(WebInspector.UIString("SCTs"), this.sctSummary(originSt
ate.securityDetails.certificateValidationDetails)); |
802 table.addRow("", WebInspector.SecurityPanel.createCertificateViewerB
utton(WebInspector.UIString("Open full certificate details"), originState.securi
tyDetails.certificateId)); | 802 table.addRow("", WebInspector.SecurityPanel.createCertificateViewerB
utton(WebInspector.UIString("Open full certificate details"), originState.securi
tyDetails.certificateId)); |
803 } | 803 } |
804 | 804 |
805 function displayCertificateDetailsUnavailable () | 805 function displayCertificateDetailsUnavailable() |
806 { | 806 { |
807 certificateSection.createChild("div").textContent = WebInspector.UIS
tring("Certificate details unavailable."); | 807 certificateSection.createChild("div").textContent = WebInspector.UIS
tring("Certificate details unavailable."); |
808 } | 808 } |
809 | 809 |
810 originState.certificateDetailsPromise.then(displayCertificateDetails.bin
d(this), displayCertificateDetailsUnavailable); | 810 originState.certificateDetailsPromise.then(displayCertificateDetails.bin
d(this), displayCertificateDetailsUnavailable); |
811 | 811 |
812 var noteSection = this.element.createChild("div", "origin-view-section")
; | 812 var noteSection = this.element.createChild("div", "origin-view-section")
; |
813 // TODO(lgarron): Fix the issue and then remove this section. See commen
t in SecurityPanel._processRequest(). | 813 // TODO(lgarron): Fix the issue and then remove this section. See commen
t in SecurityPanel._processRequest(). |
814 noteSection.createChild("div").textContent = WebInspector.UIString("The
security details above are from the first inspected response."); | 814 noteSection.createChild("div").textContent = WebInspector.UIString("The
security details above are from the first inspected response."); |
815 } else if (originState.securityState !== SecurityAgent.SecurityState.Unknown
) { | 815 } else if (originState.securityState !== SecurityAgent.SecurityState.Unknown
) { |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
931 row.createChild("div").textContent = key; | 931 row.createChild("div").textContent = key; |
932 | 932 |
933 var valueDiv = row.createChild("div"); | 933 var valueDiv = row.createChild("div"); |
934 if (typeof value === "string") { | 934 if (typeof value === "string") { |
935 valueDiv.textContent = value; | 935 valueDiv.textContent = value; |
936 } else { | 936 } else { |
937 valueDiv.appendChild(value); | 937 valueDiv.appendChild(value); |
938 } | 938 } |
939 } | 939 } |
940 } | 940 } |
OLD | NEW |