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

Unified Diff: chrome/browser/ui/android/website_settings_popup_android.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: fix test 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
« no previous file with comments | « no previous file | chrome/browser/ui/certificate_dialogs.h » ('j') | chrome/browser/ui/certificate_dialogs.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/android/website_settings_popup_android.cc
diff --git a/chrome/browser/ui/android/website_settings_popup_android.cc b/chrome/browser/ui/android/website_settings_popup_android.cc
index 1c0aabb861159c1090f0125fae56ff2fd5730b1c..3590a49039bc0b06665533f6cb0bd1299117b04b 100644
--- a/chrome/browser/ui/android/website_settings_popup_android.cc
+++ b/chrome/browser/ui/android/website_settings_popup_android.cc
@@ -44,12 +44,8 @@ static jobjectArray GetCertificateChain(JNIEnv* env,
CHECK(ok);
std::vector<std::string> cert_chain;
- net::X509Certificate::OSCertHandles cert_handles =
- cert->GetIntermediateCertificates();
- // Make sure the peer's own cert is the first in the chain, if it's not
- // already there.
- if (cert_handles.empty() || cert_handles[0] != cert->os_cert_handle())
- cert_handles.insert(cert_handles.begin(), cert->os_cert_handle());
+ net::X509Certificate::OSCertHandles cert_handles;
+ cert->GetCertificateChain(&cert_handles);
cert_chain.reserve(cert_handles.size());
for (net::X509Certificate::OSCertHandles::const_iterator it =
« no previous file with comments | « no previous file | chrome/browser/ui/certificate_dialogs.h » ('j') | chrome/browser/ui/certificate_dialogs.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698