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

Unified Diff: net/cert/cert_verify_proc_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
Index: net/cert/cert_verify_proc_android.cc
diff --git a/net/cert/cert_verify_proc_android.cc b/net/cert/cert_verify_proc_android.cc
index bd747267a2e0c293465020e2ff35497d806f8c74..2dc2c10f86bd2bf7a4fff9746097899d990cc5f2 100644
--- a/net/cert/cert_verify_proc_android.cc
+++ b/net/cert/cert_verify_proc_android.cc
@@ -92,14 +92,8 @@ bool VerifyFromAndroidTrustManager(const std::vector<std::string>& cert_bytes,
bool GetChainDEREncodedBytes(X509Certificate* cert,
std::vector<std::string>* chain_bytes) {
- X509Certificate::OSCertHandle cert_handle = cert->os_cert_handle();
- 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_handle)
- cert_handles.insert(cert_handles.begin(), cert_handle);
+ X509Certificate::OSCertHandles cert_handles;
+ cert->GetCertificateChain(&cert_handles);
chain_bytes->reserve(cert_handles.size());
for (X509Certificate::OSCertHandles::const_iterator it =

Powered by Google App Engine
This is Rietveld 408576698