proxygen
Extensions.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2018-present, Facebook, Inc.
3  * All rights reserved.
4  *
5  * This source code is licensed under the BSD-style license found in the
6  * LICENSE file in the root directory of this source tree.
7  */
8 
9 #pragma once
10 
11 #include <fizz/record/Types.h>
12 #include <folly/Optional.h>
13 
14 namespace fizz {
15 
17  std::vector<SignatureScheme> supported_signature_algorithms;
18  static constexpr ExtensionType extension_type =
20 };
21 
23  std::vector<NamedGroup> named_group_list;
24  static constexpr ExtensionType extension_type =
26 };
27 
28 struct KeyShareEntry {
31 };
32 
34  std::vector<KeyShareEntry> client_shares;
35 
36  bool preDraft23{false};
38 };
39 
42 
43  bool preDraft23{false};
45 };
46 
49 
50  bool preDraft23{false};
52 };
53 
54 struct PskIdentity {
57 };
58 
59 struct PskBinder {
61 };
62 
64  std::vector<PskIdentity> identities;
65  std::vector<PskBinder> binders;
67 };
68 
72 };
73 
76 };
77 
80 };
81 
85 };
86 
87 struct Cookie {
90 };
91 
93  std::vector<ProtocolVersion> versions;
94  static constexpr ExtensionType extension_type =
96 };
97 
100  static constexpr ExtensionType extension_type =
102 };
103 
105  std::vector<PskKeyExchangeMode> modes;
106  static constexpr ExtensionType extension_type =
108 };
109 
110 struct ProtocolName {
112 };
113 
115  std::vector<ProtocolName> protocol_name_list;
116  static constexpr ExtensionType extension_type =
118 };
119 
120 enum class ServerNameType : uint8_t { host_name = 0 };
121 
122 struct ServerName {
125 };
126 
128  std::vector<ServerName> server_name_list;
130 };
131 
134 };
135 
137  std::vector<DistinguishedName> authorities;
138  static constexpr ExtensionType extension_type =
140 };
141 
143  std::vector<CertificateCompressionAlgorithm> algorithms;
144  static constexpr ExtensionType extension_type =
146 };
147 
148 template <class T>
149 folly::Optional<T> getExtension(const std::vector<Extension>& extension);
150 template <class T>
152 
153 template <>
155  const std::vector<Extension>& extensions);
156 
157 template <class T>
158 Extension encodeExtension(const T& t);
159 
160 std::vector<Extension>::const_iterator findExtension(
161  const std::vector<Extension>& extensions,
163 
164 size_t getBinderLength(const ClientHello& chlo);
165 } // namespace fizz
166 
#define T(v)
Definition: http_parser.c:233
uint32_t obfuscated_ticket_age
Definition: Extensions.h:56
std::vector< Extension >::const_iterator findExtension(const std::vector< Extension > &extensions, ExtensionType type)
std::vector< PskBinder > binders
Definition: Extensions.h:65
size_t getBinderLength(const ClientHello &chlo)
uint32_t max_early_data_size
Definition: Extensions.h:83
ServerNameType
Definition: Extensions.h:120
static const std::string chlo
PskType type
KeyShareEntry server_share
Definition: Extensions.h:41
NamedGroup
Definition: Types.h:302
std::vector< PskKeyExchangeMode > modes
Definition: Extensions.h:105
std::vector< NamedGroup > named_group_list
Definition: Extensions.h:23
std::vector< KeyShareEntry > client_shares
Definition: Extensions.h:34
NamedGroup group
Definition: Extensions.h:29
folly::Optional< TokenBindingParameters > getExtension(const std::vector< Extension > &extensions)
Definition: Types.cpp:99
ProtocolVersion
Definition: Types.h:24
ProtocolVersion selected_version
Definition: Extensions.h:99
std::vector< SignatureScheme > supported_signature_algorithms
Definition: Extensions.h:17
Definition: Actions.h:16
static constexpr ExtensionType extension_type
Definition: Extensions.h:18
std::vector< ProtocolVersion > versions
Definition: Extensions.h:93
ExtensionType
Definition: Types.h:95
std::unique_ptr< folly::IOBuf > Buf
Definition: Types.h:22
std::vector< ProtocolName > protocol_name_list
Definition: Extensions.h:115
std::vector< PskIdentity > identities
Definition: Extensions.h:64
std::vector< DistinguishedName > authorities
Definition: Extensions.h:137
Extension encodeExtension(const TokenBindingParameters &params)
Definition: Types.cpp:113
std::vector< CertificateCompressionAlgorithm > algorithms
Definition: Extensions.h:143
std::vector< ServerName > server_name_list
Definition: Extensions.h:128