Botan: Botan::HandshakeMessage Class Reference

Botan 1.10.16

Public Member Functions | List of all members
Botan::HandshakeMessage Class Referenceabstract

`#include <tls_messages.h>`

Inheritance diagram for Botan::HandshakeMessage:

## Public Member Functions
void | send (Record_Writer &, HandshakeHash &) const
virtual Handshake_Type | type () const =0
virtual | ~HandshakeMessage ()

## Detailed Description

TLS Handshake Message Base Class

Definition at line 24 of file tls_messages.h.

## Constructor & Destructor Documentation

## ◆ ~HandshakeMessage()

virtual Botan::HandshakeMessage::~HandshakeMessage | ( |  | ) |
| inlinevirtual

Definition at line 31 of file tls_messages.h.

31 {}

## Member Function Documentation

## ◆ send()

void Botan::HandshakeMessage::send | ( | Record_Writer & | writer,
|  | HandshakeHash & | hash
| ) |  | const

Definition at line 16 of file hello.cpp.

References Botan::Record_Writer::flush(), Botan::HANDSHAKE, Botan::Record_Writer::send(), Botan::MemoryRegion< T >::size(), type(), and Botan::HandshakeHash::update().

Referenced by Botan::Certificate::Certificate(), Botan::Certificate_Req::Certificate_Req(), Botan::Finished::Finished(), Botan::Hello_Request::Hello_Request(), and Botan::Server_Hello_Done::Server_Hello_Done().

17 {
18 SecureVector<byte> buf = serialize();
19 SecureVector<byte> send_buf(4);
20
21 const size_t buf_size = buf.size();
22
23 send_buf[0] = type();
24
25 for(size_t i = 1; i != 4; ++i)
26 send_buf[i] = get_byte<u32bit>(i, buf_size);
27
28 send_buf += buf;
29
30 hash.update(send_buf);
31
32 writer.send(HANDSHAKE, &send_buf[0], send_buf.size());
33 writer.flush();
34 }
Botan::HANDSHAKE
Definition: tls_magic.h:36
Botan::HandshakeMessage::type
virtual Handshake_Type type() const =0

## ◆ type()

virtual Handshake_Type Botan::HandshakeMessage::type | ( |  | ) | const
| pure virtual

Implemented in Botan::Server_Hello_Done, Botan::Server_Key_Exchange, Botan::Server_Hello, Botan::Hello_Request, Botan::Finished, Botan::Certificate_Verify, Botan::Certificate_Req, Botan::Certificate, Botan::Client_Key_Exchange, and Botan::Client_Hello.

Referenced by send().

The documentation for this class was generated from the following files:

- src/ssl/tls_messages.h
- src/ssl/hello.cpp