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

Side by Side Diff: net/quic/test_tools/crypto_test_utils_openssl.h

Issue 2328433006: This CL adds GFE token binding support for QUIC, similar to what was added for HTTPS and SPDY. (Closed)
Patch Set: Created 4 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
« no previous file with comments | « no previous file | 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
(Empty)
1 #ifndef NET_QUIC_TEST_TOOLS_CRYPTO_TEST_UTILS_OPENSSL_H_
2 #define NET_QUIC_TEST_TOOLS_CRYPTO_TEST_UTILS_OPENSSL_H_
3
4 #include <memory>
5
6 #include "net/quic/core/crypto/channel_id.h"
7 #include "net/quic/test_tools/crypto_test_utils.h"
8
9 #include "security/util/openssl_unique_ptr.h"
10 #include "third_party/openssl/evp.h"
11
12 namespace net {
13
14 namespace test {
15
16 class TestChannelIDKey : public ChannelIDKey {
17 public:
18 explicit TestChannelIDKey(EVP_PKEY* ecdsa_key) : ecdsa_key_(ecdsa_key) {}
19 ~TestChannelIDKey() override {}
20
21 // ChannelIDKey implementation.
22
23 bool Sign(base::StringPiece signed_data, std::string* out_signature) const ove rride;
24
25 std::string SerializeKey() const override;
26
27 const EVP_PKEY* get_evp_pkey() const { return ecdsa_key_.get(); }
28
29 private:
30 security::openssl_unique_ptr<EVP_PKEY> ecdsa_key_;
31 };
32
33 class TestChannelIDSource : public ChannelIDSource {
34 public:
35 ~TestChannelIDSource() override {}
36
37 // ChannelIDSource implementation.
38
39 QuicAsyncStatus GetChannelIDKey(
40 const std::string& hostname,
41 std::unique_ptr<ChannelIDKey>* channel_id_key,
42 ChannelIDSourceCallback* /*callback*/) override;
43
44 private:
45 static EVP_PKEY* HostnameToKey(const std::string& hostname);
46 };
47
48 } // namespace test
49 } // namespace net
50
51 #endif // NET_QUIC_TEST_TOOLS_CRYPTO_TEST_UTILS_OPENSSL_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698