9#ifndef BOTAN_TLS_SERVER_H_
10#define BOTAN_TLS_SERVER_H_
12#include <botan/tls_channel.h>
13#include <botan/tls_policy.h>
14#include <botan/credentials_manager.h>
21class Server_Handshake_State;
57 bool is_datagram =
false,
66 BOTAN_DEPRECATED(
"Use TLS::Server(TLS::Callbacks ...)")
76 bool is_datagram = false,
77 size_t reserved_io_buffer_size = TLS::
Server::IO_BUF_DEFAULT_SIZE
96 bool is_datagram = false
105 std::
string next_protocol()
const {
return m_next_protocol; }
116 std::vector<X509_Certificate>
120 bool force_full_renegotiation)
override;
125 const std::vector<uint8_t>& contents,
126 bool epoch0_restart)
override;
129 Server_Handshake_State& pending_state,
130 const std::vector<uint8_t>& contents,
131 bool epoch0_restart);
133 void process_certificate_msg(Server_Handshake_State& pending_state,
134 const std::vector<uint8_t>& contents);
136 void process_client_key_exchange_msg(Server_Handshake_State& pending_state,
137 const std::vector<uint8_t>& contents);
139 void process_change_cipher_spec_msg(Server_Handshake_State& pending_state);
141 void process_certificate_verify_msg(Server_Handshake_State& pending_state,
143 const std::vector<uint8_t>& contents);
145 void process_finished_msg(Server_Handshake_State& pending_state,
147 const std::vector<uint8_t>& contents);
149 void session_resume(Server_Handshake_State& pending_state,
150 bool have_session_ticket_key,
153 void session_create(Server_Handshake_State& pending_state,
154 bool have_session_ticket_key);
159 std::string m_next_protocol;
162 next_protocol_fn m_choose_next_protocol;
std::function< bool(const Session &)> handshake_cb
std::function< void(Alert, const uint8_t[], size_t)> alert_cb
std::function< void(const Handshake_Message &)> handshake_msg_cb
std::function< void(const uint8_t[], size_t)> output_fn
static size_t IO_BUF_DEFAULT_SIZE
std::function< void(const uint8_t[], size_t)> data_cb
std::string application_protocol() const override
std::function< std::string(std::vector< std::string >)> next_protocol_fn
int(* final)(unsigned char *, CTX *)
#define BOTAN_PUBLIC_API(maj, min)