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

Unified Diff: net/cert/internal/verify_signed_data_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/verify_certificate_chain.cc ('k') | net/cert/x509_util_openssl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/internal/verify_signed_data_unittest.cc
diff --git a/net/cert/internal/verify_signed_data_unittest.cc b/net/cert/internal/verify_signed_data_unittest.cc
index 85d07fc5ea2442c4bbf776da9431e2ba39fccee8..470aec4e634d7ac6383818cadcd5e6159c436aa5 100644
--- a/net/cert/internal/verify_signed_data_unittest.cc
+++ b/net/cert/internal/verify_signed_data_unittest.cc
@@ -55,9 +55,10 @@ void RunTestCaseUsingPolicy(VerifyResult expected_result,
ASSERT_TRUE(ReadTestDataFromPemFile(path, mappings));
+ CertErrors algorithm_errors;
std::unique_ptr<SignatureAlgorithm> signature_algorithm =
- SignatureAlgorithm::CreateFromDer(der::Input(&algorithm));
- ASSERT_TRUE(signature_algorithm);
+ SignatureAlgorithm::Create(der::Input(&algorithm), &algorithm_errors);
+ ASSERT_TRUE(signature_algorithm) << algorithm_errors.ToDebugString();
der::BitString signature_value_bit_string;
der::Parser signature_value_parser((der::Input(&signature_value)));
@@ -67,11 +68,11 @@ void RunTestCaseUsingPolicy(VerifyResult expected_result,
bool expected_result_bool = expected_result == SUCCESS;
// TODO(crbug.com/634443): Verify the returned errors.
- CertErrors errors;
+ CertErrors verify_errors;
EXPECT_EQ(expected_result_bool,
VerifySignedData(*signature_algorithm, der::Input(&signed_data),
signature_value_bit_string,
- der::Input(&public_key), policy, &errors));
+ der::Input(&public_key), policy, &verify_errors));
}
// RunTestCase() is the same as RunTestCaseUsingPolicy(), only it uses a
« no previous file with comments | « net/cert/internal/verify_certificate_chain.cc ('k') | net/cert/x509_util_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698