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

Unified Diff: net/cert/cert_verify_proc_ios.cc

Issue 2889813002: Add tests for certificates that pass X509CertificateBytes parsing, but fail in CertVerifyProc. Fix … (Closed)
Patch Set: Created 3 years, 7 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_mac.cc » ('j') | net/cert/cert_verify_proc_mac.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/cert_verify_proc_ios.cc
diff --git a/net/cert/cert_verify_proc_ios.cc b/net/cert/cert_verify_proc_ios.cc
index ebb296014086632190a7868740c2f5dcd18b98d2..f443eaef989c337c73551e60420b4fd20dc00ef2 100644
--- a/net/cert/cert_verify_proc_ios.cc
+++ b/net/cert/cert_verify_proc_ios.cc
@@ -257,6 +257,10 @@ int CertVerifyProcIOS::VerifyInternal(
ScopedCFTypeRef<CFMutableArrayRef> cert_array(
x509_util::CreateSecCertificateArrayForX509Certificate(cert));
+ if (!cert_array) {
mattm 2017/05/16 22:46:26 </shamecube>
+ verify_result->cert_status |= CERT_STATUS_INVALID;
+ return ERR_CERT_INVALID;
+ }
ScopedCFTypeRef<SecTrustRef> trust_ref;
SecTrustResultType trust_result = kSecTrustResultDeny;
ScopedCFTypeRef<CFArrayRef> final_chain;
« no previous file with comments | « no previous file | net/cert/cert_verify_proc_mac.cc » ('j') | net/cert/cert_verify_proc_mac.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698