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

Unified Diff: net/spdy/spdy_test_util_common.cc

Issue 1935053003: Add PKCS#8 ECPrivateKey export/import functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix build Created 4 years, 6 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 | « crypto/rsa_private_key.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_test_util_common.cc
diff --git a/net/spdy/spdy_test_util_common.cc b/net/spdy/spdy_test_util_common.cc
index 3f4b9e67c0f57c04ee0366c9a852a5dde1e7a9a2..05540982bf9cd93a5958ec9fc1f73586b8a9a2f7 100644
--- a/net/spdy/spdy_test_util_common.cc
+++ b/net/spdy/spdy_test_util_common.cc
@@ -295,16 +295,15 @@ MockECSignatureCreator::MockECSignatureCreator(crypto::ECPrivateKey* key)
bool MockECSignatureCreator::Sign(const uint8_t* data,
int data_len,
std::vector<uint8_t>* signature) {
- std::vector<uint8_t> private_key_value;
- if (!key_->ExportValueForTesting(&private_key_value))
+ std::vector<uint8_t> private_key;
+ if (!key_->ExportPrivateKey(&private_key))
return false;
std::string head = "fakesignature";
std::string tail = "/fakesignature";
signature->clear();
signature->insert(signature->end(), head.begin(), head.end());
- signature->insert(signature->end(), private_key_value.begin(),
- private_key_value.end());
+ signature->insert(signature->end(), private_key.begin(), private_key.end());
signature->insert(signature->end(), '-');
signature->insert(signature->end(), data, data + data_len);
signature->insert(signature->end(), tail.begin(), tail.end());
« no previous file with comments | « crypto/rsa_private_key.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698