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

Unified Diff: crypto/ec_signature_creator_unittest.cc

Issue 10910226: crypto: change ECSignatureCreator defaults to match SPDY. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 8 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 | « crypto/ec_signature_creator_openssl.cc ('k') | net/spdy/spdy_credential_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/ec_signature_creator_unittest.cc
diff --git a/crypto/ec_signature_creator_unittest.cc b/crypto/ec_signature_creator_unittest.cc
index 407b2781b2befcf29fec67203461dff576e9a1e9..df73bec86db572deaec0b141ced2c7c603e172b5 100644
--- a/crypto/ec_signature_creator_unittest.cc
+++ b/crypto/ec_signature_creator_unittest.cc
@@ -53,17 +53,17 @@ TEST(ECSignatureCreatorTest, BasicTest) {
std::vector<uint8> public_key_info;
ASSERT_TRUE(key_original->ExportPublicKey(&public_key_info));
- // This is the algorithm ID for SHA-1 with EC encryption.
- const uint8 kECDSAWithSHA1AlgorithmID[] = {
- 0x30, 0x0b,
- 0x06, 0x07,
- 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x01,
+ // This is the algorithm ID for SHA-256 with EC encryption.
+ const uint8 kECDSAWithSHA256AlgorithmID[] = {
+ 0x30, 0x0c,
+ 0x06, 0x08,
+ 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02,
0x05, 0x00
};
crypto::SignatureVerifier verifier;
ASSERT_TRUE(verifier.VerifyInit(
- kECDSAWithSHA1AlgorithmID, sizeof(kECDSAWithSHA1AlgorithmID),
- &signature.front(), signature.size(),
+ kECDSAWithSHA256AlgorithmID, sizeof(kECDSAWithSHA256AlgorithmID),
+ &signature[0], signature.size(),
&public_key_info.front(), public_key_info.size()));
verifier.VerifyUpdate(reinterpret_cast<const uint8*>(data.c_str()),
« no previous file with comments | « crypto/ec_signature_creator_openssl.cc ('k') | net/spdy/spdy_credential_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698