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

Unified Diff: net/cert/internal/cert_issuer_source_static_unittest.cc

Issue 2327973002: Add CertErrors* parameter to the main Certificate parsing functions. (Closed)
Patch Set: StringPiece is kind of dangerous... Created 4 years, 3 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 | « net/cert/internal/cert_issuer_source_aia_unittest.cc ('k') | net/cert/internal/parse_certificate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/internal/cert_issuer_source_static_unittest.cc
diff --git a/net/cert/internal/cert_issuer_source_static_unittest.cc b/net/cert/internal/cert_issuer_source_static_unittest.cc
index d59744c61abf2c2cba2791752cda344c8fdbd665..949035c0eb10635a22eb11f2b94f1adab8beaa92 100644
--- a/net/cert/internal/cert_issuer_source_static_unittest.cc
+++ b/net/cert/internal/cert_issuer_source_static_unittest.cc
@@ -5,6 +5,7 @@
#include "net/cert/internal/cert_issuer_source_static.h"
#include "base/bind.h"
+#include "net/cert/internal/cert_errors.h"
#include "net/cert/internal/parsed_certificate.h"
#include "net/cert/internal/test_helpers.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -36,9 +37,13 @@ void NotCalled(CertIssuerSource::Request* req) {
"CERTIFICATE", &der);
if (!r)
return r;
- *result = ParsedCertificate::CreateFromCertificateCopy(der, {});
- if (!*result)
- return ::testing::AssertionFailure() << "CreateFromCertificateCopy failed";
+ CertErrors errors;
+ *result = ParsedCertificate::Create(der, {}, &errors);
+ if (!*result) {
+ return ::testing::AssertionFailure()
+ << "ParsedCertificate::Create() failed:\n"
+ << errors.ToDebugString();
+ }
return ::testing::AssertionSuccess();
}
« no previous file with comments | « net/cert/internal/cert_issuer_source_aia_unittest.cc ('k') | net/cert/internal/parse_certificate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698