Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(163)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/security/SecurityPanel.js

Issue 1772603002: Addition of Certificate Transparency details to Security panel of DevTools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed SignedCertificateTimestampStore and SignedCertificateTimestampIDStatus(List) Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 782 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 793
794 var table = new WebInspector.SecurityDetailsTable(); 794 var table = new WebInspector.SecurityDetailsTable();
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
804 // Show SCT(s) of Certificate Transparency.
805 for (var i = 0; i < originState.securityDetails.signedCertificateTim estampList.length; i++)
806 {
807 var sctSection = this.element.createChild("div", "origin-view-se ction");
808 sctSection.createChild("div", "origin-view-section-title").textC ontent = WebInspector.UIString("Certificate Transparency - Signed Certificate Ti mestamp " + (i + 1));
809
810 var sctTable = new WebInspector.SecurityDetailsTable();
811 sctSection.appendChild(sctTable.element());
812 sctTable.addRow(WebInspector.UIString("Validation Status"), orig inState.securityDetails.signedCertificateTimestampList[i].status);
813 sctTable.addRow(WebInspector.UIString("Origin"), originState.sec urityDetails.signedCertificateTimestampList[i].origin);
814 sctTable.addRow(WebInspector.UIString("Version"), originState.se curityDetails.signedCertificateTimestampList[i].version);
815 sctTable.addRow(WebInspector.UIString("Log Name"), originState.s ecurityDetails.signedCertificateTimestampList[i].logDescription);
816 sctTable.addRow(WebInspector.UIString("Log ID"), originState.sec urityDetails.signedCertificateTimestampList[i].logId.replace(/(.{2})/g,"$1 "));
817 sctTable.addRow(WebInspector.UIString("Issued At"), new Date(ori ginState.securityDetails.signedCertificateTimestampList[i].timestamp).toUTCStrin g());
818 sctTable.addRow(WebInspector.UIString("Hash Algorithm"), originS tate.securityDetails.signedCertificateTimestampList[i].hashAlgorithm);
819 sctTable.addRow(WebInspector.UIString("Sign Algorithm"), originS tate.securityDetails.signedCertificateTimestampList[i].signatureAlgorithm);
820 sctTable.addRow(WebInspector.UIString("Signature Data"), originS tate.securityDetails.signedCertificateTimestampList[i].signatureData.replace(/(. {2})/g,"$1 "));
821 }
822
823 var noteSection = this.element.createChild("div", "origin-view-secti on");
824 // TODO(lgarron): Fix the issue and then remove this section. See co mment in SecurityPanel._processRequest().
825 noteSection.createChild("div").textContent = WebInspector.UIString(" The security details above are from the first inspected response.");
803 } 826 }
804 827
805 function displayCertificateDetailsUnavailable () 828 function displayCertificateDetailsUnavailable ()
806 { 829 {
807 certificateSection.createChild("div").textContent = WebInspector.UIS tring("Certificate details unavailable."); 830 certificateSection.createChild("div").textContent = WebInspector.UIS tring("Certificate details unavailable.");
808 } 831 }
809 832
810 originState.certificateDetailsPromise.then(displayCertificateDetails.bin d(this), displayCertificateDetailsUnavailable); 833 originState.certificateDetailsPromise.then(displayCertificateDetails.bin d(this), displayCertificateDetailsUnavailable);
811
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().
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 ) { 834 } else if (originState.securityState !== SecurityAgent.SecurityState.Unknown ) {
816 var notSecureSection = this.element.createChild("div", "origin-view-sect ion"); 835 var notSecureSection = this.element.createChild("div", "origin-view-sect ion");
817 notSecureSection.createChild("div", "origin-view-section-title").textCon tent = WebInspector.UIString("Not Secure"); 836 notSecureSection.createChild("div", "origin-view-section-title").textCon tent = WebInspector.UIString("Not Secure");
818 notSecureSection.createChild("div").textContent = WebInspector.UIString( "Your connection to this origin is not secure."); 837 notSecureSection.createChild("div").textContent = WebInspector.UIString( "Your connection to this origin is not secure.");
819 } else { 838 } else {
820 var noInfoSection = this.element.createChild("div", "origin-view-section "); 839 var noInfoSection = this.element.createChild("div", "origin-view-section ");
821 noInfoSection.createChild("div", "origin-view-section-title").textConten t = WebInspector.UIString("No Security Information"); 840 noInfoSection.createChild("div", "origin-view-section-title").textConten t = WebInspector.UIString("No Security Information");
822 noInfoSection.createChild("div").textContent = WebInspector.UIString("No security details are available for this origin."); 841 noInfoSection.createChild("div").textContent = WebInspector.UIString("No security details are available for this origin.");
823 } 842 }
824 } 843 }
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 row.createChild("div").textContent = key; 950 row.createChild("div").textContent = key;
932 951
933 var valueDiv = row.createChild("div"); 952 var valueDiv = row.createChild("div");
934 if (typeof value === "string") { 953 if (typeof value === "string") {
935 valueDiv.textContent = value; 954 valueDiv.textContent = value;
936 } else { 955 } else {
937 valueDiv.appendChild(value); 956 valueDiv.appendChild(value);
938 } 957 }
939 } 958 }
940 } 959 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698