8 #ifndef BOTAN_TLS_MESSAGES_H__
9 #define BOTAN_TLS_MESSAGES_H__
11 #include <botan/tls_record.h>
12 #include <botan/internal/tls_handshake_hash.h>
13 #include <botan/tls_policy.h>
14 #include <botan/bigint.h>
15 #include <botan/pkcs8.h>
16 #include <botan/x509cert.h>
34 virtual SecureVector<byte> serialize()
const = 0;
35 virtual void deserialize(
const MemoryRegion<byte>&) = 0;
52 std::string
hostname()
const {
return requested_hostname; }
67 deserialize_sslv2(buf);
77 std::vector<u16bit> suites;
78 std::vector<byte> comp_algos;
79 std::string requested_hostname;
80 std::string requested_srp_id;
122 std::vector<X509_Certificate>
cert_chain()
const {
return certs; }
130 std::vector<X509_Certificate> certs;
149 const std::vector<X509_Certificate>&);
156 std::vector<X509_DN> names;
157 std::vector<Certificate_Type> types;
239 const std::vector<X509_Certificate>&,
276 std::vector<BigInt> params;
virtual ~HandshakeMessage()
Server_Hello(const MemoryRegion< byte > &buf)
void send(Record_Writer &, HandshakeHash &) const
std::string srp_identifier() const
const SecureVector< byte > & random() const
bool verify(const X509_Certificate &, HandshakeHash &)
SecureVector< byte > pre_master_secret() const
u16bit ciphersuite() const
Handshake_Type type() const
Finished(Record_Writer &, Version_Code, Connection_Side, const MemoryRegion< byte > &, HandshakeHash &)
byte compression_algo() const
Certificate(Record_Writer &, const std::vector< X509_Certificate > &, HandshakeHash &)
bool verify(const X509_Certificate &, const MemoryRegion< byte > &, const MemoryRegion< byte > &) const
virtual Handshake_Type type() const =0
Handshake_Type type() const
Handshake_Type type() const
std::vector< X509_DN > acceptable_CAs() const
Certificate(const MemoryRegion< byte > &buf)
Server_Hello_Done(const MemoryRegion< byte > &buf)
std::vector< X509_Certificate > cert_chain() const
const SecureVector< byte > & session_id() const
std::vector< u16bit > ciphersuites() const
const SecureVector< byte > & random() const
Hello_Request(const MemoryRegion< byte > &buf)
const SecureVector< byte > & session_id() const
RandomNumberGenerator * rng
std::vector< byte > compression_algos() const
Certificate_Verify(RandomNumberGenerator &rng, Record_Writer &, HandshakeHash &, const Private_Key *)
Server_Hello(RandomNumberGenerator &rng, Record_Writer &, const TLS_Policy &, const std::vector< X509_Certificate > &, const Client_Hello &, Version_Code, HandshakeHash &)
std::vector< Certificate_Type > acceptable_types() const
Hello_Request(Record_Writer &)
Handshake_Type type() const
Handshake_Type type() const
Certificate_Verify(const MemoryRegion< byte > &buf)
Handshake_Type type() const
Finished(const MemoryRegion< byte > &buf)
Server_Hello_Done(Record_Writer &, HandshakeHash &)
Client_Hello(const MemoryRegion< byte > &buf, Handshake_Type type)
Server_Key_Exchange(RandomNumberGenerator &rng, Record_Writer &, const Public_Key *, const Private_Key *, const MemoryRegion< byte > &, const MemoryRegion< byte > &, HandshakeHash &)
Version_Code version() const
Server_Key_Exchange(const MemoryRegion< byte > &buf)
std::string hostname() const
Client_Key_Exchange(RandomNumberGenerator &rng, Record_Writer &output, HandshakeHash &hash, const Public_Key *my_key, Version_Code using_version, Version_Code pref_version)
Handshake_Type type() const
Handshake_Type type() const
Certificate_Req(const MemoryRegion< byte > &buf)
Certificate_Req(Record_Writer &, HandshakeHash &, const std::vector< X509_Certificate > &)
Handshake_Type type() const
bool offered_suite(u16bit) const
Client_Hello(RandomNumberGenerator &rng, Record_Writer &, const TLS_Policy &, HandshakeHash &)
Handshake_Type type() const
bool verify(const MemoryRegion< byte > &, Version_Code, const HandshakeHash &, Connection_Side)