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

Unified Diff: net/cert/cert_verify_proc_mac.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
Index: net/cert/cert_verify_proc_mac.cc
diff --git a/net/cert/cert_verify_proc_mac.cc b/net/cert/cert_verify_proc_mac.cc
index 701587d3b2509d411e88b29e53407113864149f3..84cdfc43144ac5bc9ecc956deb1a28b0f2a82515 100644
--- a/net/cert/cert_verify_proc_mac.cc
+++ b/net/cert/cert_verify_proc_mac.cc
@@ -742,8 +742,10 @@ int VerifyWithGivenFlags(X509Certificate* cert,
ScopedCFTypeRef<CFMutableArrayRef> cert_array(
x509_util::CreateSecCertificateArrayForX509Certificate(cert));
- if (!cert_array)
+ if (!cert_array) {
+ verify_result->cert_status |= CERT_STATUS_INVALID;
mattm 2017/05/16 22:46:26 note: Need to set status here or later checks in C
return ERR_CERT_INVALID;
+ }
// Beginning with the certificate chain as supplied by the server, attempt
// to verify the chain. If a failure is encountered, trim a certificate

Powered by Google App Engine
This is Rietveld 408576698