OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |