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

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

Issue 2349093002: Change the interface for parsing SignatureAlgorithm to take a (Closed)
Patch Set: rebase 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/signature_algorithm.cc ('k') | net/cert/internal/verify_certificate_chain.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/internal/signature_algorithm_unittest.cc
diff --git a/net/cert/internal/signature_algorithm_unittest.cc b/net/cert/internal/signature_algorithm_unittest.cc
index 04177976a8647f7424aff153c3d400bbe2bb9a7e..ecaa7ced06eb62be45465886cb6a4ea453a947d4 100644
--- a/net/cert/internal/signature_algorithm_unittest.cc
+++ b/net/cert/internal/signature_algorithm_unittest.cc
@@ -8,6 +8,7 @@
#include "base/files/file_util.h"
#include "base/strings/string_number_conversions.h"
+#include "net/cert/internal/cert_errors.h"
#include "net/cert/pem_tokenizer.h"
#include "net/der/input.h"
#include "net/der/parser.h"
@@ -23,14 +24,18 @@ namespace {
template <size_t N>
bool ParseDer(const uint8_t (&data)[N],
std::unique_ptr<SignatureAlgorithm>* out) {
- *out = SignatureAlgorithm::CreateFromDer(der::Input(data, N));
+ // TODO(crbug.com/634443): Test the errors.
+ CertErrors errors;
+ *out = SignatureAlgorithm::Create(der::Input(data, N), &errors);
return !!*out;
}
// Parses a SignatureAlgorithm given an empty DER input.
TEST(SignatureAlgorithmTest, ParseDerEmpty) {
+ // TODO(crbug.com/634443): Test the errors.
+ CertErrors errors;
std::unique_ptr<SignatureAlgorithm> algorithm =
- SignatureAlgorithm::CreateFromDer(der::Input());
+ SignatureAlgorithm::Create(der::Input(), &errors);
ASSERT_FALSE(algorithm);
}
« no previous file with comments | « net/cert/internal/signature_algorithm.cc ('k') | net/cert/internal/verify_certificate_chain.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698