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

Unified Diff: crypto/ec_signature_creator_unittest.cc

Issue 2608453002: Remove the password parameter for ECPrivateKey::ExportEncryptedPrivateKey. (Closed)
Patch Set: fmt Created 4 years 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: crypto/ec_signature_creator_unittest.cc
diff --git a/crypto/ec_signature_creator_unittest.cc b/crypto/ec_signature_creator_unittest.cc
index 018ba54a23cab185c49aceac0b4483d899cf737a..1bfd89d0a764d13b8dd576f9b84162a3ecd6590d 100644
--- a/crypto/ec_signature_creator_unittest.cc
+++ b/crypto/ec_signature_creator_unittest.cc
@@ -21,23 +21,19 @@ TEST(ECSignatureCreatorTest, BasicTest) {
// Do a verify round trip.
std::unique_ptr<crypto::ECPrivateKey> key_original(
crypto::ECPrivateKey::Create());
- ASSERT_TRUE(key_original.get());
+ ASSERT_TRUE(key_original);
std::vector<uint8_t> key_info;
- ASSERT_TRUE(
- key_original->ExportEncryptedPrivateKey(std::string(), 1000, &key_info));
- std::vector<uint8_t> pubkey_info;
- ASSERT_TRUE(key_original->ExportPublicKey(&pubkey_info));
+ ASSERT_TRUE(key_original->ExportPrivateKey(&key_info));
std::unique_ptr<crypto::ECPrivateKey> key(
- crypto::ECPrivateKey::CreateFromEncryptedPrivateKeyInfo(
- std::string(), key_info, pubkey_info));
- ASSERT_TRUE(key.get());
- ASSERT_TRUE(key->key() != NULL);
+ crypto::ECPrivateKey::CreateFromPrivateKeyInfo(key_info));
+ ASSERT_TRUE(key);
+ ASSERT_TRUE(key->key());
std::unique_ptr<crypto::ECSignatureCreator> signer(
crypto::ECSignatureCreator::Create(key.get()));
- ASSERT_TRUE(signer.get());
+ ASSERT_TRUE(signer);
std::string data("Hello, World!");
std::vector<uint8_t> signature;

Powered by Google App Engine
This is Rietveld 408576698