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

Unified Diff: components/gcm_driver/crypto/p256_key_util.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
« no previous file with comments | « no previous file | crypto/ec_private_key.h » ('j') | net/ssl/channel_id_service.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/gcm_driver/crypto/p256_key_util.cc
diff --git a/components/gcm_driver/crypto/p256_key_util.cc b/components/gcm_driver/crypto/p256_key_util.cc
index daf7e0ff720458d0e1b39349d4607179a542f00a..18f927d27f56deb6b94cb81a4b9d4964480a0e88 100644
--- a/components/gcm_driver/crypto/p256_key_util.cc
+++ b/components/gcm_driver/crypto/p256_key_util.cc
@@ -51,8 +51,7 @@ bool CreateP256KeyPair(std::string* out_private_key,
// Export the encrypted private key with an empty password. This is not done
// to provide any security, but rather to achieve a consistent private key
// storage between the BoringSSL and NSS implementations.
- if (!key_pair->ExportEncryptedPrivateKey(
- "" /* password */, 1 /* iteration */, &private_key)) {
+ if (!key_pair->ExportEncryptedPrivateKey(&private_key)) {
DLOG(ERROR) << "Unable to export the private key.";
return false;
}
@@ -100,7 +99,6 @@ bool ComputeSharedP256Secret(const base::StringPiece& private_key,
std::unique_ptr<crypto::ECPrivateKey> local_key_pair(
crypto::ECPrivateKey::CreateFromEncryptedPrivateKeyInfo(
- "" /* no password */,
std::vector<uint8_t>(private_key.data(),
private_key.data() + private_key.size()),
std::vector<uint8_t>(
« no previous file with comments | « no previous file | crypto/ec_private_key.h » ('j') | net/ssl/channel_id_service.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698