Botan 3.6.1
Crypto and TLS for C&
|
#include <tls_version.h>
Public Member Functions | |
bool | is_datagram_protocol () const |
bool | is_pre_tls_13 () const |
bool | is_tls_13_or_later () const |
bool | known_version () const |
uint8_t | major_version () const |
uint8_t | minor_version () const |
bool | operator!= (const Protocol_Version &other) const |
bool | operator< (const Protocol_Version &other) const |
bool | operator<= (const Protocol_Version &other) const |
bool | operator== (const Protocol_Version &other) const |
bool | operator> (const Protocol_Version &other) const |
bool | operator>= (const Protocol_Version &other) const |
Protocol_Version () | |
Protocol_Version (uint16_t code) | |
Protocol_Version (uint8_t major, uint8_t minor) | |
Protocol_Version (Version_Code named_version) | |
std::string | to_string () const |
bool | valid () const |
uint16_t | version_code () const |
Static Public Member Functions | |
static Protocol_Version | latest_dtls_version () |
static Protocol_Version | latest_tls_version () |
TLS Protocol Version
Definition at line 34 of file tls_version.h.
|
inline |
Definition at line 60 of file tls_version.h.
|
inlineexplicit |
Definition at line 62 of file tls_version.h.
|
inline |
named_version | a specific named version of the protocol |
Definition at line 67 of file tls_version.h.
|
inline |
major | the major version |
minor | the minor version |
Definition at line 73 of file tls_version.h.
bool Botan::TLS::Protocol_Version::is_datagram_protocol | ( | ) | const |
Definition at line 36 of file tls_version.cpp.
References major_version().
Referenced by Botan::TLS::Client::Client(), Botan::TLS::Channel_Impl_12::create_handshake_state(), Botan::TLS::Hello_Verify_Request::Hello_Verify_Request(), is_pre_tls_13(), is_tls_13_or_later(), operator>(), Botan::TLS::Client_Hello_12::random(), Botan::TLS::Supported_Versions::Supported_Versions(), and Botan::TLS::TLS_CBC_HMAC_AEAD_Mode::TLS_CBC_HMAC_AEAD_Mode().
bool Botan::TLS::Protocol_Version::is_pre_tls_13 | ( | ) | const |
Definition at line 40 of file tls_version.cpp.
References is_datagram_protocol().
Referenced by Botan::TLS::Policy::ciphersuite_list(), Botan::TLS::Session_Manager_Hybrid::establish(), Botan::TLS::Channel_Impl::request_downgrade_for_resumption(), Botan::TLS::Session::Session(), Botan::TLS::Session::Session(), Botan::TLS::Session::Session(), Botan::TLS::Callbacks::tls_should_persist_resumption_information(), and Botan::TLS::Ciphersuite::usable_in_version().
bool Botan::TLS::Protocol_Version::is_tls_13_or_later | ( | ) | const |
Definition at line 45 of file tls_version.cpp.
References is_datagram_protocol().
bool Botan::TLS::Protocol_Version::known_version | ( | ) | const |
Definition at line 84 of file tls_version.cpp.
References BOTAN_HAS_TLS_13.
|
inlinestatic |
Returns the latest version of the DTLS protocol known to the library (currently DTLS v1.2)
Definition at line 58 of file tls_version.h.
References Botan::TLS::DTLS_V12.
|
inlinestatic |
Returns the latest version of the TLS protocol known to the library (currently TLS v1.3)
Definition at line 44 of file tls_version.h.
References Botan::TLS::TLS_V12, and Botan::TLS::TLS_V13.
|
inline |
Definition at line 89 of file tls_version.h.
Referenced by Botan::TLS::Client_Key_Exchange::Client_Key_Exchange(), Botan::TLS::Session::DER_encode(), Botan::TLS::Connection_Cipher_State::format_ad(), Botan::TLS::Channel_Impl_12::from_peer(), is_datagram_protocol(), Botan::TLS::Hello_Verify_Request::serialize(), to_string(), and valid().
|
inline |
Definition at line 94 of file tls_version.h.
Referenced by Botan::TLS::Client_Key_Exchange::Client_Key_Exchange(), Botan::TLS::Session::DER_encode(), Botan::TLS::Connection_Cipher_State::format_ad(), Botan::TLS::Hello_Verify_Request::serialize(), to_string(), and valid().
|
inline |
Definition at line 133 of file tls_version.h.
|
inline |
Definition at line 148 of file tls_version.h.
|
inline |
Definition at line 153 of file tls_version.h.
|
inline |
Definition at line 128 of file tls_version.h.
bool Botan::TLS::Protocol_Version::operator> | ( | const Protocol_Version & | other | ) | const |
Definition at line 50 of file tls_version.cpp.
References is_datagram_protocol(), and to_string().
|
inline |
Definition at line 143 of file tls_version.h.
std::string Botan::TLS::Protocol_Version::to_string | ( | ) | const |
Generate a human readable version string.
for instance "TLS v1.1" or "DTLS v1.0".
Definition at line 16 of file tls_version.cpp.
References major_version(), and minor_version().
Referenced by Botan::TLS::Channel_Impl_12::create_handshake_state(), and operator>().
bool Botan::TLS::Protocol_Version::valid | ( | ) | const |
Definition at line 62 of file tls_version.cpp.
References major_version(), and minor_version().
|
inline |