summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorcevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-12 18:15:25 +0000
committercevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-12 18:15:25 +0000
commitbe58795d0c347769c7b18d992ef6b029d4cef747 (patch)
tree8fd92b74ea7816c5b6599b396c9d32df1d5130e7 /chrome
parent805c623b6e14cb205170a0354f176c16fe76c053 (diff)
downloadchromium_src-be58795d0c347769c7b18d992ef6b029d4cef747.zip
chromium_src-be58795d0c347769c7b18d992ef6b029d4cef747.tar.gz
chromium_src-be58795d0c347769c7b18d992ef6b029d4cef747.tar.bz2
Add cert fingerprints to the cert chain dialog, bringing it more inline with the
information available in the Windows system dialog. Review URL: http://codereview.chromium.org/6822041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81272 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/ui/gtk/certificate_viewer.cc30
1 files changed, 29 insertions, 1 deletions
diff --git a/chrome/browser/ui/gtk/certificate_viewer.cc b/chrome/browser/ui/gtk/certificate_viewer.cc
index 62b0655..ff7f4a7 100644
--- a/chrome/browser/ui/gtk/certificate_viewer.cc
+++ b/chrome/browser/ui/gtk/certificate_viewer.cc
@@ -44,9 +44,11 @@ void AddKeyValue(GtkTable* table, int row, const std::string& text,
gtk_util::IndentWidget(
gtk_util::LeftAlignMisc(gtk_label_new(text.c_str()))),
0, 1, row, row + 1);
+ GtkWidget* label = gtk_label_new(value.c_str());
+ gtk_label_set_selectable(GTK_LABEL(label), TRUE);
gtk_table_attach_defaults(
table,
- gtk_util::LeftAlignMisc(gtk_label_new(value.c_str())),
+ gtk_util::LeftAlignMisc(label),
1, 2, row, row + 1);
}
@@ -485,6 +487,32 @@ void CertificateViewer::FillTreeStoreWithCertFields(
FIELDS_VALUE,
x509_certificate_model::ProcessRawBitsSignatureWrap(cert).c_str(),
-1);
+
+ GtkTreeIter top_fingerprints_iter;
+ gtk_tree_store_append(store, &top_fingerprints_iter, &top);
+ gtk_tree_store_set(
+ store, &top_fingerprints_iter,
+ FIELDS_NAME,
+ l10n_util::GetStringUTF8(IDS_CERT_INFO_FINGERPRINTS_GROUP).c_str(),
+ FIELDS_VALUE, "",
+ -1);
+
+ GtkTreeIter fingerprints_iter;
+ gtk_tree_store_append(store, &fingerprints_iter, &top_fingerprints_iter);
+ gtk_tree_store_set(
+ store, &fingerprints_iter,
+ FIELDS_NAME,
+ l10n_util::GetStringUTF8(IDS_CERT_INFO_SHA256_FINGERPRINT_LABEL).c_str(),
+ FIELDS_VALUE, x509_certificate_model::HashCertSHA256(cert).c_str(),
+ -1);
+
+ gtk_tree_store_append(store, &fingerprints_iter, &top_fingerprints_iter);
+ gtk_tree_store_set(
+ store, &fingerprints_iter,
+ FIELDS_NAME,
+ l10n_util::GetStringUTF8(IDS_CERT_INFO_SHA1_FINGERPRINT_LABEL).c_str(),
+ FIELDS_VALUE, x509_certificate_model::HashCertSHA1(cert).c_str(),
+ -1);
}
// static