|
Botan 3.10.0
Crypto and TLS for C&
|
#include <tls_extensions.h>
Public Member Functions | |
| void | add (Extension *extn) |
| void | add (std::unique_ptr< Extension > extn) |
| const std::vector< std::unique_ptr< Extension > > & | all () const |
| bool | contains_implemented_extensions_other_than (const std::set< Extension_Code > &allowed_extensions) const |
| bool | contains_other_than (const std::set< Extension_Code > &allowed_extensions, bool allow_unknown_extensions=false) const |
| void | deserialize (TLS_Data_Reader &reader, Connection_Side from, Handshake_Type message_type) |
| bool | empty () const |
| std::set< Extension_Code > | extension_types () const |
| Extensions ()=default | |
| Extensions (const Extensions &)=delete | |
| Extensions (Extensions &&)=default | |
| Extensions (TLS_Data_Reader &reader, Connection_Side side, Handshake_Type message_type) | |
| template<typename T > | |
| T * | get () const |
| Extension * | get (Extension_Code type) const |
| template<typename T > | |
| bool | has () const |
| bool | has (Extension_Code type) const |
| Extensions & | operator= (const Extensions &)=delete |
| Extensions & | operator= (Extensions &&)=default |
| bool | remove_extension (Extension_Code type) |
| std::vector< uint8_t > | serialize (Connection_Side whoami) const |
| size_t | size () const |
| template<typename T > | |
| decltype(auto) | take () |
| std::unique_ptr< Extension > | take (Extension_Code type) |
| ~Extensions () | |
Represents a block of extensions in a hello message
Definition at line 907 of file tls_extensions.h.
|
default |
|
delete |
|
default |
|
default |
|
inline |
Definition at line 996 of file tls_extensions.h.
|
inline |
Definition at line 931 of file tls_extensions.h.
References add().
Referenced by add().
| void Botan::TLS::Extensions::add | ( | std::unique_ptr< Extension > | extn | ) |
Definition at line 121 of file tls_extensions.cpp.
References has().
Referenced by deserialize(), and Botan::TLS::Encrypted_Extensions::Encrypted_Extensions().
|
inline |
Definition at line 911 of file tls_extensions.h.
|
inline |
| allowed_extensions | extension types that are allowed |
allowed_extensions. Definition at line 952 of file tls_extensions.h.
Referenced by Botan::TLS::Certificate_13::Certificate_Entry::Certificate_Entry(), Botan::TLS::Certificate_Request_13::Certificate_Request_13(), Botan::TLS::Encrypted_Extensions::Encrypted_Extensions(), and Botan::TLS::New_Session_Ticket_13::New_Session_Ticket_13().
| bool Botan::TLS::Extensions::contains_other_than | ( | const std::set< Extension_Code > & | allowed_extensions, |
| bool | allow_unknown_extensions = false ) const |
| allowed_extensions | extension types that are allowed |
| allow_unknown_extensions | if true, ignores unrecognized extensions |
allowed_extensions. Definition at line 158 of file tls_extensions.cpp.
References extension_types().
| void Botan::TLS::Extensions::deserialize | ( | TLS_Data_Reader & | reader, |
| Connection_Side | from, | ||
| Handshake_Type | message_type ) |
Definition at line 130 of file tls_extensions.cpp.
References add(), Botan::TLS::TLS_Data_Reader::get_fixed(), Botan::TLS::TLS_Data_Reader::get_uint16_t(), has(), Botan::TLS::TLS_Data_Reader::has_remaining(), and Botan::TLS::TLS_Data_Reader::remaining_bytes().
Referenced by Botan::TLS::Certificate_13::Certificate_Entry::Certificate_Entry(), Botan::TLS::Certificate_Request_13::Certificate_Request_13(), Botan::TLS::Encrypted_Extensions::Encrypted_Extensions(), and Botan::TLS::New_Session_Ticket_13::New_Session_Ticket_13().
|
inline |
Definition at line 927 of file tls_extensions.h.
Referenced by Botan::TLS::New_Session_Ticket_13::serialize().
| std::set< Extension_Code > Botan::TLS::Extensions::extension_types | ( | ) | const |
Definition at line 228 of file tls_extensions.cpp.
Referenced by contains_other_than().
Definition at line 914 of file tls_extensions.h.
References T.
Referenced by Botan::TLS::Certificate_Request_13::acceptable_CAs(), Botan::TLS::Certificate_13::Certificate_13(), Botan::TLS::Certificate_13::Certificate_13(), Botan::TLS::Certificate_Request_13::certificate_signature_schemes(), Botan::TLS::New_Session_Ticket_13::early_data_byte_limit(), Botan::TLS::Hello_Retry_Request::Hello_Retry_Request(), Botan::TLS::Client_Hello_13::retry(), Botan::TLS::Certificate_Request_13::signature_schemes(), and Botan::TLS::Client_Hello_13::validate_updates().
| Extension * Botan::TLS::Extensions::get | ( | Extension_Code | type | ) | const |
Definition at line 114 of file tls_extensions.cpp.
|
inline |
Definition at line 919 of file tls_extensions.h.
Referenced by Botan::TLS::Certificate_Request_13::acceptable_CAs(), add(), Botan::TLS::Certificate_13::Certificate_13(), Botan::TLS::Certificate_Request_13::Certificate_Request_13(), deserialize(), Botan::TLS::New_Session_Ticket_13::early_data_byte_limit(), Botan::TLS::Hello_Retry_Request::Hello_Retry_Request(), Botan::TLS::Client_Hello_13::retry(), Botan::TLS::Certificate_Request_13::signature_schemes(), and Botan::TLS::Client_Hello_13::validate_updates().
|
inline |
Definition at line 923 of file tls_extensions.h.
|
delete |
|
default |
|
inline |
Remove an extension from this extensions object, if it exists. Returns true if the extension existed (and thus is now removed), otherwise false (the extension wasn't set in the first place).
Note: not used internally, might be used in Callbacks::tls_modify_extensions()
Definition at line 987 of file tls_extensions.h.
| std::vector< uint8_t > Botan::TLS::Extensions::serialize | ( | Connection_Side | whoami | ) | const |
Definition at line 194 of file tls_extensions.cpp.
References Botan::get_byte().
Referenced by Botan::TLS::Certificate_Request_13::serialize(), Botan::TLS::Encrypted_Extensions::serialize(), and Botan::TLS::New_Session_Ticket_13::serialize().
|
inline |
Definition at line 925 of file tls_extensions.h.
|
inline |
Take the extension with the given type out of the extensions list. Returns a nullptr if the extension didn't exist.
Definition at line 961 of file tls_extensions.h.
References BOTAN_ASSERT_NOMSG, Botan::out_ptr(), and T.
| std::unique_ptr< Extension > Botan::TLS::Extensions::take | ( | Extension_Code | type | ) |
Take the extension with the given type out of the extensions list. Returns a nullptr if the extension didn't exist.
Definition at line 181 of file tls_extensions.cpp.