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

Unified Diff: chrome/common/net/x509_certificate_model.cc

Issue 376753002: Fix webui cert viewer showing wrong cert chain on NSS and no chain on OpenSSL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/net/x509_certificate_model.cc
diff --git a/chrome/common/net/x509_certificate_model.cc b/chrome/common/net/x509_certificate_model.cc
index bfc119217beb4baf99f1890772fd0de6e33adad5..863ac8dc30b2a1c6848c5547f2d4f9adc51cc44f 100644
--- a/chrome/common/net/x509_certificate_model.cc
+++ b/chrome/common/net/x509_certificate_model.cc
@@ -31,6 +31,15 @@ std::string ProcessIDN(const std::string& input) {
input16, output16);
}
+void GetCertChainFromCert(net::X509Certificate* cert,
+ net::X509Certificate::OSCertHandles* cert_handles) {
+ cert_handles->clear();
+ cert_handles->insert(cert_handles->begin(), cert->os_cert_handle());
+ const net::X509Certificate::OSCertHandles& certs =
+ cert->GetIntermediateCertificates();
+ cert_handles->insert(cert_handles->end(), certs.begin(), certs.end());
+}
+
std::string ProcessRawBytesWithSeparators(const unsigned char* data,
size_t data_length,
char hex_separator,

Powered by Google App Engine
This is Rietveld 408576698