Botan 2.1.0 Crypto and TLS for C++11

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
Botan::TLS::Finished Class Referencefinal

`#include <tls_messages.h>`

Inheritance diagram for Botan::TLS::Finished:

## Public Member Functions
| Finished (Handshake_IO &io, Handshake_State &state, Connection_Side side)
| Finished (const std::vector< uint8_t > &buf)
Handshake_Type | type () const override
std::string | type_string () const
bool | verify (const Handshake_State &state, Connection_Side side) const
std::vector< uint8_t > | verify_data () const

## Detailed Description

Finished Message

Definition at line 542 of file tls_messages.h.

## Constructor & Destructor Documentation

Botan::TLS::Finished::Finished | ( | Handshake_IO & | io,
|  | Handshake_State & | state,
|  | Connection_Side | side
| ) |  |

Definition at line 51 of file msg_finished.cpp.

References Botan::TLS::Handshake_State::hash(), Botan::TLS::Handshake_IO::send(), and Botan::TLS::Handshake_Hash::update().

53 : m_verification_data(finished_compute_verify( state, side ))
54 {
55 state.hash().update(io.send(*this));
56 }

Botan::TLS::Finished::Finished | ( | const std::vector< uint8_t > & | buf | ) |
| explicit

Definition at line 69 of file msg_finished.cpp.

69 : m_verification_data(buf)
70 {}

## Member Function Documentation

Handshake_Type Botan::TLS::Finished::type | ( |  | ) | const
| inline override virtual

Returns
  the message type

Implements Botan::TLS::Handshake_Message.

Definition at line 545 of file tls_messages.h.

References Botan::TLS::FINISHED.

545 { return FINISHED; }
Botan::TLS::FINISHED
Definition: tls_magic.h:50

std::string Botan::TLS::Handshake_Message::type_string | ( |  | ) | const
| inherited

Returns
  string representation of this message type

Definition at line 17 of file tls_handshake_state.cpp.

References Botan::TLS::handshake_type_to_string(), and Botan::TLS::Handshake_Message::type().

18 {
19 return handshake_type_to_string(type());
20 }
Botan::TLS::Handshake_Message::type
virtual Handshake_Type type() const =0
Botan::TLS::handshake_type_to_string
const char * handshake_type_to_string(Handshake_Type type)
Definition: tls_handshake_state.cpp:22

bool Botan::TLS::Finished::verify | ( | const Handshake_State & | state,
|  | Connection_Side | side
| ) |  | const

Definition at line 75 of file msg_finished.cpp.

References Botan::same_mem().

77 {
78 std::vector<byte> computed_verify = finished_compute_verify(state, side);
79
80 #if defined(BOTAN_UNSAFE_FUZZER_MODE)
81 return true;
82 #else
83 return (m_verification_data.size() == computed_verify.size()) &&
84 same_mem(m_verification_data.data(), computed_verify.data(), computed_verify.size());
85 #endif
86 }
Botan::same_mem
bool same_mem(const T *p1, const T *p2, size_t n)
Definition: mem_ops.h:98

std::vector<uint8_t> Botan::TLS::Finished::verify_data | ( |  | ) | const
| inline

Definition at line 547 of file tls_messages.h.

548 { return m_verification_data; }

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

- src/lib/tls/tls_messages.h
- src/lib/tls/msg_finished.cpp