Botan
1.10.16
|
#include <tls_client.h>
Public Member Functions | |
void | add_client_cert (const X509_Certificate &cert, Private_Key *cert_key) |
void | close () |
bool | is_closed () const |
std::vector< X509_Certificate > | peer_cert_chain () const |
size_t | read (byte &in) |
size_t | read (byte buf[], size_t buf_len) |
TLS_Client (std::tr1::function< size_t(byte[], size_t)> input_fn, std::tr1::function< void(const byte[], size_t)> output_fn, const TLS_Policy &policy, RandomNumberGenerator &rng) | |
void | write (byte out) |
void | write (const byte buf[], size_t buf_len) |
~TLS_Client () | |
SSL/TLS Client
Definition at line 22 of file tls_client.h.
Botan::TLS_Client::TLS_Client | ( | std::tr1::function< size_t(byte[], size_t)> | input_fn, |
std::tr1::function< void(const byte[], size_t)> | output_fn, | ||
const TLS_Policy & | policy, | ||
RandomNumberGenerator & | rng | ||
) |
TLS Client Constructor
Definition at line 84 of file tls_client.cpp.
Botan::TLS_Client::~TLS_Client | ( | ) |
TLS Client Destructor
Definition at line 105 of file tls_client.cpp.
References Botan::Record_Writer::alert(), close(), Botan::FATAL, Botan::HANDSHAKE_FAILURE, Botan::NO_ALERT_TYPE, Botan::TLS_Policy::pref_version(), Botan::Record_Writer::reset(), Botan::Record_Reader::reset(), Botan::Record_Writer::set_version(), and Botan::TLS_Exception::type().
void Botan::TLS_Client::add_client_cert | ( | const X509_Certificate & | cert, |
Private_Key * | cert_key | ||
) |
Definition at line 96 of file tls_client.cpp.
|
virtual |
Close a TLS connection
Implements Botan::TLS_Connection.
Definition at line 204 of file tls_client.cpp.
References Botan::CLOSE_NOTIFY, and Botan::WARNING.
Referenced by is_closed(), and ~TLS_Client().
bool Botan::TLS_Client::is_closed | ( | ) | const |
Check connection status
Definition at line 212 of file tls_client.cpp.
References Botan::Record_Reader::add_input(), Botan::ALERT, Botan::Record_Writer::alert(), Botan::APPLICATION_DATA, Botan::BAD_CERTIFICATE, Botan::CERTIFICATE, Botan::CERTIFICATE_REQUEST, Botan::CHANGE_CIPHER_SPEC, Botan::TLS_Policy::check_cert(), Botan::CLIENT, Botan::Handshake_State::client_hello, close(), Botan::CLOSE_NOTIFY, Botan::CONNECTION_CLOSED, Botan::DECRYPT_ERROR, Botan::FINISHED, Botan::Record_Writer::flush(), Botan::Record_Reader::get_record(), Botan::HANDSHAKE, Botan::HANDSHAKE_CCS, Botan::HANDSHAKE_FAILURE, Botan::HANDSHAKE_NONE, Botan::HELLO_REQUEST, Botan::ILLEGAL_PARAMETER, Botan::Alert::is_fatal(), Botan::make_u32bit(), Botan::TLS_Policy::min_version(), Botan::PROTOCOL_VERSION, Botan::Record_Writer::reset(), Botan::Record_Reader::reset(), Botan::MemoryRegion< T >::resize(), Botan::Record_Writer::send(), Botan::SERVER, Botan::SERVER_HELLO, Botan::SERVER_HELLO_DONE, Botan::SERVER_KEX, Botan::Record_Writer::set_keys(), Botan::Record_Reader::set_keys(), Botan::Record_Writer::set_version(), Botan::Record_Reader::set_version(), Botan::MemoryRegion< T >::size(), Botan::TLS_ALGO_KEYEXCH_DH, Botan::TLS_ALGO_KEYEXCH_NOKEX, Botan::TLS_ALGO_KEYEXCH_RSA, Botan::TLS_ALGO_SIGNER_ANON, Botan::TLS_ALGO_SIGNER_DSA, Botan::TLS_ALGO_SIGNER_RSA, Botan::Alert::type(), Botan::UNSUPPORTED_CERTIFICATE, Botan::WARNING, and Botan::SecureQueue::write().
|
virtual |
Return the peer's certificate chain
Implements Botan::TLS_Connection.
Definition at line 162 of file tls_client.cpp.
|
inlineinherited |
Definition at line 24 of file tls_connection.h.
References Botan::TLS_Connection::read().
Referenced by Botan::TLS_Connection::read().
|
virtual |
Read from a TLS connection
Implements Botan::TLS_Connection.
Definition at line 182 of file tls_client.cpp.
References Botan::Record_Writer::flush(), Botan::SecureQueue::read(), and Botan::SecureQueue::size().
|
inlineinherited |
Definition at line 25 of file tls_connection.h.
References Botan::TLS_Connection::write().
Referenced by Botan::TLS_Connection::write().
|
virtual |
Write to a TLS connection
Implements Botan::TLS_Connection.
Definition at line 170 of file tls_client.cpp.
References Botan::APPLICATION_DATA, Botan::INTERNAL_ERROR, and Botan::Record_Writer::send().