Botan
1.10.9
|
#include <tls_record.h>
Public Member Functions | |
void | alert (Alert_Level, Alert_Type) |
void | flush () |
Record_Writer (std::tr1::function< void(const byte[], size_t)> output_fn) | |
void | reset () |
void | send (byte type, const byte input[], size_t length) |
void | send (byte type, byte val) |
void | set_keys (const CipherSuite &, const SessionKeys &, Connection_Side) |
void | set_version (Version_Code) |
~Record_Writer () | |
TLS Record Writer
Definition at line 39 of file tls_record.h.
Botan::Record_Writer::Record_Writer | ( | std::tr1::function< void(const byte[], size_t)> | out | ) |
|
inline |
void Botan::Record_Writer::alert | ( | Alert_Level | level, |
Alert_Type | type | ||
) |
Send an alert
Definition at line 264 of file rec_wri.cpp.
References Botan::ALERT, flush(), and send().
Referenced by Botan::TLS_Server::TLS_Server().
void Botan::Record_Writer::flush | ( | ) |
Split buffer into records, and send them all
Definition at line 162 of file rec_wri.cpp.
References Botan::MAX_PLAINTEXT_SIZE.
Referenced by alert(), Botan::TLS_Server::read(), Botan::TLS_Client::read(), Botan::HandshakeMessage::send(), and send().
void Botan::Record_Writer::reset | ( | ) |
Reset the state
Definition at line 30 of file rec_wri.cpp.
References Botan::Pipe::reset(), and Botan::zeroise().
Referenced by Record_Writer().
Send one or more records to the other side
Definition at line 131 of file rec_wri.cpp.
References Botan::MemoryRegion< T >::copy(), flush(), and Botan::MemoryRegion< T >::size().
Referenced by alert(), Botan::HandshakeMessage::send(), Botan::TLS_Server::write(), and Botan::TLS_Client::write().
Definition at line 43 of file tls_record.h.
References send().
Referenced by send().
void Botan::Record_Writer::set_keys | ( | const CipherSuite & | suite, |
const SessionKeys & | keys, | ||
Connection_Side | side | ||
) |
Set the keys for writing
Definition at line 63 of file rec_wri.cpp.
References Botan::Library_State::algorithm_factory(), Botan::Pipe::append(), Botan::block_size_of(), Botan::CipherSuite::cipher_algo(), Botan::CLIENT, Botan::SessionKeys::client_cipher_key(), Botan::SessionKeys::client_iv(), Botan::SessionKeys::client_mac_key(), Botan::ENCRYPTION, Botan::get_cipher(), Botan::Global_State_Management::global_state(), Botan::have_block_cipher(), Botan::have_hash(), Botan::have_stream_cipher(), Botan::CipherSuite::mac_algo(), Botan::Algorithm_Factory::make_mac(), Botan::Buffered_Computation::output_length(), Botan::Pipe::reset(), Botan::SessionKeys::server_cipher_key(), Botan::SessionKeys::server_iv(), Botan::SessionKeys::server_mac_key(), and Botan::SymmetricAlgorithm::set_key().
void Botan::Record_Writer::set_version | ( | Version_Code | version | ) |
Set the version to use
Definition at line 51 of file rec_wri.cpp.
References Botan::SSL_V3, Botan::TLS_V10, and Botan::TLS_V11.
Referenced by Botan::TLS_Server::TLS_Server().