Botan 3.12.0
Crypto and TLS for C&
Botan::TLS::Active_Connection_State_12 Class Referencefinal

#include <tls_connection_state_12.h>

Public Member Functions

 Active_Connection_State_12 (Active_Connection_State_12 &&) noexcept
 Active_Connection_State_12 (const Active_Connection_State_12 &)=delete
 Active_Connection_State_12 (const Handshake_State &state, std::string application_protocol)
 Active_Connection_State_12 (const Handshake_State &state, std::string application_protocol, std::unique_ptr< Handshake_IO > io)
const std::string & application_protocol () const
uint16_t ciphersuite_code () const
const std::vector< uint8_t > & client_finished_verify_data () const
const std::vector< uint8_t > & client_random () const
bool client_supports_secure_renegotiation () const
Datagram_Handshake_IOdtls_handshake_io ()
const secure_vector< uint8_t > & master_secret () const
Active_Connection_State_12operator= (Active_Connection_State_12 &&) noexcept
Active_Connection_State_12operator= (const Active_Connection_State_12 &)=delete
const std::vector< X509_Certificate > & peer_certs () const
const std::string & prf_algo () const
const std::optional< std::string > & psk_identity () const
const std::vector< uint8_t > & server_finished_verify_data () const
const std::vector< uint8_t > & server_random () const
bool server_supports_secure_renegotiation () const
const Session_IDsession_id () const
bool supports_extended_master_secret () const
Protocol_Version version () const
 ~Active_Connection_State_12 ()

Detailed Description

Captures the state of a completed TLS 1.2 handshake that is needed for the lifetime of an active connection.

Definition at line 30 of file tls_connection_state_12.h.

Constructor & Destructor Documentation

◆ ~Active_Connection_State_12()

Botan::TLS::Active_Connection_State_12::~Active_Connection_State_12 ( )
default

◆ Active_Connection_State_12() [1/4]

Botan::TLS::Active_Connection_State_12::Active_Connection_State_12 ( Active_Connection_State_12 && )
defaultnoexcept

◆ Active_Connection_State_12() [2/4]

Botan::TLS::Active_Connection_State_12::Active_Connection_State_12 ( const Active_Connection_State_12 & )
delete

◆ Active_Connection_State_12() [3/4]

Botan::TLS::Active_Connection_State_12::Active_Connection_State_12 ( const Handshake_State & state,
std::string application_protocol )

Definition at line 19 of file tls_connection_state_12.cpp.

19 :
20 m_version(state.version()),
21 m_ciphersuite_code(state.server_hello()->ciphersuite()),
22 m_application_protocol(std::move(application_protocol)),
23 m_peer_certs(state.peer_cert_chain()),
24 m_client_random(state.client_hello()->random()),
25 m_psk_identity(state.psk_identity()),
26 m_server_random(state.server_hello()->random()),
27 m_session_id(state.server_hello()->session_id()),
28 m_master_secret(state.session_keys().master_secret()),
29 m_prf_algo(state.ciphersuite().prf_algo()),
30 m_client_supports_secure_renegotiation(state.client_hello()->secure_renegotiation()),
31 m_server_supports_secure_renegotiation(state.server_hello()->secure_renegotiation()),
32 m_client_finished_verify_data(state.client_finished()->verify_data()),
33 m_server_finished_verify_data(state.server_finished()->verify_data()),
34 m_supports_extended_master_secret(state.server_hello()->supports_extended_master_secret()) {}
const std::string & application_protocol() const

References Active_Connection_State_12(), application_protocol(), master_secret(), prf_algo(), psk_identity(), session_id(), supports_extended_master_secret(), and version().

◆ Active_Connection_State_12() [4/4]

Botan::TLS::Active_Connection_State_12::Active_Connection_State_12 ( const Handshake_State & state,
std::string application_protocol,
std::unique_ptr< Handshake_IO > io )

Definition at line 36 of file tls_connection_state_12.cpp.

38 :
40 BOTAN_ASSERT_NOMSG(m_version.is_datagram_protocol());
41 auto* dtls_io = dynamic_cast<Datagram_Handshake_IO*>(io.get());
42 BOTAN_ASSERT_NOMSG(dtls_io != nullptr);
43 m_dtls_handshake_io.reset(dtls_io);
44 io.release(); // NOLINT(*-unused-return-value)
45}
#define BOTAN_ASSERT_NOMSG(expr)
Definition assert.h:75
Active_Connection_State_12(Active_Connection_State_12 &&) noexcept

References Active_Connection_State_12(), application_protocol(), and BOTAN_ASSERT_NOMSG.

Member Function Documentation

◆ application_protocol()

const std::string & Botan::TLS::Active_Connection_State_12::application_protocol ( ) const
inline

Definition at line 51 of file tls_connection_state_12.h.

51{ return m_application_protocol; }

Referenced by Active_Connection_State_12(), Active_Connection_State_12(), and operator=().

◆ ciphersuite_code()

uint16_t Botan::TLS::Active_Connection_State_12::ciphersuite_code ( ) const
inline

Definition at line 49 of file tls_connection_state_12.h.

49{ return m_ciphersuite_code; }

◆ client_finished_verify_data()

const std::vector< uint8_t > & Botan::TLS::Active_Connection_State_12::client_finished_verify_data ( ) const
inline

Definition at line 71 of file tls_connection_state_12.h.

71{ return m_client_finished_verify_data; }

◆ client_random()

const std::vector< uint8_t > & Botan::TLS::Active_Connection_State_12::client_random ( ) const
inline

Definition at line 55 of file tls_connection_state_12.h.

55{ return m_client_random; }

◆ client_supports_secure_renegotiation()

bool Botan::TLS::Active_Connection_State_12::client_supports_secure_renegotiation ( ) const
inline

Definition at line 67 of file tls_connection_state_12.h.

67{ return m_client_supports_secure_renegotiation; }

◆ dtls_handshake_io()

Datagram_Handshake_IO * Botan::TLS::Active_Connection_State_12::dtls_handshake_io ( )
inline

For DTLS: the handshake IO from the completed handshake, needed to retransmit the last flight when records arrive under the previous epoch. Null for stream TLS.

Definition at line 82 of file tls_connection_state_12.h.

82{ return m_dtls_handshake_io.get(); }

◆ master_secret()

const secure_vector< uint8_t > & Botan::TLS::Active_Connection_State_12::master_secret ( ) const
inline

Definition at line 63 of file tls_connection_state_12.h.

63{ return m_master_secret; }

Referenced by Active_Connection_State_12().

◆ operator=() [1/2]

Active_Connection_State_12 & Botan::TLS::Active_Connection_State_12::operator= ( Active_Connection_State_12 && )
defaultnoexcept

◆ operator=() [2/2]

Active_Connection_State_12 & Botan::TLS::Active_Connection_State_12::operator= ( const Active_Connection_State_12 & )
delete

◆ peer_certs()

const std::vector< X509_Certificate > & Botan::TLS::Active_Connection_State_12::peer_certs ( ) const
inline

Definition at line 53 of file tls_connection_state_12.h.

53{ return m_peer_certs; }

◆ prf_algo()

const std::string & Botan::TLS::Active_Connection_State_12::prf_algo ( ) const
inline

Definition at line 65 of file tls_connection_state_12.h.

65{ return m_prf_algo; }

Referenced by Active_Connection_State_12().

◆ psk_identity()

const std::optional< std::string > & Botan::TLS::Active_Connection_State_12::psk_identity ( ) const
inline

Definition at line 57 of file tls_connection_state_12.h.

57{ return m_psk_identity; }

Referenced by Active_Connection_State_12().

◆ server_finished_verify_data()

const std::vector< uint8_t > & Botan::TLS::Active_Connection_State_12::server_finished_verify_data ( ) const
inline

Definition at line 73 of file tls_connection_state_12.h.

73{ return m_server_finished_verify_data; }

◆ server_random()

const std::vector< uint8_t > & Botan::TLS::Active_Connection_State_12::server_random ( ) const
inline

Definition at line 59 of file tls_connection_state_12.h.

59{ return m_server_random; }

◆ server_supports_secure_renegotiation()

bool Botan::TLS::Active_Connection_State_12::server_supports_secure_renegotiation ( ) const
inline

Definition at line 69 of file tls_connection_state_12.h.

69{ return m_server_supports_secure_renegotiation; }

◆ session_id()

const Session_ID & Botan::TLS::Active_Connection_State_12::session_id ( ) const
inline

Definition at line 61 of file tls_connection_state_12.h.

61{ return m_session_id; }

Referenced by Active_Connection_State_12().

◆ supports_extended_master_secret()

bool Botan::TLS::Active_Connection_State_12::supports_extended_master_secret ( ) const
inline

Definition at line 75 of file tls_connection_state_12.h.

75{ return m_supports_extended_master_secret; }

Referenced by Active_Connection_State_12().

◆ version()

Protocol_Version Botan::TLS::Active_Connection_State_12::version ( ) const
inline

Definition at line 47 of file tls_connection_state_12.h.

47{ return m_version; }

References version().

Referenced by Active_Connection_State_12(), and version().


The documentation for this class was generated from the following files: