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

Side by Side Diff: net/spdy/spdy_test_util_spdy3.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/spdy/spdy_credential_builder.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/spdy/spdy_test_util_spdy3.h" 5 #include "net/spdy/spdy_test_util_spdy3.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 signature->clear(); 56 signature->clear();
57 signature->insert(signature->end(), head.begin(), head.end()); 57 signature->insert(signature->end(), head.begin(), head.end());
58 signature->insert(signature->end(), private_key_value.begin(), 58 signature->insert(signature->end(), private_key_value.begin(),
59 private_key_value.end()); 59 private_key_value.end());
60 signature->insert(signature->end(), '-'); 60 signature->insert(signature->end(), '-');
61 signature->insert(signature->end(), data, data + data_len); 61 signature->insert(signature->end(), data, data + data_len);
62 signature->insert(signature->end(), tail.begin(), tail.end()); 62 signature->insert(signature->end(), tail.begin(), tail.end());
63 return true; 63 return true;
64 } 64 }
65 65
66 virtual bool DecodeSignature(const std::vector<uint8>& signature,
67 std::vector<uint8>* out_raw_sig) {
68 *out_raw_sig = signature;
69 return true;
70 }
71
66 private: 72 private:
67 crypto::ECPrivateKey* key_; 73 crypto::ECPrivateKey* key_;
68 74
69 DISALLOW_COPY_AND_ASSIGN(MockECSignatureCreator); 75 DISALLOW_COPY_AND_ASSIGN(MockECSignatureCreator);
70 }; 76 };
71 77
72 // An ECSignatureCreatorFactory creates MockECSignatureCreator. 78 // An ECSignatureCreatorFactory creates MockECSignatureCreator.
73 class MockECSignatureCreatorFactory : public crypto::ECSignatureCreatorFactory { 79 class MockECSignatureCreatorFactory : public crypto::ECSignatureCreatorFactory {
74 public: 80 public:
75 MockECSignatureCreatorFactory() {} 81 MockECSignatureCreatorFactory() {}
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 SpdyTestStateHelper::~SpdyTestStateHelper() { 1067 SpdyTestStateHelper::~SpdyTestStateHelper() {
1062 SpdySession::ResetStaticSettingsToInit(); 1068 SpdySession::ResetStaticSettingsToInit();
1063 // TODO(rch): save/restore this value 1069 // TODO(rch): save/restore this value
1064 BufferedSpdyFramer::set_enable_compression_default(true); 1070 BufferedSpdyFramer::set_enable_compression_default(true);
1065 crypto::ECSignatureCreator::SetFactoryForTesting(NULL); 1071 crypto::ECSignatureCreator::SetFactoryForTesting(NULL);
1066 } 1072 }
1067 1073
1068 } // namespace test_spdy3 1074 } // namespace test_spdy3
1069 1075
1070 } // namespace net 1076 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_credential_builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698