Botan 2.1.0 Crypto and TLS for C++11

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

tls_extensions.h
Go to the documentation of this file.
1 /*
2 * TLS Extensions
3 * (C) 2011,2012,2016 Jack Lloyd
4 * 2016 Juraj Somorovsky
5 * 2016 Matthias Gierlings
6 *
7 * Botan is released under the Simplified BSD License (see license.txt)
8 */
9
10 #ifndef BOTAN_TLS_EXTENSIONS_H__
11 #define BOTAN_TLS_EXTENSIONS_H__
12
13 #include <botan/secmem.h>
14 #include <botan/tls_magic.h>
15 #include <botan/ocsp.h>
16 #include <vector>
17 #include <string>
18 #include <map>
19 #include <set>
20
21 namespace Botan {
22
23 namespace TLS {
24
25 class TLS_Data_Reader;
26
27 enum Handshake_Extension_Type {
28 TLSEXT_SERVER_NAME_INDICATION = 0,
29 TLSEXT_CERT_STATUS_REQUEST = 5,
30
31 TLSEXT_CERTIFICATE_TYPES = 9,
32 TLSEXT_USABLE_ELLIPTIC_CURVES = 10,
33 TLSEXT_EC_POINT_FORMATS = 11,
34 TLSEXT_SRP_IDENTIFIER = 12,
35 TLSEXT_SIGNATURE_ALGORITHMS = 13,
36 TLSEXT_USE_SRTP = 14,
37 TLSEXT_ALPN = 16,
38
39 TLSEXT_ENCRYPT_THEN_MAC = 22,
40 TLSEXT_EXTENDED_MASTER_SECRET = 23,
41
42 TLSEXT_SESSION_TICKET = 35,
43
44 TLSEXT_SAFE_RENEGOTIATION = 65281,
45 };
46
47 /**
48 * Base class representing a TLS extension of some kind
49 */
50 class Extension
51 {
52 public:
53 /**
54 * @return code number of the extension
55 */
56 virtual Handshake_Extension_Type type() const = 0;
57
58 /**
59 * @return serialized binary for the extension
60 */
61 virtual std::vector<uint8_t> serialize() const = 0;
62
63 /**
64 * @return if we should encode this extension or not
65 */
66 virtual bool empty() const = 0;
67
68 virtual ~Extension() = default;
69 };
70
71 /**
72 * Server Name Indicator extension (RFC 3546)
73 */
74 class Server_Name_Indicator final : public Extension
75 {
76 public:
77 static Handshake_Extension_Type static_type()
78 { return TLSEXT_SERVER_NAME_INDICATION; }
79
80 Handshake_Extension_Type type() const override { return static_type(); }
81
82 explicit Server_Name_Indicator(const std::string& host_name) :
83 m_sni_host_name(host_name) {}
84
85 Server_Name_Indicator(TLS_Data_Reader& reader,
86 uint16_t extension_size);
87
88 std::string host_name() const { return m_sni_host_name; }
89
90 std::vector<uint8_t> serialize() const override;
91
92 bool empty() const override { return m_sni_host_name.empty(); }
93 private:
94 std::string m_sni_host_name;
95 };
96
97 #if defined(BOTAN_HAS_SRP6)
98 /**
99 * SRP identifier extension (RFC 5054)
100 */
101 class SRP_Identifier final : public Extension
102 {
103 public:
104 static Handshake_Extension_Type static_type()
105 { return TLSEXT_SRP_IDENTIFIER; }
106
107 Handshake_Extension_Type type() const override { return static_type(); }
108
109 explicit SRP_Identifier(const std::string& identifier) :
110 m_srp_identifier(identifier) {}
111
112 SRP_Identifier(TLS_Data_Reader& reader,
113 uint16_t extension_size);
114
115 std::string identifier() const { return m_srp_identifier; }
116
117 std::vector<uint8_t> serialize() const override;
118
119 bool empty() const override { return m_srp_identifier.empty(); }
120 private:
121 std::string m_srp_identifier;
122 };
123 #endif
124
125 /**
126 * Renegotiation Indication Extension (RFC 5746)
127 */
128 class Renegotiation_Extension final : public Extension
129 {
130 public:
131 static Handshake_Extension_Type static_type()
132 { return TLSEXT_SAFE_RENEGOTIATION; }
133
134 Handshake_Extension_Type type() const override { return static_type(); }
135
136 Renegotiation_Extension() = default;
137
138 explicit Renegotiation_Extension(const std::vector<uint8_t>& bits) :
139 m_reneg_data(bits) {}
140
141 Renegotiation_Extension(TLS_Data_Reader& reader,
142 uint16_t extension_size);
143
144 const std::vector<uint8_t>& renegotiation_info() const
145 { return m_reneg_data; }
146
147 std::vector<uint8_t> serialize() const override;
148
149 bool empty() const override { return false; } // always send this
150 private:
151 std::vector<uint8_t> m_reneg_data;
152 };
153
154 /**
155 * ALPN (RFC 7301)
156 */
157 class Application_Layer_Protocol_Notification final : public Extension
158 {
159 public:
160 static Handshake_Extension_Type static_type() { return TLSEXT_ALPN; }
161
162 Handshake_Extension_Type type() const override { return static_type(); }
163
164 const std::vector<std::string>& protocols() const { return m_protocols; }
165
166 const std::string& single_protocol() const;
167
168 /**
169 * Single protocol, used by server
170 */
171 explicit Application_Layer_Protocol_Notification(const std::string& protocol) :
172 m_protocols(1, protocol) {}
173
174 /**
175 * List of protocols, used by client
176 */
177 explicit Application_Layer_Protocol_Notification(const std::vector<std::string>& protocols) :
178 m_protocols(protocols) {}
179
180 Application_Layer_Protocol_Notification(TLS_Data_Reader& reader,
181 uint16_t extension_size);
182
183 std::vector<uint8_t> serialize() const override;
184
185 bool empty() const override { return m_protocols.empty(); }
186 private:
187 std::vector<std::string> m_protocols;
188 };
189
190 /**
191 * Session Ticket Extension (RFC 5077)
192 */
193 class Session_Ticket final : public Extension
194 {
195 public:
196 static Handshake_Extension_Type static_type()
197 { return TLSEXT_SESSION_TICKET; }
198
199 Handshake_Extension_Type type() const override { return static_type(); }
200
201 /**
202 * @return contents of the session ticket
203 */
204 const std::vector<uint8_t>& contents() const { return m_ticket; }
205
206 /**
207 * Create empty extension, used by both client and server
208 */
209 Session_Ticket() = default;
210
211 /**
212 * Extension with ticket, used by client
213 */
214 explicit Session_Ticket(const std::vector<uint8_t>& session_ticket) :
215 m_ticket(session_ticket) {}
216
217 /**
218 * Deserialize a session ticket
219 */
220 Session_Ticket(TLS_Data_Reader& reader, uint16_t extension_size);
221
222 std::vector<uint8_t> serialize() const override { return m_ticket; }
223
224 bool empty() const override { return false; }
225 private:
226 std::vector<uint8_t> m_ticket;
227 };
228
229 /**
230 * Supported Elliptic Curves Extension (RFC 4492)
231 */
232 class Supported_Elliptic_Curves final : public Extension
233 {
234 public:
235 static Handshake_Extension_Type static_type()
236 { return TLSEXT_USABLE_ELLIPTIC_CURVES; }
237
238 Handshake_Extension_Type type() const override { return static_type(); }
239
240 static std::string curve_id_to_name(uint16_t id);
241 static uint16_t name_to_curve_id(const std::string& name);
242
243 const std::vector<std::string>& curves() const { return m_curves; }
244
245 std::vector<uint8_t> serialize() const override;
246
247 explicit Supported_Elliptic_Curves(const std::vector<std::string>& curves) :
248 m_curves(curves) {}
249
250 Supported_Elliptic_Curves(TLS_Data_Reader& reader,
251 uint16_t extension_size);
252
253 bool empty() const override { return m_curves.empty(); }
254 private:
255 std::vector<std::string> m_curves;
256 };
257
258 /**
259 * Supported Point Formats Extension (RFC 4492)
260 */
261 class Supported_Point_Formats final : public Extension
262 {
263 public:
264 enum ECPointFormat : uint8_t {
265 UNCOMPRESSED = 0,
266 ANSIX962_COMPRESSED_PRIME = 1,
267 ANSIX962_COMPRESSED_CHAR2 = 2, // don't support these curves
268 };
269
270 static Handshake_Extension_Type static_type()
271 { return TLSEXT_EC_POINT_FORMATS; }
272
273 Handshake_Extension_Type type() const override { return static_type(); }
274
275 std::vector<uint8_t> serialize() const override;
276
277 explicit Supported_Point_Formats(bool prefer_compressed) :
278 m_prefers_compressed(prefer_compressed) {}
279
280 Supported_Point_Formats(TLS_Data_Reader& reader,
281 uint16_t extension_size);
282
283 bool empty() const override { return false; }
284
285 bool prefers_compressed() { return m_prefers_compressed; }
286
287 private:
288 bool m_prefers_compressed = false;
289 };
290
291 /**
292 * Signature Algorithms Extension for TLS 1.2 (RFC 5246)
293 */
294 class Signature_Algorithms final : public Extension
295 {
296 public:
297 static Handshake_Extension_Type static_type()
298 { return TLSEXT_SIGNATURE_ALGORITHMS; }
299
300 Handshake_Extension_Type type() const override { return static_type(); }
301
302 static std::string hash_algo_name(uint8_t code);
303 static uint8_t hash_algo_code(const std::string& name);
304
305 static std::string sig_algo_name(uint8_t code);
306 static uint8_t sig_algo_code(const std::string& name);
307
308 // [(hash,sig),(hash,sig),...]
309 const std::vector<std::pair<std::string, std::string>>&
310 supported_signature_algorthms() const
311 {
312 return m_supported_algos;
313 }
314
315 std::vector<uint8_t> serialize() const override;
316
317 bool empty() const override { return false; }
318
319 Signature_Algorithms(const std::vector<std::string>& hashes,
320 const std::vector<std::string>& sig_algos);
321
322 explicit Signature_Algorithms(const std::vector<std::pair<std::string, std::string>>& algos) :
323 m_supported_algos(algos) {}
324
325 Signature_Algorithms(TLS_Data_Reader& reader,
326 uint16_t extension_size);
327 private:
328 std::vector<std::pair<std::string, std::string>> m_supported_algos;
329 };
330
331 /**
332 * Used to indicate SRTP algorithms for DTLS (RFC 5764)
333 */
334 class SRTP_Protection_Profiles final : public Extension
335 {
336 public:
337 static Handshake_Extension_Type static_type()
338 { return TLSEXT_USE_SRTP; }
339
340 Handshake_Extension_Type type() const override { return static_type(); }
341
342 const std::vector<uint16_t>& profiles() const { return m_pp; }
343
344 std::vector<uint8_t> serialize() const override;
345
346 bool empty() const override { return m_pp.empty(); }
347
348 explicit SRTP_Protection_Profiles(const std::vector<uint16_t>& pp) : m_pp(pp) {}
349
350 explicit SRTP_Protection_Profiles(uint16_t pp) : m_pp(1, pp) {}
351
352 SRTP_Protection_Profiles(TLS_Data_Reader& reader, uint16_t extension_size);
353 private:
354 std::vector<uint16_t> m_pp;
355 };
356
357 /**
358 * Extended Master Secret Extension (RFC 7627)
359 */
360 class Extended_Master_Secret final : public Extension
361 {
362 public:
363 static Handshake_Extension_Type static_type()
364 { return TLSEXT_EXTENDED_MASTER_SECRET; }
365
366 Handshake_Extension_Type type() const override { return static_type(); }
367
368 std::vector<uint8_t> serialize() const override;
369
370 bool empty() const override { return false; }
371
372 Extended_Master_Secret() = default;
373
374 Extended_Master_Secret(TLS_Data_Reader& reader, uint16_t extension_size);
375 };
376
377 /**
378 * Encrypt-then-MAC Extension (RFC 7366)
379 */
380 class Encrypt_then_MAC final : public Extension
381 {
382 public:
383 static Handshake_Extension_Type static_type()
384 { return TLSEXT_ENCRYPT_THEN_MAC; }
385
386 Handshake_Extension_Type type() const override { return static_type(); }
387
388 std::vector<uint8_t> serialize() const override;
389
390 bool empty() const override { return false; }
391
392 Encrypt_then_MAC() = default;
393
394 Encrypt_then_MAC(TLS_Data_Reader& reader, uint16_t extension_size);
395 };
396
397 /**
398 * Certificate Status Request (RFC 6066)
399 */
400 class Certificate_Status_Request final : public Extension
401 {
402 public:
403 static Handshake_Extension_Type static_type()
404 { return TLSEXT_CERT_STATUS_REQUEST; }
405
406 Handshake_Extension_Type type() const override { return static_type(); }
407
408 std::vector<uint8_t> serialize() const override;
409
410 bool empty() const override { return false; }
411
412 // Server generated version: empty
413 Certificate_Status_Request();
414
415 // Client version, both lists can be empty
416 Certificate_Status_Request(const std::vector<X509_DN>& ocsp_responder_ids,
417 const std::vector<std::vector<uint8_t>>& ocsp_key_ids);
418
419 Certificate_Status_Request(TLS_Data_Reader& reader, uint16_t extension_size);
420 private:
421 std::vector<X509_DN> m_ocsp_names;
422 std::vector<std::vector<uint8_t>> m_ocsp_keys;
423 std::vector<uint8_t> m_extension_bytes;
424 bool m_server_side;
425 };
426
427 /**
428 * Represents a block of extensions in a hello message
429 */
430 class BOTAN_DLL Extensions
431 {
432 public:
433 std::set<Handshake_Extension_Type> extension_types() const;
434
435 template<typename T>
436 T* get() const
437 {
438 Handshake_Extension_Type type = T::static_type();
439
440 auto i = m_extensions.find(type);
441
442 if(i != m_extensions.end())
443 return dynamic_cast<T*>(i->second.get());
444 return nullptr;
445 }
446
447 template<typename T>
448 bool has() const
449 {
450 return get<T>() != nullptr;
451 }
452
453 void add(Extension* extn)
454 {
455 m_extensions[extn->type()].reset(extn);
456 }
457
458 std::vector<uint8_t> serialize() const;
459
460 void deserialize(TLS_Data_Reader& reader);
461
462 Extensions() = default;
463
464 explicit Extensions(TLS_Data_Reader& reader) { deserialize(reader); }
465
466 private:
467 Extensions(const Extensions&) = delete;
468 Extensions& operator=(const Extensions&) = delete;
469
470 std::map<Handshake_Extension_Type, std::unique_ptr<Extension>> m_extensions;
471 };
472
473 }
474
475 }
476
477 #endif
Botan::TLS::Supported_Point_Formats::ANSIX962_COMPRESSED_PRIME
Definition: tls_extensions.h:266
Botan::TLS::Certificate_Status_Request::serialize
std::vector< uint8_t > serialize() const override
Definition: tls_extensions.cpp:620
Botan::TLS::Extended_Master_Secret::serialize
std::vector< uint8_t > serialize() const override
Definition: tls_extensions.cpp:603
Botan::TLS::Signature_Algorithms::sig_algo_code
static uint8_t sig_algo_code(const std::string &name)
Definition: tls_extensions.cpp:481
Botan::TLS::Supported_Point_Formats::static_type
static Handshake_Extension_Type static_type()
Definition: tls_extensions.h:270
Botan::TLS::Extended_Master_Secret::empty
bool empty() const override
Definition: tls_extensions.h:370
Botan::TLS::Certificate_Status_Request::static_type
static Handshake_Extension_Type static_type()
Definition: tls_extensions.h:403
Botan::TLS::Extension::serialize
virtual std::vector< uint8_t > serialize() const =0
Botan::TLS::Extensions::Extensions
Extensions(TLS_Data_Reader &reader)
Definition: tls_extensions.h:464
Botan::TLS::Certificate_Status_Request::type
Handshake_Extension_Type type() const override
Definition: tls_extensions.h:406
Botan::TLS::Session_Ticket::serialize
std::vector< uint8_t > serialize() const override
Definition: tls_extensions.h:222
Botan::TLS::TLSEXT_ENCRYPT_THEN_MAC
Definition: tls_extensions.h:39
Botan::TLS::SRTP_Protection_Profiles::profiles
const std::vector< uint16_t > & profiles() const
Definition: tls_extensions.h:342
Botan::TLS::Server_Name_Indicator::Server_Name_Indicator
Server_Name_Indicator(const std::string &host_name)
Definition: tls_extensions.h:82
Botan::TLS::Server_Name_Indicator::type
Handshake_Extension_Type type() const override
Definition: tls_extensions.h:80
Botan::TLS::Encrypt_then_MAC
Definition: tls_extensions.h:380
Botan::TLS::TLSEXT_EC_POINT_FORMATS
Definition: tls_extensions.h:33
Botan::TLS::Application_Layer_Protocol_Notification::empty
bool empty() const override
Definition: tls_extensions.h:185
Botan::TLS::TLSEXT_CERT_STATUS_REQUEST
Definition: tls_extensions.h:29
Botan::TLS::Extensions::has
bool has() const
Definition: tls_extensions.h:448
Botan::TLS::Application_Layer_Protocol_Notification::single_protocol
const std::string & single_protocol() const
Definition: tls_extensions.cpp:250
Botan::TLS::Supported_Elliptic_Curves::curves
const std::vector< std::string > & curves() const
Definition: tls_extensions.h:243
Botan::TLS::Supported_Elliptic_Curves::Supported_Elliptic_Curves
Supported_Elliptic_Curves(const std::vector< std::string > &curves)
Definition: tls_extensions.h:247
Botan::TLS::SRTP_Protection_Profiles::type
Handshake_Extension_Type type() const override
Definition: tls_extensions.h:340
Botan::TLS::Extensions::add
void add(Extension *extn)
Definition: tls_extensions.h:453
Botan::TLS::Supported_Elliptic_Curves::name_to_curve_id
static uint16_t name_to_curve_id(const std::string &name)
Definition: tls_extensions.cpp:312
Botan::TLS::Renegotiation_Extension
Definition: tls_extensions.h:128
Botan::TLS::Session_Ticket::Session_Ticket
Session_Ticket()=default
Botan::TLS::Signature_Algorithms::supported_signature_algorthms
const std::vector< std::pair< std::string, std::string > > & supported_signature_algorthms() const
Definition: tls_extensions.h:310
Botan::TLS::Server_Name_Indicator::static_type
static Handshake_Extension_Type static_type()
Definition: tls_extensions.h:77
Botan::TLS::Application_Layer_Protocol_Notification
Definition: tls_extensions.h:157
Botan::TLS::TLSEXT_SESSION_TICKET
Definition: tls_extensions.h:42
Botan::TLS::Session_Ticket
Definition: tls_extensions.h:193
type
MechanismType type
Definition: p11_mechanism.cpp:43
Botan::TLS::TLSEXT_USABLE_ELLIPTIC_CURVES
Definition: tls_extensions.h:32
Botan::TLS::TLSEXT_SERVER_NAME_INDICATION
Definition: tls_extensions.h:28
Botan::TLS::Certificate_Status_Request::Certificate_Status_Request
Certificate_Status_Request()
Definition: tls_extensions.cpp:672
Botan::TLS::Application_Layer_Protocol_Notification::serialize
std::vector< uint8_t > serialize() const override
Definition: tls_extensions.cpp:259
Botan::TLS::Signature_Algorithms::hash_algo_code
static uint8_t hash_algo_code(const std::string &name)
Definition: tls_extensions.cpp:449
Botan::TLS::Supported_Point_Formats
Definition: tls_extensions.h:261
Botan::TLS::Extended_Master_Secret::Extended_Master_Secret
Extended_Master_Secret()=default
Botan::TLS::Renegotiation_Extension::serialize
std::vector< uint8_t > serialize() const override
Definition: tls_extensions.cpp:217
Botan::TLS::Supported_Elliptic_Curves::curve_id_to_name
static std::string curve_id_to_name(uint16_t id)
Definition: tls_extensions.cpp:280
Botan::TLS::Server_Name_Indicator::empty
bool empty() const override
Definition: tls_extensions.h:92
Botan::TLS::SRTP_Protection_Profiles
Definition: tls_extensions.h:334
Botan::TLS::Extended_Master_Secret::type
Handshake_Extension_Type type() const override
Definition: tls_extensions.h:366
Botan::TLS::Session_Ticket::type
Handshake_Extension_Type type() const override
Definition: tls_extensions.h:199
Botan::TLS::Extension::~Extension
virtual ~Extension()=default
Botan::TLS::Extended_Master_Secret
Definition: tls_extensions.h:360
Botan::TLS::Extension::type
virtual Handshake_Extension_Type type() const =0
Botan::TLS::TLSEXT_SIGNATURE_ALGORITHMS
Definition: tls_extensions.h:35
Botan::TLS::Signature_Algorithms::Signature_Algorithms
Signature_Algorithms(const std::vector< std::pair< std::string, std::string >> &algos)
Definition: tls_extensions.h:322
Botan::TLS::Signature_Algorithms::serialize
std::vector< uint8_t > serialize() const override
Definition: tls_extensions.cpp:495
Botan::TLS::TLSEXT_SRP_IDENTIFIER
Definition: tls_extensions.h:34
Botan::TLS::Session_Ticket::contents
const std::vector< uint8_t > & contents() const
Definition: tls_extensions.h:204
Botan::TLS::Extended_Master_Secret::static_type
static Handshake_Extension_Type static_type()
Definition: tls_extensions.h:363
Botan::TLS::Application_Layer_Protocol_Notification::Application_Layer_Protocol_Notification
Application_Layer_Protocol_Notification(const std::string &protocol)
Definition: tls_extensions.h:171
Botan::TLS::Extensions
Definition: tls_extensions.h:430
Botan::TLS::Application_Layer_Protocol_Notification::static_type
static Handshake_Extension_Type static_type()
Definition: tls_extensions.h:160
Botan::TLS::Server_Name_Indicator::serialize
std::vector< uint8_t > serialize() const override
Definition: tls_extensions.cpp:167
Botan::TLS::Supported_Point_Formats::ECPointFormat
ECPointFormat
Definition: tls_extensions.h:264
Botan::TLS::Session_Ticket::static_type
static Handshake_Extension_Type static_type()
Definition: tls_extensions.h:196
Botan::TLS::Signature_Algorithms::empty
bool empty() const override
Definition: tls_extensions.h:317
Botan::TLS::Signature_Algorithms::static_type
static Handshake_Extension_Type static_type()
Definition: tls_extensions.h:297
Botan
Definition: alg_id.cpp:13
Botan::TLS::Session_Ticket::Session_Ticket
Session_Ticket(const std::vector< uint8_t > &session_ticket)
Definition: tls_extensions.h:214
Botan::TLS::Signature_Algorithms::Signature_Algorithms
Signature_Algorithms(const std::vector< std::string > &hashes, const std::vector< std::string > &sig_algos)
Definition: tls_extensions.cpp:519
Botan::TLS::Renegotiation_Extension::Renegotiation_Extension
Renegotiation_Extension()=default
Botan::TLS::SRTP_Protection_Profiles::SRTP_Protection_Profiles
SRTP_Protection_Profiles(uint16_t pp)
Definition: tls_extensions.h:350
Botan::TLS::Supported_Point_Formats::ANSIX962_COMPRESSED_CHAR2
Definition: tls_extensions.h:267
Botan::TLS::Extension::empty
virtual bool empty() const =0
Botan::TLS::TLSEXT_SAFE_RENEGOTIATION
Definition: tls_extensions.h:44
Botan::TLS::Signature_Algorithms::type
Handshake_Extension_Type type() const override
Definition: tls_extensions.h:300
Botan::TLS::Signature_Algorithms::sig_algo_name
static std::string sig_algo_name(uint8_t code)
Definition: tls_extensions.cpp:466
Botan::TLS::Supported_Point_Formats::serialize
std::vector< uint8_t > serialize() const override
Definition: tls_extensions.cpp:385
Botan::TLS::Encrypt_then_MAC::type
Handshake_Extension_Type type() const override
Definition: tls_extensions.h:386
Botan::TLS::TLSEXT_ALPN
Definition: tls_extensions.h:37
Botan::TLS::TLSEXT_EXTENDED_MASTER_SECRET
Definition: tls_extensions.h:40
Botan::TLS::Server_Name_Indicator
Definition: tls_extensions.h:74
Botan::TLS::TLS_Data_Reader
Definition: tls_reader.h:24
Botan::TLS::Session_Ticket::empty
bool empty() const override
Definition: tls_extensions.h:224
Botan::TLS::Supported_Elliptic_Curves::serialize
std::vector< uint8_t > serialize() const override
Definition: tls_extensions.cpp:341
Botan::TLS::Encrypt_then_MAC::serialize
std::vector< uint8_t > serialize() const override
Definition: tls_extensions.cpp:615
Botan::TLS::Supported_Elliptic_Curves
Definition: tls_extensions.h:232
Botan::TLS::Encrypt_then_MAC::empty
bool empty() const override
Definition: tls_extensions.h:390
Botan::TLS::Signature_Algorithms
Definition: tls_extensions.h:294
Botan::TLS::Supported_Elliptic_Curves::type
Handshake_Extension_Type type() const override
Definition: tls_extensions.h:238
Botan::TLS::Certificate_Status_Request
Definition: tls_extensions.h:400
Botan::TLS::Server_Name_Indicator::host_name
std::string host_name() const
Definition: tls_extensions.h:88
Botan::TLS::Encrypt_then_MAC::Encrypt_then_MAC
Encrypt_then_MAC()=default
Botan::TLS::SRTP_Protection_Profiles::SRTP_Protection_Profiles
SRTP_Protection_Profiles(const std::vector< uint16_t > &pp)
Definition: tls_extensions.h:348
Botan::TLS::SRTP_Protection_Profiles::static_type
static Handshake_Extension_Type static_type()
Definition: tls_extensions.h:337
Botan::TLS::Supported_Point_Formats::type
Handshake_Extension_Type type() const override
Definition: tls_extensions.h:273
Botan::TLS::SRTP_Protection_Profiles::empty
bool empty() const override
Definition: tls_extensions.h:346
Botan::TLS::Application_Layer_Protocol_Notification::protocols
const std::vector< std::string > & protocols() const
Definition: tls_extensions.h:164
Botan::TLS::Extension
Definition: tls_extensions.h:50
Botan::TLS::Supported_Elliptic_Curves::static_type
static Handshake_Extension_Type static_type()
Definition: tls_extensions.h:235
Botan::TLS::Supported_Point_Formats::empty
bool empty() const override
Definition: tls_extensions.h:283
Botan::TLS::Renegotiation_Extension::type
Handshake_Extension_Type type() const override
Definition: tls_extensions.h:134
Botan::TLS::SRTP_Protection_Profiles::serialize
std::vector< uint8_t > serialize() const override
Definition: tls_extensions.cpp:577
Botan::TLS::TLSEXT_USE_SRTP
Definition: tls_extensions.h:36
Botan::TLS::Supported_Elliptic_Curves::empty
bool empty() const override
Definition: tls_extensions.h:253
Botan::TLS::Certificate_Status_Request::empty
bool empty() const override
Definition: tls_extensions.h:410
Botan::TLS::Application_Layer_Protocol_Notification::type
Handshake_Extension_Type type() const override
Definition: tls_extensions.h:162
Botan::TLS::Encrypt_then_MAC::static_type
static Handshake_Extension_Type static_type()
Definition: tls_extensions.h:383
Botan::TLS::Supported_Point_Formats::Supported_Point_Formats
Supported_Point_Formats(bool prefer_compressed)
Definition: tls_extensions.h:277
Botan::TLS::Supported_Point_Formats::prefers_compressed
bool prefers_compressed()
Definition: tls_extensions.h:285
Botan::TLS::TLSEXT_CERTIFICATE_TYPES
Definition: tls_extensions.h:31
Botan::TLS::Handshake_Extension_Type
Handshake_Extension_Type
Definition: tls_extensions.h:27
Botan::TLS::Renegotiation_Extension::empty
bool empty() const override
Definition: tls_extensions.h:149
Botan::TLS::Signature_Algorithms::hash_algo_name
static std::string hash_algo_name(uint8_t code)
Definition: tls_extensions.cpp:427
Botan::TLS::Renegotiation_Extension::static_type
static Handshake_Extension_Type static_type()
Definition: tls_extensions.h:131
Botan::TLS::Renegotiation_Extension::renegotiation_info
const std::vector< uint8_t > & renegotiation_info() const
Definition: tls_extensions.h:144
Botan::TLS::Supported_Point_Formats::UNCOMPRESSED
Definition: tls_extensions.h:265
Botan::TLS::Application_Layer_Protocol_Notification::Application_Layer_Protocol_Notification
Application_Layer_Protocol_Notification(const std::vector< std::string > &protocols)
Definition: tls_extensions.h:177
Botan::TLS::Renegotiation_Extension::Renegotiation_Extension
Renegotiation_Extension(const std::vector< uint8_t > &bits)
Definition: tls_extensions.h:138