Botan
2.1.0
Crypto and TLS for C++11
|
Typedefs | |
typedef std::function< std::shared_ptr< Connection_Cipher_State >uint16_t)> | get_cipherstate_fn |
Functions | |
template<typename T , typename Alloc > | |
void | append_tls_length_value (std::vector< uint8_t, Alloc > &buf, const T *vals, size_t vals_size, size_t tag_size) |
template<typename T , typename Alloc , typename Alloc2 > | |
void | append_tls_length_value (std::vector< uint8_t, Alloc > &buf, const std::vector< T, Alloc2 > &vals, size_t tag_size) |
template<typename Alloc > | |
void | append_tls_length_value (std::vector< uint8_t, Alloc > &buf, const std::string &str, size_t tag_size) |
const char * | handshake_type_to_string (Handshake_Type type) |
std::vector< uint8_t > | make_hello_random (RandomNumberGenerator &rng, const Policy &policy) |
bool | operator!= (const Server_Information &a, const Server_Information &b) |
bool | operator< (const Server_Information &a, const Server_Information &b) |
bool | operator== (const Server_Information &a, const Server_Information &b) |
size_t | read_record (secure_vector< uint8_t > &readbuf, Record_Raw_Input &raw_input, Record &rec, Connection_Sequence_Numbers *sequence_numbers, get_cipherstate_fn get_cipherstate) |
void | write_record (secure_vector< uint8_t > &output, Record_Message msg, Protocol_Version version, uint64_t seq, Connection_Cipher_State *cs, RandomNumberGenerator &rng) |
typedef std::function<std::shared_ptr<Connection_Cipher_State>uint16_t)> Botan::TLS::get_cipherstate_fn |
Definition at line 166 of file tls_record.h.
anonymous enum |
Enumerator | |
---|---|
TLS_EMPTY_RENEGOTIATION_INFO_SCSV | |
TLS_FALLBACK_SCSV |
Definition at line 23 of file msg_client_hello.cpp.
Enumerator | |
---|---|
NO_COMPRESSION | |
DEFLATE_COMPRESSION |
Definition at line 61 of file tls_magic.h.
Enumerator | |
---|---|
CLIENT | |
SERVER |
Definition at line 27 of file tls_magic.h.
Definition at line 27 of file tls_extensions.h.
Definition at line 38 of file tls_magic.h.
Enumerator | |
---|---|
CHANGE_CIPHER_SPEC | |
ALERT | |
HANDSHAKE | |
APPLICATION_DATA | |
NO_RECORD |
Definition at line 29 of file tls_magic.h.
Protocol Constants for SSL/TLS
Enumerator | |
---|---|
TLS_HEADER_SIZE | |
DTLS_HEADER_SIZE | |
MAX_PLAINTEXT_SIZE | |
MAX_COMPRESSED_SIZE | |
MAX_CIPHERTEXT_SIZE |
Definition at line 18 of file tls_magic.h.
void Botan::TLS::append_tls_length_value | ( | std::vector< uint8_t, Alloc > & | buf, |
const T * | vals, | ||
size_t | vals_size, | ||
size_t | tag_size | ||
) |
Helper function for encoding length-tagged vectors
Definition at line 185 of file tls_reader.h.
References Botan::get_byte().
Referenced by append_tls_length_value(), Botan::TLS::Client_Key_Exchange::Client_Key_Exchange(), Botan::TLS::Renegotiation_Extension::serialize(), Botan::TLS::Application_Layer_Protocol_Notification::serialize(), and Botan::TLS::Server_Key_Exchange::Server_Key_Exchange().
void Botan::TLS::append_tls_length_value | ( | std::vector< uint8_t, Alloc > & | buf, |
const std::vector< T, Alloc2 > & | vals, | ||
size_t | tag_size | ||
) |
Definition at line 209 of file tls_reader.h.
References append_tls_length_value().
void Botan::TLS::append_tls_length_value | ( | std::vector< uint8_t, Alloc > & | buf, |
const std::string & | str, | ||
size_t | tag_size | ||
) |
Definition at line 217 of file tls_reader.h.
References append_tls_length_value().
const char * Botan::TLS::handshake_type_to_string | ( | Handshake_Type | type | ) |
Definition at line 22 of file tls_handshake_state.cpp.
References CERTIFICATE, CERTIFICATE_REQUEST, CERTIFICATE_STATUS, CERTIFICATE_URL, CERTIFICATE_VERIFY, CLIENT_HELLO, CLIENT_KEX, FINISHED, HANDSHAKE_CCS, HANDSHAKE_NONE, HELLO_REQUEST, HELLO_VERIFY_REQUEST, NEW_SESSION_TICKET, SERVER_HELLO, SERVER_HELLO_DONE, SERVER_KEX, and Botan::ASN1::to_string().
Referenced by Botan::TLS::Handshake_Message::type_string().
std::vector< uint8_t > Botan::TLS::make_hello_random | ( | RandomNumberGenerator & | rng, |
const Policy & | policy | ||
) |
Definition at line 28 of file msg_client_hello.cpp.
References Botan::TLS::Policy::include_time_in_hello_random(), Botan::RandomNumberGenerator::randomize(), and Botan::store_be().
|
inline |
Definition at line 84 of file tls_server_info.h.
|
inline |
Definition at line 89 of file tls_server_info.h.
References Botan::TLS::Server_Information::hostname(), Botan::TLS::Server_Information::port(), and Botan::TLS::Server_Information::service().
|
inline |
Definition at line 76 of file tls_server_info.h.
References Botan::TLS::Server_Information::hostname(), Botan::TLS::Server_Information::port(), and Botan::TLS::Server_Information::service().
size_t Botan::TLS::read_record | ( | secure_vector< uint8_t > & | read_buffer, |
Record_Raw_Input & | raw_input, | ||
Record & | rec, | ||
Connection_Sequence_Numbers * | sequence_numbers, | ||
get_cipherstate_fn | get_cipherstate | ||
) |
Decode a TLS record
Definition at line 494 of file tls_record.cpp.
References Botan::TLS::Record_Raw_Input::is_datagram().
Referenced by Botan::TLS::Channel::received_data().
void Botan::TLS::write_record | ( | secure_vector< uint8_t > & | write_buffer, |
Record_Message | rec_msg, | ||
Protocol_Version | version, | ||
uint64_t | msg_sequence, | ||
Connection_Cipher_State * | cipherstate, | ||
RandomNumberGenerator & | rng | ||
) |
Create a TLS record
write_buffer | the output record is placed here |
rec_msg | is the plaintext message |
version | is the protocol version |
msg_sequence | is the sequence number |
cipherstate | is the writing cipher state |
rng | is a random number generator |
Definition at line 213 of file tls_record.cpp.
References Botan::TLS::Connection_Cipher_State::aead(), Botan::TLS::Connection_Cipher_State::aead_nonce(), BOTAN_ASSERT, Botan::TLS::Connection_Cipher_State::cbc_nonce(), Botan::Cipher_Mode::finish(), Botan::TLS::Connection_Cipher_State::format_ad(), Botan::get_byte(), Botan::TLS::Record_Message::get_data(), Botan::TLS::Record_Message::get_size(), Botan::TLS::Record_Message::get_type(), Botan::TLS::Protocol_Version::is_datagram_protocol(), Botan::TLS::Protocol_Version::major_version(), MAX_CIPHERTEXT_SIZE, Botan::TLS::Protocol_Version::minor_version(), Botan::TLS::Connection_Cipher_State::nonce_bytes_from_handshake(), Botan::TLS::Connection_Cipher_State::nonce_bytes_from_record(), Botan::Cipher_Mode::output_length(), Botan::AEAD_Mode::set_ad(), and Botan::Cipher_Mode::start().