Botan 3.5.0
Crypto and TLS for C&
tls_policy.h
Go to the documentation of this file.
1/*
2* Hooks for application level policies on TLS connections
3* (C) 2004-2006,2013 Jack Lloyd
4* 2017 Harry Reimann, Rohde & Schwarz Cybersecurity
5* 2022 René Meusel, Rohde & Schwarz Cybersecurity
6*
7* Botan is released under the Simplified BSD License (see license.txt)
8*/
9
10#ifndef BOTAN_TLS_POLICY_H_
11#define BOTAN_TLS_POLICY_H_
12
13#include <botan/tls_ciphersuite.h>
14#include <botan/tls_extensions.h>
15#include <botan/tls_signature_scheme.h>
16#include <botan/tls_version.h>
17#include <chrono>
18#include <map>
19#include <optional>
20#include <vector>
21
22namespace Botan {
23
24class Public_Key;
25
26namespace TLS {
27
28/**
29* TLS Policy Base Class
30* Inherit and overload as desired to suit local policy concerns
31*/
33 public:
34 /**
35 * Allow ssl key log file
36 * @note If function returns true, then Callbacks::tls_ssl_key_log_data
37 * will be invoked containing secret information for logging purposes
38 */
39 virtual bool allow_ssl_key_log_file() const;
40
41 /**
42 * Returns a list of ciphers we are willing to negotiate, in
43 * order of preference.
44 */
45 virtual std::vector<std::string> allowed_ciphers() const;
46
47 /**
48 * Returns a list of hash algorithms we are willing to use for
49 * signatures, in order of preference.
50 */
51 virtual std::vector<std::string> allowed_signature_hashes() const;
52
53 /**
54 * Returns a list of MAC algorithms we are willing to use.
55 */
56 virtual std::vector<std::string> allowed_macs() const;
57
58 /**
59 * Returns a list of key exchange algorithms we are willing to
60 * use, in order of preference. Allowed values: DH, empty string
61 * (representing RSA using server certificate key)
62 */
63 virtual std::vector<std::string> allowed_key_exchange_methods() const;
64
65 /**
66 * Returns a list of signature algorithms we are willing to
67 * use, in order of preference.
68 */
69 virtual std::vector<std::string> allowed_signature_methods() const;
70
71 virtual std::vector<Signature_Scheme> allowed_signature_schemes() const;
72
73 /**
74 * Return a list of schemes we are willing to accept
75 */
76 virtual std::vector<Signature_Scheme> acceptable_signature_schemes() const;
77
78 virtual std::optional<std::vector<Signature_Scheme>> acceptable_certificate_signature_schemes() const;
79
80 /**
81 * The minimum signature strength we will accept
82 * Returning 80 allows RSA 1024 and SHA-1. Values larger than 80 disable SHA-1 support.
83 * Returning 110 allows RSA 2048.
84 * Return 128 to force ECC (P-256) or large (~3000 bit) RSA keys.
85 * Default is 110
86 */
87 virtual size_t minimum_signature_strength() const;
88
89 /**
90 * Return if cert revocation info (CRL/OCSP) is required
91 * If true, validation will fail unless a valid CRL or OCSP response
92 * was examined.
93 */
94 virtual bool require_cert_revocation_info() const;
95
96 bool allowed_signature_method(std::string_view sig_method) const;
97 bool allowed_signature_hash(std::string_view hash) const;
98
99 /**
100 * Return list of ECC curves and FFDHE groups we are willing to
101 * use in order of preference.
102 */
103 virtual std::vector<Group_Params> key_exchange_groups() const;
104
105 /**
106 * Return a list of groups to provide prepared key share offers in the
107 * initial client hello for. Groups in this list must be reflected in
108 * key_exchange_groups() and in the same order. By default this returns
109 * the most preferred group from key_exchange_groups().
110 * If an empty list is returned, no prepared key share offers are sent
111 * and the decision of the group to use is left to the server.
112 *
113 * @note Has an effect on TLS 1.3 clients, only.
114 */
115 virtual std::vector<Group_Params> key_exchange_groups_to_offer() const;
116
117 /**
118 * Request that ECC curve points are sent compressed
119 *
120 * @note Has no effect for TLS 1.3 connections.
121 * RFC 8446 4.2.8.2
122 * Versions of TLS prior to 1.3 permitted point format
123 * negotiation; TLS 1.3 removes this feature in favor of a single
124 * point format for each curve.
125 */
126 virtual bool use_ecc_point_compression() const;
127
128 /**
129 * Select a key exchange group to use, from the list of groups sent by the
130 * peer. In TLS 1.3 handshakes the peer might have provided cryptographic material
131 * for a subset of its available groups. Choosing a group for which no share was
132 * provided will result in an additional round trip. If none are acceptable, return
133 * Group_Params::NONE.
134 *
135 * By default this will try to optimize for less round trips even if this results
136 * in the usage of a less preferred group.
137 */
138 virtual Group_Params choose_key_exchange_group(const std::vector<Group_Params>& supported_by_peer,
139 const std::vector<Group_Params>& offered_by_peer) const;
140
141 /**
142 * Allow renegotiation even if the counterparty doesn't
143 * support the secure renegotiation extension.
144 *
145 * @warning Changing this to true exposes you to injected
146 * plaintext attacks. Read RFC 5746 for background.
147 *
148 * @note Has no effect for TLS 1.3 connections.
149 */
150 virtual bool allow_insecure_renegotiation() const;
151
152 /**
153 * The protocol dictates that the first 32 bits of the random
154 * field are the current time in seconds. However this allows
155 * client fingerprinting attacks. Set to false to disable, in
156 * which case random bytes will be used instead.
157 */
158 virtual bool include_time_in_hello_random() const;
159
160 /**
161 * Consulted by server side. If true, allows clients to initiate a new handshake
162 *
163 * @note Has no effect for TLS 1.3 connections.
164 */
165 virtual bool allow_client_initiated_renegotiation() const;
166
167 /**
168 * Consulted by client side. If true, allows servers to initiate a new handshake
169 *
170 * @note Has no effect for TLS 1.3 connections.
171 */
172 virtual bool allow_server_initiated_renegotiation() const;
173
174 /**
175 * If true, a request to renegotiate will close the connection with
176 * a fatal alert. Otherwise, a warning alert is sent.
177 *
178 * @note Has no effect for TLS 1.3 connections.
179 */
180 virtual bool abort_connection_on_undesired_renegotiation() const;
181
182 virtual bool only_resume_with_exact_version() const;
183
184 /**
185 * Allow TLS v1.2
186 */
187 virtual bool allow_tls12() const;
188
189 /**
190 * Allow TLS v1.3
191 */
192 virtual bool allow_tls13() const;
193
194 /**
195 * Allow DTLS v1.2
196 */
197 virtual bool allow_dtls12() const;
198
199 /**
200 * @note Has no effect for TLS 1.3 connections.
201 */
202 virtual Group_Params default_dh_group() const;
203
204 /**
205 * Return the minimum DH group size we're willing to use
206 * Default is currently 1024 (insecure), should be 2048
207 */
208 virtual size_t minimum_dh_group_size() const;
209
210 /**
211 * For ECDSA authenticated ciphersuites, the smallest key size the
212 * client will accept.
213 * This policy is currently only enforced on the server by the client.
214 */
215 virtual size_t minimum_ecdsa_group_size() const;
216
217 /**
218 * Return the minimum ECDH group size we're willing to use
219 * for key exchange
220 *
221 * Default 255, allowing x25519 and larger
222 * x25519 is the smallest curve we will negotiate
223 * P-521 is the largest
224 */
225 virtual size_t minimum_ecdh_group_size() const;
226
227 /**
228 * Return the minimum bit size we're willing to accept for RSA
229 * key exchange or server signatures.
230 *
231 * It does not place any requirements on the size of any RSA signature(s)
232 * which were used to check the server certificate. This is only
233 * concerned with the server's public key.
234 *
235 * Default is 2048 which is smallest RSA key size still secure
236 * for medium term security.
237 */
238 virtual size_t minimum_rsa_bits() const;
239
240 /**
241 * Throw an exception if you don't like the peer's key.
242 * Default impl checks the key size against minimum_rsa_bits, minimum_ecdsa_group_size,
243 * or minimum_ecdh_group_size depending on the key's type.
244 * Override if you'd like to perform some other kind of test on
245 * (or logging of) the peer's keys.
246 */
247 virtual void check_peer_key_acceptable(const Public_Key& public_key) const;
248
249 /**
250 * If this function returns false, unknown PSK identifiers
251 * will be rejected with an unknown_psk_identifier alert as soon
252 * as the non-existence is identified. Otherwise, a false
253 * identifier value will be used and the protocol allowed to
254 * proceed, causing the handshake to eventually fail without
255 * revealing that the username does not exist on this system.
256 */
257 virtual bool hide_unknown_users() const;
258
259 /**
260 * Defines the maximum number of session tickets a client might
261 * offer in a single resumption attempt. Must be greater than 0.
262 *
263 * TODO: Currently, the TLS 1.3 client implementation supports
264 * exactly one ticket per handshake. RFC 8446 allows for
265 * an arbitrary amount, though.
266 *
267 * @note Has an effect on TLS 1.3 connections, only.
268 */
269 virtual size_t maximum_session_tickets_per_client_hello() const;
270
271 /**
272 * Return the allowed lifetime of a session ticket. If 0, session
273 * tickets do not expire until the session ticket key rolls over.
274 * For TLS 1.3 session tickets the lifetime must not be longer than
275 * seven days. Expired session tickets cannot be used to resume a
276 * session.
277 */
278 virtual std::chrono::seconds session_ticket_lifetime() const;
279
280 /**
281 * Decides whether stored session tickets should be used multiple
282 * times (until their lifetime runs out). This might allow passive
283 * observers to correlate connections (RFC 8446 Appendix C.4). This
284 * has no effect on TLS 1.2 resumptions based on session IDs as those
285 * are negotiated in the clear anyway.
286 */
287 virtual bool reuse_session_tickets() const;
288
289 /**
290 * Return the number of new session tickets a TLS 1.3 server should issue
291 * automatically upon a successful handshake. Note that applications can
292 * use `TLS::Server::send_new_session_tickets()` regardless of this policy.
293 *
294 * For convenience (and compatibility with the TLS 1.2 behaviour), this
295 * returns '1' by default.
296 *
297 * @note Has an effect on TLS 1.3 connections, only.
298 */
299 virtual size_t new_session_tickets_upon_handshake_success() const;
300
301 /**
302 * If this returns a non-empty vector, and DTLS is negotiated,
303 * then we will also attempt to negotiate the SRTP extension from
304 * RFC 5764 using the returned values as the profile ids.
305 */
306 virtual std::vector<uint16_t> srtp_profiles() const;
307
308 /**
309 * @return true if and only if we are willing to accept this version
310 * Default accepts TLS v1.2 and later or DTLS v1.2 or later.
311 */
312 virtual bool acceptable_protocol_version(Protocol_Version version) const;
313
314 /**
315 * Returns the most recent protocol version we are willing to
316 * use, for either TLS or DTLS depending on datagram param.
317 * Shouldn't ever need to override this unless you want to allow
318 * a user to disable specific TLS versions.
319 */
320 virtual Protocol_Version latest_supported_version(bool datagram) const;
321
322 /**
323 * Allows policy to reject any ciphersuites which are undesirable
324 * for whatever reason without having to reimplement ciphersuite_list
325 */
326 virtual bool acceptable_ciphersuite(const Ciphersuite& suite) const;
327
328 /**
329 * @return true if servers should choose the ciphersuite matching
330 * their highest preference, rather than the clients.
331 * Has no effect on client side.
332 */
333 virtual bool server_uses_own_ciphersuite_preferences() const;
334
335 /**
336 * Indicates whether the encrypt-then-MAC extension should be negotiated
337 * (RFC 7366)
338 *
339 * @note Has no effect for TLS 1.3 connections.
340 */
341 virtual bool negotiate_encrypt_then_mac() const;
342
343 /**
344 * Defines the maximum TLS record length for TLS connections.
345 * This is based on the Record Size Limit extension described in RFC 8449.
346 * By default (i.e. if std::nullopt is returned), TLS clients will omit
347 * this extension altogether.
348 *
349 * This value may be between 64 and 16385 (TLS 1.3) or 16384 (TLS 1.2).
350 *
351 * @note This is currently not implemented for TLS 1.2, hence the limit
352 * won't be negotiated by TLS 1.3 clients that support downgrading
353 * to TLS 1.2 (i.e. #allow_tls12() returning true).
354 */
355 virtual std::optional<uint16_t> record_size_limit() const;
356
357 /**
358 * Indicates whether certificate status messages should be supported
359 */
360 virtual bool support_cert_status_message() const;
361
362 /**
363 * Indicate if client certificate authentication is required.
364 * If true, then a cert will be requested and if the client does
365 * not send a certificate the connection will be closed.
366 */
367 virtual bool require_client_certificate_authentication() const;
368
369 /**
370 * Indicate if client certificate authentication is requested.
371 * If true, then a cert will be requested.
372 */
373 virtual bool request_client_certificate_authentication() const;
374
375 /**
376 * Returns a list of accepted certificate types for client authentication
377 * in order of preference. See RFC 7250 and RFC 8446 4.4.2 for details.
378 * Defaults to X509 only.
379 *
380 * Note that it is the application's responsibility to provide public keys
381 * and/or certificates according to the specification in this list via the
382 * Credentials_Manager.
383 */
384 virtual std::vector<Certificate_Type> accepted_client_certificate_types() const;
385
386 /**
387 * Returns a list of accepted certificate types for server authentication
388 * in order of preference. See RFC 7250 and RFC 8446 4.4.2 for details.
389 * Defaults to X509 only.
390 *
391 * Note that it is the application's responsibility to provide public keys
392 * and/or certificates according to the specification in this list via the
393 * Credentials_Manager.
394 */
395 virtual std::vector<Certificate_Type> accepted_server_certificate_types() const;
396
397 /**
398 * If true, then allow a DTLS client to restart a connection to the
399 * same server association as described in section 4.2.8 of the DTLS RFC
400 */
401 virtual bool allow_dtls_epoch0_restart() const;
402
403 /**
404 * Return allowed ciphersuites, in order of preference for the provided
405 * protocol version.
406 *
407 * @param version the exact protocol version to select supported and allowed
408 * ciphersuites for
409 */
410 virtual std::vector<uint16_t> ciphersuite_list(Protocol_Version version) const;
411
412 /**
413 * @return the default MTU for DTLS
414 */
415 virtual size_t dtls_default_mtu() const;
416
417 /**
418 * @return the initial timeout for DTLS
419 */
420 virtual size_t dtls_initial_timeout() const;
421
422 /**
423 * @return the maximum timeout for DTLS
424 */
425 virtual size_t dtls_maximum_timeout() const;
426
427 /**
428 * @return the maximum size of the certificate chain, in bytes.
429 * Return 0 to disable this and accept any size.
430 */
431 virtual size_t maximum_certificate_chain_size() const;
432
433 /**
434 * @note Has no effect for TLS 1.3 connections.
435 */
436 virtual bool allow_resumption_for_renegotiation() const;
437
438 /**
439 * Defines whether or not the middlebox compatibility mode should be
440 * used. Enabled by default.
441 *
442 * RFC 8446 Appendix D.4
443 * [This makes] the TLS 1.3 handshake resemble TLS 1.2 session resumption,
444 * which improves the chance of successfully connecting through middleboxes.
445 *
446 * @note Has an effect on TLS 1.3 connections, only.
447 */
448 virtual bool tls_13_middlebox_compatibility_mode() const;
449
450 /**
451 * Hash the RNG output for the client/server hello random. This is a pre-caution
452 * to avoid writing "raw" RNG output to the wire.
453 *
454 * There's not normally a reason to disable this, except when deterministic output
455 * is required for testing.
456 */
457 virtual bool hash_hello_random() const;
458
459 /**
460 * Convert this policy to a printable format.
461 * @param o stream to be printed to
462 */
463 virtual void print(std::ostream& o) const;
464
465 /**
466 * Convert this policy to a printable format.
467 * Same as calling `print` on a ostringstream and reading o.str()
468 */
469 std::string to_string() const;
470
471 virtual ~Policy() = default;
472};
473
475
476/**
477* NSA Suite B 128-bit security level (RFC 6460)
478*
479* @warning As of August 2015 NSA indicated only the 192-bit Suite B
480* should be used for all classification levels.
481*/
483 public:
484 std::vector<std::string> allowed_ciphers() const override { return std::vector<std::string>({"AES-128/GCM"}); }
485
486 std::vector<std::string> allowed_signature_hashes() const override {
487 return std::vector<std::string>({"SHA-256"});
488 }
489
490 std::vector<std::string> allowed_macs() const override { return std::vector<std::string>({"AEAD"}); }
491
492 std::vector<std::string> allowed_key_exchange_methods() const override {
493 return std::vector<std::string>({"ECDH"});
494 }
495
496 std::vector<std::string> allowed_signature_methods() const override {
497 return std::vector<std::string>({"ECDSA"});
498 }
499
500 std::vector<Group_Params> key_exchange_groups() const override { return {Group_Params::SECP256R1}; }
501
502 size_t minimum_signature_strength() const override { return 128; }
503
504 bool allow_tls12() const override { return true; }
505
506 bool allow_tls13() const override { return false; }
507
508 bool allow_dtls12() const override { return false; }
509};
510
511/**
512* NSA Suite B 192-bit security level (RFC 6460)
513*/
515 public:
516 std::vector<std::string> allowed_ciphers() const override { return std::vector<std::string>({"AES-256/GCM"}); }
517
518 std::vector<std::string> allowed_signature_hashes() const override {
519 return std::vector<std::string>({"SHA-384"});
520 }
521
522 std::vector<std::string> allowed_macs() const override { return std::vector<std::string>({"AEAD"}); }
523
524 std::vector<std::string> allowed_key_exchange_methods() const override {
525 return std::vector<std::string>({"ECDH"});
526 }
527
528 std::vector<std::string> allowed_signature_methods() const override {
529 return std::vector<std::string>({"ECDSA"});
530 }
531
532 std::vector<Group_Params> key_exchange_groups() const override { return {Group_Params::SECP384R1}; }
533
534 size_t minimum_signature_strength() const override { return 192; }
535
536 bool allow_tls12() const override { return true; }
537
538 bool allow_tls13() const override { return false; }
539
540 bool allow_dtls12() const override { return false; }
541};
542
543/**
544* BSI TR-02102-2 Policy
545*/
547 public:
548 std::vector<std::string> allowed_ciphers() const override {
549 return std::vector<std::string>(
550 {"AES-256/GCM", "AES-128/GCM", "AES-256/CCM", "AES-128/CCM", "AES-256", "AES-128"});
551 }
552
553 std::vector<std::string> allowed_signature_hashes() const override {
554 return std::vector<std::string>({"SHA-512", "SHA-384", "SHA-256"});
555 }
556
557 std::vector<std::string> allowed_macs() const override {
558 return std::vector<std::string>({"AEAD", "SHA-384", "SHA-256"});
559 }
560
561 std::vector<std::string> allowed_key_exchange_methods() const override {
562 return std::vector<std::string>({"ECDH", "DH", "ECDHE_PSK"});
563 }
564
565 std::vector<std::string> allowed_signature_methods() const override {
566 return std::vector<std::string>({"ECDSA", "RSA", "DSA"});
567 }
568
569 std::vector<Group_Params> key_exchange_groups() const override {
570 return std::vector<Group_Params>({Group_Params::BRAINPOOL512R1,
571 Group_Params::BRAINPOOL384R1,
572 Group_Params::BRAINPOOL256R1,
573 Group_Params::SECP521R1,
574 Group_Params::SECP384R1,
575 Group_Params::SECP256R1,
576 Group_Params::FFDHE_4096,
577 Group_Params::FFDHE_3072});
578 }
579
580 size_t minimum_signature_strength() const override { return 120; }
581
582 bool allow_insecure_renegotiation() const override { return false; }
583
584 bool allow_server_initiated_renegotiation() const override { return true; }
585
586 bool server_uses_own_ciphersuite_preferences() const override { return true; }
587
588 bool negotiate_encrypt_then_mac() const override { return true; }
589
590 size_t minimum_rsa_bits() const override { return 3000; }
591
592 size_t minimum_dh_group_size() const override { return 3000; }
593
594 size_t minimum_ecdh_group_size() const override { return 250; }
595
596 size_t minimum_ecdsa_group_size() const override { return 250; }
597
598 bool allow_tls12() const override { return true; }
599
600 bool allow_tls13() const override { return true; }
601
602 bool allow_dtls12() const override { return false; }
603};
604
605/**
606* Policy for DTLS. We require DTLS v1.2 and an AEAD mode.
607*/
609 public:
610 std::vector<std::string> allowed_macs() const override { return std::vector<std::string>({"AEAD"}); }
611
612 bool allow_tls12() const override { return false; }
613
614 bool allow_tls13() const override { return false; }
615
616 bool allow_dtls12() const override { return true; }
617};
618
619/*
620* This policy requires a secure version of TLS and disables all insecure
621* algorithms. It is compatible with other botan TLSes (including those using the
622* default policy) and with many other recent implementations. It is a great idea
623* to use if you control both sides of the protocol and don't have to worry
624* about ancient and/or bizarre TLS implementations.
625*/
627 public:
628 std::vector<std::string> allowed_ciphers() const override;
629
630 std::vector<std::string> allowed_signature_hashes() const override;
631
632 std::vector<std::string> allowed_macs() const override;
633
634 std::vector<std::string> allowed_key_exchange_methods() const override;
635};
636
637class BOTAN_PUBLIC_API(2, 0) Text_Policy : public Policy {
638 public:
639 bool allow_ssl_key_log_file() const override;
640
641 std::vector<std::string> allowed_ciphers() const override;
642
643 std::vector<std::string> allowed_signature_hashes() const override;
644
645 std::vector<std::string> allowed_macs() const override;
646
647 std::vector<std::string> allowed_key_exchange_methods() const override;
648
649 std::vector<std::string> allowed_signature_methods() const override;
650
651 std::vector<Group_Params> key_exchange_groups() const override;
652
653 std::vector<Group_Params> key_exchange_groups_to_offer() const override;
654
655 bool use_ecc_point_compression() const override;
656
657 bool allow_tls12() const override;
658
659 bool allow_tls13() const override;
660
661 bool allow_dtls12() const override;
662
663 bool allow_insecure_renegotiation() const override;
664
665 bool include_time_in_hello_random() const override;
666
667 bool allow_client_initiated_renegotiation() const override;
668 bool allow_server_initiated_renegotiation() const override;
669
670 bool server_uses_own_ciphersuite_preferences() const override;
671
672 bool negotiate_encrypt_then_mac() const override;
673
674 std::optional<uint16_t> record_size_limit() const override;
675
676 bool support_cert_status_message() const override;
677
678 bool require_client_certificate_authentication() const override;
679
680 std::vector<Certificate_Type> accepted_client_certificate_types() const override;
681 std::vector<Certificate_Type> accepted_server_certificate_types() const override;
682
683 size_t minimum_ecdh_group_size() const override;
684
685 size_t minimum_ecdsa_group_size() const override;
686
687 size_t minimum_dh_group_size() const override;
688
689 size_t minimum_rsa_bits() const override;
690
691 size_t minimum_signature_strength() const override;
692
693 size_t dtls_default_mtu() const override;
694
695 size_t dtls_initial_timeout() const override;
696
697 size_t dtls_maximum_timeout() const override;
698
699 bool require_cert_revocation_info() const override;
700
701 bool hide_unknown_users() const override;
702
703 size_t maximum_session_tickets_per_client_hello() const override;
704
705 std::chrono::seconds session_ticket_lifetime() const override;
706
707 bool reuse_session_tickets() const override;
708
709 size_t new_session_tickets_upon_handshake_success() const override;
710
711 bool tls_13_middlebox_compatibility_mode() const override;
712
713 bool hash_hello_random() const override;
714
715 std::vector<uint16_t> srtp_profiles() const override;
716
717 void set(const std::string& key, const std::string& value);
718
719 explicit Text_Policy(std::string_view s);
720
721 explicit Text_Policy(std::istream& in);
722
723 protected:
724 std::vector<std::string> get_list(const std::string& key, const std::vector<std::string>& def) const;
725
726 std::vector<Group_Params> read_group_list(std::string_view group_str) const;
727 std::vector<Certificate_Type> read_cert_type_list(const std::string& cert_type_str) const;
728
729 size_t get_len(const std::string& key, size_t def) const;
730
731 std::chrono::seconds get_duration(const std::string& key, std::chrono::seconds def) const;
732
733 bool get_bool(const std::string& key, bool def) const;
734
735 std::string get_str(const std::string& key, const std::string& def = "") const;
736
737 bool set_value(const std::string& key, std::string_view val, bool overwrite);
738
739 private:
740 std::map<std::string, std::string> m_kv;
741};
742
743} // namespace TLS
744
745} // namespace Botan
746
747#endif
bool allow_dtls12() const override
Definition tls_policy.h:602
size_t minimum_ecdh_group_size() const override
Definition tls_policy.h:594
std::vector< std::string > allowed_signature_hashes() const override
Definition tls_policy.h:553
bool negotiate_encrypt_then_mac() const override
Definition tls_policy.h:588
std::vector< std::string > allowed_ciphers() const override
Definition tls_policy.h:548
std::vector< std::string > allowed_signature_methods() const override
Definition tls_policy.h:565
bool allow_server_initiated_renegotiation() const override
Definition tls_policy.h:584
bool server_uses_own_ciphersuite_preferences() const override
Definition tls_policy.h:586
bool allow_tls12() const override
Definition tls_policy.h:598
std::vector< std::string > allowed_macs() const override
Definition tls_policy.h:557
size_t minimum_rsa_bits() const override
Definition tls_policy.h:590
bool allow_tls13() const override
Definition tls_policy.h:600
std::vector< Group_Params > key_exchange_groups() const override
Definition tls_policy.h:569
size_t minimum_dh_group_size() const override
Definition tls_policy.h:592
bool allow_insecure_renegotiation() const override
Definition tls_policy.h:582
size_t minimum_ecdsa_group_size() const override
Definition tls_policy.h:596
std::vector< std::string > allowed_key_exchange_methods() const override
Definition tls_policy.h:561
size_t minimum_signature_strength() const override
Definition tls_policy.h:580
bool allow_dtls12() const override
Definition tls_policy.h:616
bool allow_tls13() const override
Definition tls_policy.h:614
bool allow_tls12() const override
Definition tls_policy.h:612
std::vector< std::string > allowed_macs() const override
Definition tls_policy.h:610
std::vector< std::string > allowed_macs() const override
Definition tls_policy.h:490
bool allow_dtls12() const override
Definition tls_policy.h:508
std::vector< Group_Params > key_exchange_groups() const override
Definition tls_policy.h:500
size_t minimum_signature_strength() const override
Definition tls_policy.h:502
std::vector< std::string > allowed_signature_methods() const override
Definition tls_policy.h:496
std::vector< std::string > allowed_key_exchange_methods() const override
Definition tls_policy.h:492
std::vector< std::string > allowed_signature_hashes() const override
Definition tls_policy.h:486
std::vector< std::string > allowed_ciphers() const override
Definition tls_policy.h:484
bool allow_tls12() const override
Definition tls_policy.h:504
bool allow_tls13() const override
Definition tls_policy.h:506
std::vector< Group_Params > key_exchange_groups() const override
Definition tls_policy.h:532
bool allow_tls12() const override
Definition tls_policy.h:536
bool allow_tls13() const override
Definition tls_policy.h:538
std::vector< std::string > allowed_macs() const override
Definition tls_policy.h:522
bool allow_dtls12() const override
Definition tls_policy.h:540
std::vector< std::string > allowed_ciphers() const override
Definition tls_policy.h:516
std::vector< std::string > allowed_key_exchange_methods() const override
Definition tls_policy.h:524
size_t minimum_signature_strength() const override
Definition tls_policy.h:534
std::vector< std::string > allowed_signature_methods() const override
Definition tls_policy.h:528
std::vector< std::string > allowed_signature_hashes() const override
Definition tls_policy.h:518
virtual ~Policy()=default
#define BOTAN_PUBLIC_API(maj, min)
Definition compiler.h:31
Policy Default_Policy
Definition tls_policy.h:474