Botan 2.19.5 Crypto and TLS for C&

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 (const std::vector< uint8_t > &buf)
| Finished (Handshake_IO &io, Handshake_State &state, Connection_Side side)
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 493 of file tls_messages.h.

## Constructor & Destructor Documentation

## ◆ Finished() [1/2]

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

Definition at line 52 of file msg_finished.cpp.

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

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

## ◆ Finished() [2/2]

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

Definition at line 70 of file msg_finished.cpp.

70 : m_verification_data(buf)
71 {}

## Member Function Documentation

## ◆ type()

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

Returns
  the message type

Implements Botan::TLS::Handshake_Message.

Definition at line 496 of file tls_messages.h.

496{ return FINISHED; }
Botan::TLS::FINISHED
@ FINISHED
Definition: tls_magic.h:57

References Botan::TLS::FINISHED.

## ◆ type_string()

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

Returns
  string representation of this message type

Definition at line 19 of file tls_handshake_state.cpp.

20 {
21 return handshake_type_to_string(type());
22 }
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:24

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

## ◆ verify()

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

Definition at line 76 of file msg_finished.cpp.

78 {
79 std::vector<byte> computed_verify = finished_compute_verify(state, side);
80
81#if defined(BOTAN_UNSAFE_FUZZER_MODE)
82 return true;
83#else
84 return (m_verification_data.size() == computed_verify.size()) &&
85 constant_time_compare(m_verification_data.data(), computed_verify.data(), computed_verify.size());
86#endif
87 }
Botan::constant_time_compare
bool constant_time_compare(const uint8_t x[], const uint8_t y[], size_t len)
Definition: mem_ops.h:82

References Botan::constant_time_compare().

## ◆ verify_data()

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

Definition at line 498 of file tls_messages.h.

499 { 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