Botan 3.6.1
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_12store (Client_Hello_12 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_12store (Server_Hello_12 server_hello, bool from_peer)
 
Server_Hello_13store (Server_Hello_13 server_hello, bool from_peer)
 

Detailed Description

Definition at line 25 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)
inlineprotected

Definition at line 71 of file tls_handshake_state_13.h.

71: m_side(whoami) {}

Member Function Documentation

◆ certificate_request()

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

Definition at line 56 of file tls_handshake_state_13.h.

56{ 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 60 of file tls_handshake_state_13.h.

60{ 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 64 of file tls_handshake_state_13.h.

64{ 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 68 of file tls_handshake_state_13.h.

68{ 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 46 of file tls_handshake_state_13.h.

46{ 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 48 of file tls_handshake_state_13.h.

48{ return get(m_client_hello); }

◆ encrypted_extensions()

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

Definition at line 54 of file tls_handshake_state_13.h.

54{ return get(m_encrypted_extensions); }

Referenced by Botan::TLS::Client_Impl_13::application_protocol(), and 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 37 of file tls_handshake_state_13.h.

37{ 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 33 of file tls_handshake_state_13.h.

33{ 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 41 of file tls_handshake_state_13.h.

41{ return m_client_finished.has_value(); }

◆ has_client_hello()

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

Definition at line 27 of file tls_handshake_state_13.h.

27{ 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 35 of file tls_handshake_state_13.h.

35{ 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 31 of file tls_handshake_state_13.h.

31{ return m_server_certificate.has_value(); }

Referenced by Botan::TLS::Client_Impl_13::peer_cert_chain(), and Botan::TLS::Client_Impl_13::peer_raw_public_key().

◆ has_server_finished()

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

Definition at line 39 of file tls_handshake_state_13.h.

39{ return m_server_finished.has_value(); }

◆ has_server_hello()

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

Definition at line 29 of file tls_handshake_state_13.h.

29{ 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 52 of file tls_handshake_state_13.h.

52{ 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 58 of file tls_handshake_state_13.h.

58{ return get(m_server_certificate); }

Referenced by Botan::TLS::Client_Impl_13::peer_cert_chain(), and Botan::TLS::Client_Impl_13::peer_raw_public_key().

◆ server_certificate_verify()

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

Definition at line 62 of file tls_handshake_state_13.h.

62{ 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 66 of file tls_handshake_state_13.h.

66{ 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 50 of file tls_handshake_state_13.h.

50{ 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 54 of file tls_handshake_state_13.cpp.

54 {
55 auto& target = ((m_side == Connection_Side::Client) == from_peer) ? m_server_certificate : m_client_certificate;
56 target = std::move(certificate);
57 return target.value();
58}

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 49 of file tls_handshake_state_13.cpp.

49 {
50 m_certificate_request = std::move(certificate_request);
51 return m_certificate_request.value();
52}
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 60 of file tls_handshake_state_13.cpp.

60 {
61 auto& target =
62 ((m_side == Connection_Side::Client) == from_peer) ? m_server_certificate_verify : m_client_certificate_verify;
63 target = std::move(certificate_verify);
64 return target.value();
65}

References Botan::TLS::Client.

◆ store() [4/10]

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

Definition at line 24 of file tls_handshake_state_13.cpp.

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

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 13 of file tls_handshake_state_13.cpp.

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

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 44 of file tls_handshake_state_13.cpp.

44 {
45 m_encrypted_extensions = std::move(encrypted_extensions);
46 return m_encrypted_extensions.value();
47}
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 67 of file tls_handshake_state_13.cpp.

67 {
68 auto& target = ((m_side == Connection_Side::Client) == from_peer) ? m_server_finished : m_client_finished;
69 target = std::move(finished);
70 return target.value();
71}

References Botan::TLS::Client.

◆ 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 39 of file tls_handshake_state_13.cpp.

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

References hello_retry_request().

◆ store() [9/10]

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

Definition at line 34 of file tls_handshake_state_13.cpp.

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

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 29 of file tls_handshake_state_13.cpp.

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

References server_hello().


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