OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/quic/test_tools/crypto_test_utils.h" | 5 #include "net/quic/test_tools/crypto_test_utils.h" |
6 | 6 |
7 #include <openssl/bn.h> | 7 #include <openssl/bn.h> |
8 #include <openssl/ec.h> | 8 #include <openssl/ec.h> |
9 #include <openssl/ecdsa.h> | 9 #include <openssl/ecdsa.h> |
10 #include <openssl/evp.h> | 10 #include <openssl/evp.h> |
(...skipping 14 matching lines...) Expand all Loading... |
25 } | 25 } |
26 | 26 |
27 } // namespace anonymous | 27 } // namespace anonymous |
28 | 28 |
29 namespace net { | 29 namespace net { |
30 | 30 |
31 namespace test { | 31 namespace test { |
32 | 32 |
33 class TestChannelIDSigner : public ChannelIDSigner { | 33 class TestChannelIDSigner : public ChannelIDSigner { |
34 public: | 34 public: |
35 virtual ~TestChannelIDSigner() { } | 35 virtual ~TestChannelIDSigner() OVERRIDE { } |
36 | 36 |
37 // ChannelIDSigner implementation. | 37 // ChannelIDSigner implementation. |
38 | 38 |
39 virtual bool Sign(const string& hostname, | 39 virtual bool Sign(const string& hostname, |
40 StringPiece signed_data, | 40 StringPiece signed_data, |
41 string* out_key, | 41 string* out_key, |
42 string* out_signature) OVERRIDE { | 42 string* out_signature) OVERRIDE { |
43 crypto::ScopedOpenSSL<EVP_PKEY, EVP_PKEY_free> ecdsa_key( | 43 crypto::ScopedOpenSSL<EVP_PKEY, EVP_PKEY_free> ecdsa_key( |
44 HostnameToKey(hostname)); | 44 HostnameToKey(hostname)); |
45 | 45 |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 }; | 164 }; |
165 | 165 |
166 // static | 166 // static |
167 ChannelIDSigner* CryptoTestUtils::ChannelIDSignerForTesting() { | 167 ChannelIDSigner* CryptoTestUtils::ChannelIDSignerForTesting() { |
168 return new TestChannelIDSigner(); | 168 return new TestChannelIDSigner(); |
169 } | 169 } |
170 | 170 |
171 } // namespace test | 171 } // namespace test |
172 | 172 |
173 } // namespace net | 173 } // namespace net |
OLD | NEW |