Botan 3.11.0
Crypto and TLS for C&
Botan::TLS::Internal::Handshake_State_13_Base Class Reference

#include <tls_handshake_state_13.h>

Inheritance diagram for Botan::TLS::Internal::Handshake_State_13_Base:
Botan::TLS::Handshake_State_13< Connection_Side::Client, Client_Handshake_13_Message, Server_Handshake_13_Message, Server_Post_Handshake_13_Message > Botan::TLS::Handshake_State_13< Connection_Side::Server, Server_Handshake_13_Message, Client_Handshake_13_Message, Client_Post_Handshake_13_Message > Botan::TLS::Handshake_State_13< whoami, Outbound_Message_T, Inbound_Message_T, Inbound_Post_Handshake_Message_T >

Public Member Functions

const Certificate_Request_13certificate_request () const
const Certificate_13client_certificate () const
const Certificate_Verify_13client_certificate_verify () const
const Finished_13client_finished () const
Client_Hello_13client_hello ()
const Client_Hello_13client_hello () const
const Encrypted_Extensionsencrypted_extensions () const
bool handshake_finished () const
bool has_certificate_request () const
bool has_client_certificate_msg () const
bool has_client_finished () const
bool has_client_hello () const
bool has_hello_retry_request () const
bool has_server_certificate_msg () const
bool has_server_finished () const
bool has_server_hello () const
const Hello_Retry_Requesthello_retry_request () const
const Certificate_13server_certificate () const
const Certificate_Verify_13server_certificate_verify () const
const Finished_13server_finished () const
const Server_Hello_13server_hello () const

Protected Member Functions

 Handshake_State_13_Base (Connection_Side whoami)
Certificate_13store (Certificate_13 certificate, bool from_peer)
Certificate_Request_13store (Certificate_Request_13 certificate_request, bool from_peer)
Certificate_Verify_13store (Certificate_Verify_13 certificate_verify, bool from_peer)
Client_Hello_12_Shimstore (Client_Hello_12_Shim client_hello, bool from_peer)
Client_Hello_13store (Client_Hello_13 client_hello, bool from_peer)
Encrypted_Extensionsstore (Encrypted_Extensions encrypted_extensions, bool from_peer)
Finished_13store (Finished_13 finished, bool from_peer)
Hello_Retry_Requeststore (Hello_Retry_Request hello_retry_request, bool from_peer)
Server_Hello_12_Shimstore (Server_Hello_12_Shim server_hello, bool from_peer)
Server_Hello_13store (Server_Hello_13 server_hello, bool from_peer)

Detailed Description

Definition at line 22 of file tls_handshake_state_13.h.

Constructor & Destructor Documentation

◆ Handshake_State_13_Base()

Botan::TLS::Internal::Handshake_State_13_Base::Handshake_State_13_Base ( Connection_Side whoami)
inlineexplicitprotected

Member Function Documentation

◆ certificate_request()

const Certificate_Request_13 & Botan::TLS::Internal::Handshake_State_13_Base::certificate_request ( ) const
inline

Definition at line 53 of file tls_handshake_state_13.h.

53{ return get(m_certificate_request); }

Referenced by store().

◆ client_certificate()

const Certificate_13 & Botan::TLS::Internal::Handshake_State_13_Base::client_certificate ( ) const
inline

Definition at line 57 of file tls_handshake_state_13.h.

57{ return get(m_client_certificate); }

◆ client_certificate_verify()

const Certificate_Verify_13 & Botan::TLS::Internal::Handshake_State_13_Base::client_certificate_verify ( ) const
inline

Definition at line 61 of file tls_handshake_state_13.h.

61{ return get(m_client_certificate_verify); }

◆ client_finished()

const Finished_13 & Botan::TLS::Internal::Handshake_State_13_Base::client_finished ( ) const
inline

Definition at line 65 of file tls_handshake_state_13.h.

65{ return get(m_client_finished); }

◆ client_hello() [1/2]

Client_Hello_13 & Botan::TLS::Internal::Handshake_State_13_Base::client_hello ( )
inline

Definition at line 43 of file tls_handshake_state_13.h.

43{ return get(m_client_hello); }

Referenced by store(), and store().

◆ client_hello() [2/2]

const Client_Hello_13 & Botan::TLS::Internal::Handshake_State_13_Base::client_hello ( ) const
inline

Definition at line 45 of file tls_handshake_state_13.h.

45{ return get(m_client_hello); }

◆ encrypted_extensions()

const Encrypted_Extensions & Botan::TLS::Internal::Handshake_State_13_Base::encrypted_extensions ( ) const
inline

Definition at line 51 of file tls_handshake_state_13.h.

51{ return get(m_encrypted_extensions); }

Referenced by store().

◆ handshake_finished()

bool Botan::TLS::Internal::Handshake_State_13_Base::handshake_finished ( ) const
inline

◆ has_certificate_request()

bool Botan::TLS::Internal::Handshake_State_13_Base::has_certificate_request ( ) const
inline

Definition at line 34 of file tls_handshake_state_13.h.

34{ return m_certificate_request.has_value(); }

◆ has_client_certificate_msg()

bool Botan::TLS::Internal::Handshake_State_13_Base::has_client_certificate_msg ( ) const
inline

Definition at line 30 of file tls_handshake_state_13.h.

30{ return m_client_certificate.has_value(); }

◆ has_client_finished()

bool Botan::TLS::Internal::Handshake_State_13_Base::has_client_finished ( ) const
inline

Definition at line 38 of file tls_handshake_state_13.h.

38{ return m_client_finished.has_value(); }

Referenced by handshake_finished().

◆ has_client_hello()

bool Botan::TLS::Internal::Handshake_State_13_Base::has_client_hello ( ) const
inline

Definition at line 24 of file tls_handshake_state_13.h.

24{ return m_client_hello.has_value(); }

◆ has_hello_retry_request()

bool Botan::TLS::Internal::Handshake_State_13_Base::has_hello_retry_request ( ) const
inline

Definition at line 32 of file tls_handshake_state_13.h.

32{ return m_hello_retry_request.has_value(); }

Referenced by store().

◆ has_server_certificate_msg()

bool Botan::TLS::Internal::Handshake_State_13_Base::has_server_certificate_msg ( ) const
inline

Definition at line 28 of file tls_handshake_state_13.h.

28{ return m_server_certificate.has_value(); }

◆ has_server_finished()

bool Botan::TLS::Internal::Handshake_State_13_Base::has_server_finished ( ) const
inline

Definition at line 36 of file tls_handshake_state_13.h.

36{ return m_server_finished.has_value(); }

Referenced by handshake_finished().

◆ has_server_hello()

bool Botan::TLS::Internal::Handshake_State_13_Base::has_server_hello ( ) const
inline

Definition at line 26 of file tls_handshake_state_13.h.

26{ return m_server_hello.has_value(); }

◆ hello_retry_request()

const Hello_Retry_Request & Botan::TLS::Internal::Handshake_State_13_Base::hello_retry_request ( ) const
inline

Definition at line 49 of file tls_handshake_state_13.h.

49{ return get(m_hello_retry_request); }

Referenced by store().

◆ server_certificate()

const Certificate_13 & Botan::TLS::Internal::Handshake_State_13_Base::server_certificate ( ) const
inline

Definition at line 55 of file tls_handshake_state_13.h.

55{ return get(m_server_certificate); }

◆ server_certificate_verify()

const Certificate_Verify_13 & Botan::TLS::Internal::Handshake_State_13_Base::server_certificate_verify ( ) const
inline

Definition at line 59 of file tls_handshake_state_13.h.

59{ return get(m_server_certificate_verify); }

◆ server_finished()

const Finished_13 & Botan::TLS::Internal::Handshake_State_13_Base::server_finished ( ) const
inline

Definition at line 63 of file tls_handshake_state_13.h.

63{ return get(m_server_finished); }

◆ server_hello()

const Server_Hello_13 & Botan::TLS::Internal::Handshake_State_13_Base::server_hello ( ) const
inline

Definition at line 47 of file tls_handshake_state_13.h.

47{ return get(m_server_hello); }

Referenced by store(), and store().

◆ store() [1/10]

Certificate_13 & Botan::TLS::Internal::Handshake_State_13_Base::store ( Certificate_13 certificate,
bool from_peer )
protected

Definition at line 58 of file tls_handshake_state_13.cpp.

58 {
59 auto& target = ((m_side == Connection_Side::Client) == from_peer) ? m_server_certificate : m_client_certificate;
60 target = std::move(certificate);
61 return target.value();
62}

References Botan::TLS::Client.

◆ store() [2/10]

Certificate_Request_13 & Botan::TLS::Internal::Handshake_State_13_Base::store ( Certificate_Request_13 certificate_request,
bool from_peer )
protected

Definition at line 52 of file tls_handshake_state_13.cpp.

53 {
54 m_certificate_request = std::move(certificate_request);
55 return m_certificate_request.value();
56}
const Certificate_Request_13 & certificate_request() const

References certificate_request().

◆ store() [3/10]

Certificate_Verify_13 & Botan::TLS::Internal::Handshake_State_13_Base::store ( Certificate_Verify_13 certificate_verify,
bool from_peer )
protected

Definition at line 64 of file tls_handshake_state_13.cpp.

64 {
65 auto& target =
66 ((m_side == Connection_Side::Client) == from_peer) ? m_server_certificate_verify : m_client_certificate_verify;
67 target = std::move(certificate_verify);
68 return target.value();
69}

References Botan::TLS::Client.

◆ store() [4/10]

Client_Hello_12_Shim & Botan::TLS::Internal::Handshake_State_13_Base::store ( Client_Hello_12_Shim client_hello,
bool from_peer )
protected

Definition at line 26 of file tls_handshake_state_13.cpp.

26 {
27 m_client_hello_12 = std::move(client_hello);
28 return m_client_hello_12.value();
29}

References client_hello().

◆ store() [5/10]

Client_Hello_13 & Botan::TLS::Internal::Handshake_State_13_Base::store ( Client_Hello_13 client_hello,
bool from_peer )
protected

Definition at line 15 of file tls_handshake_state_13.cpp.

15 {
16 if(m_client_hello) {
17 // Make sure that the updated Client Hello is compatible to the initial one.
19 m_client_hello->validate_updates(client_hello);
20 }
21
22 m_client_hello = std::move(client_hello);
23 return m_client_hello.value();
24}
#define BOTAN_STATE_CHECK(expr)
Definition assert.h:49

References BOTAN_STATE_CHECK, client_hello(), and has_hello_retry_request().

◆ store() [6/10]

Encrypted_Extensions & Botan::TLS::Internal::Handshake_State_13_Base::store ( Encrypted_Extensions encrypted_extensions,
bool from_peer )
protected

Definition at line 46 of file tls_handshake_state_13.cpp.

47 {
48 m_encrypted_extensions = std::move(encrypted_extensions);
49 return m_encrypted_extensions.value();
50}
const Encrypted_Extensions & encrypted_extensions() const

References encrypted_extensions().

◆ store() [7/10]

Finished_13 & Botan::TLS::Internal::Handshake_State_13_Base::store ( Finished_13 finished,
bool from_peer )
protected

Definition at line 71 of file tls_handshake_state_13.cpp.

71 {
72 auto& target = ((m_side == Connection_Side::Client) == from_peer) ? m_server_finished : m_client_finished;
73 target = std::move(finished);
74 return target.value();
75}

◆ store() [8/10]

Hello_Retry_Request & Botan::TLS::Internal::Handshake_State_13_Base::store ( Hello_Retry_Request hello_retry_request,
bool from_peer )
protected

Definition at line 41 of file tls_handshake_state_13.cpp.

41 {
42 m_hello_retry_request = std::move(hello_retry_request);
43 return m_hello_retry_request.value();
44}
const Hello_Retry_Request & hello_retry_request() const

References hello_retry_request().

◆ store() [9/10]

Server_Hello_12_Shim & Botan::TLS::Internal::Handshake_State_13_Base::store ( Server_Hello_12_Shim server_hello,
bool from_peer )
protected

Definition at line 36 of file tls_handshake_state_13.cpp.

36 {
37 m_server_hello_12 = std::move(server_hello);
38 return m_server_hello_12.value();
39}

References server_hello().

◆ store() [10/10]

Server_Hello_13 & Botan::TLS::Internal::Handshake_State_13_Base::store ( Server_Hello_13 server_hello,
bool from_peer )
protected

Definition at line 31 of file tls_handshake_state_13.cpp.

31 {
32 m_server_hello = std::move(server_hello);
33 return m_server_hello.value();
34}

References server_hello().


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