Botan 3.11.0
Crypto and TLS for C&
msg_finished_13.cpp
Go to the documentation of this file.
1/*
2* Finished Message
3* (C) 2021-2022 Jack Lloyd
4* 2021 Elektrobit Automotive GmbH
5* 2022 René Meusel, Hannes Rantzsch - neXenio GmbH
6*
7* Botan is released under the Simplified BSD License (see license.txt)
8*/
9
10#include <botan/tls_messages_13.h>
11
12#include <botan/internal/tls_cipher_state.h>
13
14namespace Botan::TLS {
15
16Finished_13::Finished_13(Cipher_State* cipher_state, const Transcript_Hash& transcript_hash) {
17 m_verification_data = cipher_state->finished_mac(transcript_hash);
18}
19
20bool Finished_13::verify(Cipher_State* cipher_state, const Transcript_Hash& transcript_hash) const {
21 return cipher_state->verify_peer_finished_mac(transcript_hash, m_verification_data);
22}
23
24} // namespace Botan::TLS
bool verify_peer_finished_mac(const Transcript_Hash &transcript_hash, const std::vector< uint8_t > &peer_mac) const
std::vector< uint8_t > finished_mac(const Transcript_Hash &transcript_hash) const
bool verify(Cipher_State *cipher_state, const Transcript_Hash &transcript_hash) const
Finished_13(Cipher_State *cipher_state, const Transcript_Hash &transcript_hash)
std::vector< uint8_t > m_verification_data
std::vector< uint8_t > Transcript_Hash
Definition tls_magic.h:93