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

Unified Diff: net/cert/cert_verify_proc_builtin.cc

Issue 2760723002: Check X509Certificate::CreateFromHandle result. (Closed)
Patch Set: rebase on updated 2755203002 Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/cert/cert_verify_proc_ios.cc » ('j') | net/cert/cert_verify_proc_ios.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/cert_verify_proc_builtin.cc
diff --git a/net/cert/cert_verify_proc_builtin.cc b/net/cert/cert_verify_proc_builtin.cc
index 0ac039942e1c9c61f002da8e01a00a75ed3d7fc1..67e91e5f656753fbeff6d92009f3e36930a4a7b6 100644
--- a/net/cert/cert_verify_proc_builtin.cc
+++ b/net/cert/cert_verify_proc_builtin.cc
@@ -309,6 +309,8 @@ scoped_refptr<X509Certificate> CreateVerifiedCertChain(
scoped_refptr<X509Certificate> result = X509Certificate::CreateFromHandle(
target_cert->os_cert_handle(), intermediates);
+ // |target_cert| was already successfully parsed, so this should never fail.
+ DCHECK(result);
for (const X509Certificate::OSCertHandle handle : intermediates)
X509Certificate::FreeOSCertHandle(handle);
« no previous file with comments | « no previous file | net/cert/cert_verify_proc_ios.cc » ('j') | net/cert/cert_verify_proc_ios.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698