10#ifndef BOTAN_TLS_CHANNEL_IMPL_13_H_
11#define BOTAN_TLS_CHANNEL_IMPL_13_H_
13#include <botan/internal/stl_util.h>
14#include <botan/internal/tls_channel_impl.h>
15#include <botan/internal/tls_handshake_layer_13.h>
16#include <botan/internal/tls_record_layer_13.h>
17#include <botan/internal/tls_transcript_hash_13.h>
42 virtual void maybe_log_secret(std::string_view label, std::span<const uint8_t> secret)
const = 0;
76 std::vector<uint8_t>
send();
135 const std::shared_ptr<RandomNumberGenerator>&
rng,
136 const std::shared_ptr<const Policy>&
policy,
145 size_t from_peer(std::span<const uint8_t> data)
override;
146 void to_peer(std::span<const uint8_t> data)
override;
240 template <
typename... MsgTs>
245 template <
typename MsgT>
275 void send_record(
Record_Type record_type,
const std::vector<uint8_t>& record);
321 std::shared_ptr<Callbacks> m_callbacks;
324 std::shared_ptr<Session_Manager> m_session_manager;
325 std::shared_ptr<Credentials_Manager> m_credentials_manager;
326 std::shared_ptr<RandomNumberGenerator> m_rng;
327 std::shared_ptr<const Policy> m_policy;
336 bool m_opportunistic_key_update;
337 bool m_first_message_sent;
338 bool m_first_message_received;
AggregatedHandshakeMessages & add(Handshake_Message_13_Ref message)
AggregatedHandshakeMessages(Channel_Impl_13 &channel, Handshake_Layer &handshake_layer, Transcript_Hash_State &transcript_hash)
AggregatedMessages & operator=(AggregatedMessages &&)=delete
std::vector< uint8_t > send()
AggregatedMessages(const AggregatedMessages &)=delete
bool contains_messages() const
AggregatedMessages(AggregatedMessages &&)=delete
std::vector< uint8_t > m_message_buffer
~AggregatedMessages()=default
AggregatedMessages(Channel_Impl_13 &channel, Handshake_Layer &handshake_layer)
Handshake_Layer & m_handshake_layer
Channel_Impl_13 & m_channel
AggregatedMessages & operator=(const AggregatedMessages &)=delete
AggregatedPostHandshakeMessages & add(Post_Handshake_Message_13 message)
~Channel_Impl_13() override
std::vector< uint8_t > send_handshake_message(std::reference_wrapper< MsgT > message)
const Policy & policy() const
AggregatedPostHandshakeMessages aggregate_post_handshake_messages()
void expect_downgrade(const Server_Information &server_info, const std::vector< std::string > &next_protocols)
SymmetricKey key_material_export(std::string_view label, std::string_view context, size_t length) const override
Channel_Impl_13(const Channel_Impl_13 &)=delete
void handle(const Key_Update &key_update)
std::vector< uint8_t > send_post_handshake_message(Post_Handshake_Message_13 message)
AggregatedHandshakeMessages aggregate_handshake_messages()
Credentials_Manager & credentials_manager()
void send_dummy_change_cipher_spec()
RandomNumberGenerator & rng()
std::vector< uint8_t > send_handshake_message(const std::variant< MsgTs... > &message)
void renegotiate(bool) override
void opportunistically_update_traffic_keys()
bool is_closed_for_reading() const override
virtual bool prepend_ccs()
bool secure_renegotiation_supported() const override
void to_peer(std::span< const uint8_t > data) override
bool timeout_check() override
Channel_Impl_13 & operator=(const Channel_Impl_13 &)=delete
Transcript_Hash_State m_transcript_hash
virtual void process_post_handshake_msg(Post_Handshake_Message_13 msg)=0
virtual void process_handshake_msg(Handshake_Message_13 msg)=0
Channel_Impl_13(const std::shared_ptr< Callbacks > &callbacks, const std::shared_ptr< Session_Manager > &session_manager, const std::shared_ptr< Credentials_Manager > &credentials_manager, const std::shared_ptr< RandomNumberGenerator > &rng, const std::shared_ptr< const Policy > &policy, bool is_server)
void send_alert(const Alert &alert) override
size_t from_peer(std::span< const uint8_t > data) override
void update_traffic_keys(bool request_peer_update=false) override
virtual void process_dummy_change_cipher_spec()=0
Session_Manager & session_manager()
bool is_closed() const override
std::unique_ptr< Cipher_State > m_cipher_state
const Connection_Side m_side
bool is_active() const override
Callbacks & callbacks() const
void set_selected_certificate_type(Certificate_Type cert_type)
bool is_closed_for_writing() const override
void set_record_size_limits(uint16_t outgoing_limit, uint16_t incoming_limit)
virtual void maybe_log_secret(std::string_view label, std::span< const uint8_t > secret) const =0
virtual ~Secret_Logger()=default
as_wrapped_references_t< Handshake_Message_13 > Handshake_Message_13_Ref
std::variant< New_Session_Ticket_13, Key_Update > Post_Handshake_Message_13
std::variant< Client_Hello_13, Client_Hello_12, Server_Hello_13, Server_Hello_12, Hello_Retry_Request, Encrypted_Extensions, Certificate_13, Certificate_Request_13, Certificate_Verify_13, Finished_13 > Handshake_Message_13
constexpr GeneralVariantT generalize_to(SpecialT &&specific) noexcept
Converts a given variant into another variant-ish whose type states are a super set of the given vari...
std::vector< T, secure_allocator< T > > secure_vector