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

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

Issue 1573243011: Refactor der::Input helper methods into new constructors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix nits Created 4 years, 11 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_unittest.cc ('k') | net/der/input.h » ('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 a718c779a51dcd736fe7821556ad685f187c52b9..d7e822869cd7de9f418b5c9964b688d0152ddc59 100644
--- a/net/cert/internal/verify_signed_data_unittest.cc
+++ b/net/cert/internal/verify_signed_data_unittest.cc
@@ -61,21 +61,20 @@ void RunTestCaseUsingPolicy(VerifyResult expected_result,
ASSERT_TRUE(ReadTestDataFromPemFile(path, mappings));
scoped_ptr<SignatureAlgorithm> signature_algorithm =
- SignatureAlgorithm::CreateFromDer(InputFromString(&algorithm));
+ SignatureAlgorithm::CreateFromDer(der::Input(&algorithm));
ASSERT_TRUE(signature_algorithm);
der::BitString signature_value_bit_string;
- der::Parser signature_value_parser(InputFromString(&signature_value));
+ der::Parser signature_value_parser((der::Input(&signature_value)));
ASSERT_TRUE(signature_value_parser.ReadBitString(&signature_value_bit_string))
<< "The signature value is not a valid BIT STRING";
bool expected_result_bool = expected_result == SUCCESS;
- EXPECT_EQ(
- expected_result_bool,
- VerifySignedData(*signature_algorithm, InputFromString(&signed_data),
- signature_value_bit_string, InputFromString(&public_key),
- policy));
+ EXPECT_EQ(expected_result_bool,
+ VerifySignedData(*signature_algorithm, der::Input(&signed_data),
+ signature_value_bit_string,
+ der::Input(&public_key), policy));
}
// RunTestCase() is the same as RunTestCaseUsingPolicy(), only it uses a
« no previous file with comments | « net/cert/internal/verify_certificate_chain_unittest.cc ('k') | net/der/input.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698