OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #ifndef NET_QUIC_CORE_CRYPTO_CRYPTO_SERVER_CONFIG_PROTOBUF_H_ | 5 #ifndef NET_QUIC_CORE_CRYPTO_CRYPTO_SERVER_CONFIG_PROTOBUF_H_ |
6 #define NET_QUIC_CORE_CRYPTO_CRYPTO_SERVER_CONFIG_PROTOBUF_H_ | 6 #define NET_QUIC_CORE_CRYPTO_CRYPTO_SERVER_CONFIG_PROTOBUF_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <memory> | 11 #include <memory> |
12 #include <string> | 12 #include <string> |
13 #include <vector> | 13 #include <vector> |
14 | 14 |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
16 #include "base/macros.h" | 16 #include "base/macros.h" |
17 #include "base/memory/ptr_util.h" | 17 #include "base/memory/ptr_util.h" |
18 #include "base/strings/string_piece.h" | 18 #include "base/strings/string_piece.h" |
19 #include "net/base/net_export.h" | |
20 #include "net/quic/core/crypto/crypto_protocol.h" | 19 #include "net/quic/core/crypto/crypto_protocol.h" |
| 20 #include "net/quic/platform/api/quic_export.h" |
21 | 21 |
22 namespace net { | 22 namespace net { |
23 | 23 |
24 // QuicServerConfigProtobuf contains QUIC server config block and the private | 24 // QuicServerConfigProtobuf contains QUIC server config block and the private |
25 // keys needed to prove ownership. | 25 // keys needed to prove ownership. |
26 // TODO(rch): sync with server more rationally. | 26 // TODO(rch): sync with server more rationally. |
27 class NET_EXPORT_PRIVATE QuicServerConfigProtobuf { | 27 class QUIC_EXPORT_PRIVATE QuicServerConfigProtobuf { |
28 public: | 28 public: |
29 // PrivateKey contains a QUIC tag of a key exchange algorithm and a | 29 // PrivateKey contains a QUIC tag of a key exchange algorithm and a |
30 // serialised private key for that algorithm. The format of the serialised | 30 // serialised private key for that algorithm. The format of the serialised |
31 // private key is specific to the algorithm in question. | 31 // private key is specific to the algorithm in question. |
32 class NET_EXPORT_PRIVATE PrivateKey { | 32 class QUIC_EXPORT_PRIVATE PrivateKey { |
33 public: | 33 public: |
34 QuicTag tag() const { return tag_; } | 34 QuicTag tag() const { return tag_; } |
35 void set_tag(QuicTag tag) { tag_ = tag; } | 35 void set_tag(QuicTag tag) { tag_ = tag; } |
36 std::string private_key() const { return private_key_; } | 36 std::string private_key() const { return private_key_; } |
37 void set_private_key(const std::string& key) { private_key_ = key; } | 37 void set_private_key(const std::string& key) { private_key_ = key; } |
38 | 38 |
39 private: | 39 private: |
40 QuicTag tag_; | 40 QuicTag tag_; |
41 std::string private_key_; | 41 std::string private_key_; |
42 }; | 42 }; |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 // tokens when talking to clients that select this server config. | 107 // tokens when talking to clients that select this server config. |
108 // It can be of any length as it is fed into a KDF before use. | 108 // It can be of any length as it is fed into a KDF before use. |
109 std::string source_address_token_secret_override_; | 109 std::string source_address_token_secret_override_; |
110 | 110 |
111 DISALLOW_COPY_AND_ASSIGN(QuicServerConfigProtobuf); | 111 DISALLOW_COPY_AND_ASSIGN(QuicServerConfigProtobuf); |
112 }; | 112 }; |
113 | 113 |
114 } // namespace net | 114 } // namespace net |
115 | 115 |
116 #endif // NET_QUIC_CORE_CRYPTO_CRYPTO_SERVER_CONFIG_PROTOBUF_H_ | 116 #endif // NET_QUIC_CORE_CRYPTO_CRYPTO_SERVER_CONFIG_PROTOBUF_H_ |
OLD | NEW |