Transcript hash calculation. More...
#include "tls.h"
#include "tls_client.h"
#include "tls_key_material.h"
#include "tls_transcript_hash.h"
#include "tls13_key_material.h"
#include "debug.h"
Go to the source code of this file.
Macros | |
#define | TRACE_LEVEL TLS_TRACE_LEVEL |
Functions | |
error_t | tlsInitTranscriptHash (TlsContext *context) |
Initialize handshake message hashing. More... | |
void | tlsUpdateTranscriptHash (TlsContext *context, const void *data, size_t length) |
Update hash value with a handshake message. More... | |
error_t | tlsFinalizeTranscriptHash (TlsContext *context, const HashAlgo *hash, const void *hashContext, const char_t *label, uint8_t *output) |
Finalize hash calculation from previous handshake messages. More... | |
void | tlsFreeTranscriptHash (TlsContext *context) |
Release transcript hash context. More... | |
__weak_func error_t | tlsComputeVerifyData (TlsContext *context, TlsConnectionEnd entity, uint8_t *verifyData, size_t *verifyDataLen) |
Compute verify data from previous handshake messages. More... | |
Detailed Description
Transcript hash calculation.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneSSL Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version
- 2.4.4
Definition in file tls_transcript_hash.c.
Macro Definition Documentation
◆ TRACE_LEVEL
#define TRACE_LEVEL TLS_TRACE_LEVEL |
Definition at line 32 of file tls_transcript_hash.c.
Function Documentation
◆ tlsComputeVerifyData()
__weak_func error_t tlsComputeVerifyData | ( | TlsContext * | context, |
TlsConnectionEnd | entity, | ||
uint8_t * | verifyData, | ||
size_t * | verifyDataLen | ||
) |
Compute verify data from previous handshake messages.
- Parameters
-
[in] context Pointer to the TLS context [in] entity Specifies whether the computation is performed at client or server side [out] verifyData Pointer to the buffer where to store the verify data [out] verifyDataLen Length of the verify data
- Returns
- Error code
Definition at line 339 of file tls_transcript_hash.c.
◆ tlsFinalizeTranscriptHash()
error_t tlsFinalizeTranscriptHash | ( | TlsContext * | context, |
const HashAlgo * | hash, | ||
const void * | hashContext, | ||
const char_t * | label, | ||
uint8_t * | output | ||
) |
Finalize hash calculation from previous handshake messages.
- Parameters
-
[in] context Pointer to the TLS context [in] hash Hash function used to digest the handshake messages [in] hashContext Pointer to the hash context [in] label NULL-terminated string [out] output Buffer where to store the resulting hash value
- Returns
- Error code
Definition at line 252 of file tls_transcript_hash.c.
◆ tlsFreeTranscriptHash()
void tlsFreeTranscriptHash | ( | TlsContext * | context | ) |
Release transcript hash context.
- Parameters
-
[in] context Pointer to the TLS context
Definition at line 296 of file tls_transcript_hash.c.
◆ tlsInitTranscriptHash()
error_t tlsInitTranscriptHash | ( | TlsContext * | context | ) |
Initialize handshake message hashing.
- Parameters
-
[in] context Pointer to the TLS context
- Returns
- Error code
Definition at line 52 of file tls_transcript_hash.c.
◆ tlsUpdateTranscriptHash()
void tlsUpdateTranscriptHash | ( | TlsContext * | context, |
const void * | data, | ||
size_t | length | ||
) |
Update hash value with a handshake message.
- Parameters
-
[in] context Pointer to the TLS context [in] data Pointer to the handshake message being hashed [in] length Length of the message
Definition at line 193 of file tls_transcript_hash.c.