9#ifndef BOTAN_TLS_HANDSHAKE_STATE_H_
10#define BOTAN_TLS_HANDSHAKE_STATE_H_
12#include <botan/pk_keys.h>
13#include <botan/pubkey.h>
14#include <botan/tls_callbacks.h>
15#include <botan/tls_ciphersuite.h>
16#include <botan/tls_exceptn.h>
17#include <botan/tls_handshake_msg.h>
18#include <botan/internal/tls_handshake_hash.h>
19#include <botan/internal/tls_handshake_io.h>
20#include <botan/internal/tls_handshake_transitions.h>
21#include <botan/internal/tls_session_key.h>
33class Signature_Scheme;
35class Hello_Verify_Request;
39class Certificate_Status;
40class Server_Key_Exchange;
41class Certificate_Request_12;
42class Server_Hello_Done;
43class Client_Key_Exchange;
44class Certificate_Verify_12;
45class New_Session_Ticket_12;
93 const std::vector<Signature_Scheme>& offered_schemes,
95 const Policy& policy)
const;
100 const Policy& policy)
const;
180 std::unique_ptr<Handshake_IO> m_handshake_io;
184 std::optional<Ciphersuite> m_ciphersuite;
188 std::unique_ptr<Client_Hello_12> m_client_hello;
189 std::unique_ptr<Server_Hello_12> m_server_hello;
191 std::unique_ptr<Certificate_12> m_server_certs;
192 std::unique_ptr<Certificate_Status> m_server_cert_status;
193 std::unique_ptr<Server_Key_Exchange> m_server_kex;
194 std::unique_ptr<Certificate_Request_12> m_cert_req;
195 std::unique_ptr<Server_Hello_Done> m_server_hello_done;
196 std::unique_ptr<Certificate_12> m_client_certs;
197 std::unique_ptr<Client_Key_Exchange> m_client_kex;
198 std::unique_ptr<Certificate_Verify_12> m_client_verify;
199 std::unique_ptr<Certificate_Verify_12> m_server_verify;
200 std::unique_ptr<New_Session_Ticket_12> m_new_session_ticket;
201 std::unique_ptr<Finished_12> m_server_finished;
202 std::unique_ptr<Finished_12> m_client_finished;
std::pair< std::string, Signature_Format > parse_sig_format(const Public_Key &key, Signature_Scheme scheme, const std::vector< Signature_Scheme > &offered_schemes, bool for_client_auth, const Policy &policy) const
std::pair< Handshake_Type, std::vector< uint8_t > > get_next_handshake_msg()
const Server_Hello_Done * server_hello_done() const
void hello_verify_request(const Hello_Verify_Request &hello_verify)
void set_expected_next(Handshake_Type msg_type)
void note_message(const Handshake_Message &msg)
const Server_Key_Exchange * server_kex() const
virtual ~Handshake_State()
const Certificate_Status * server_cert_status() const
const Certificate_Verify_12 * server_verify() const
Handshake_State(std::unique_ptr< Handshake_IO > io, Callbacks &callbacks)
Callbacks & callbacks() const
Handshake_IO & handshake_io()
const Certificate_Verify_12 * client_verify() const
const Finished_12 * server_finished() const
Handshake_State & operator=(const Handshake_State &)=delete
const Session_Keys & session_keys() const
const Client_Hello_12 * client_hello() const
Handshake_State(const Handshake_State &)=delete
const Client_Key_Exchange * client_kex() const
const Handshake_Hash & hash() const
void confirm_transition_to(Handshake_Type msg_type)
void set_version(const Protocol_Version &version)
std::optional< std::string > psk_identity() const
const Certificate_12 * server_certs() const
const Certificate_12 * client_certs() const
const Finished_12 * client_finished() const
const Certificate_Request_12 * cert_req() const
void compute_session_keys()
const Ciphersuite & ciphersuite() const
Session_Ticket session_ticket() const
const Server_Hello_12 * server_hello() const
bool received_handshake_msg(Handshake_Type msg_type) const
std::unique_ptr< KDF > protocol_specific_prf() const
const New_Session_Ticket_12 * new_session_ticket() const
std::pair< std::string, Signature_Format > choose_sig_format(const Private_Key &key, Signature_Scheme &scheme, bool for_client_auth, const Policy &policy) const
Protocol_Version version() const
std::vector< T, secure_allocator< T > > secure_vector