tls13_client_misc.c File Reference

Helper functions for TLS 1.3 client. More...

#include "tls.h"
#include "tls_handshake.h"
#include "tls_client.h"
#include "tls_common.h"
#include "tls_transcript_hash.h"
#include "tls_record.h"
#include "tls_misc.h"
#include "tls13_client_misc.h"
#include "tls13_key_material.h"
#include "tls13_ticket.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   TLS_TRACE_LEVEL
 

Functions

bool_t tls13IsHelloRetryRequest (const TlsServerHello *message, size_t length)
 Check whether an incoming ServerHello message is a HelloRetryRequest. More...
 
error_t tls13ComputePskBinders (TlsContext *context, const void *clientHello, size_t clientHelloLen, const Tls13PskIdentityList *identityList, Tls13PskBinderList *binderList)
 Compute PSK binder values. More...
 
error_t tls13SendEarlyData (TlsContext *context, const void *data, size_t length, size_t *written)
 Send early data to the remote TLS server. More...
 

Detailed Description

Helper functions for TLS 1.3 client.

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.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
2.4.4

Definition in file tls13_client_misc.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   TLS_TRACE_LEVEL

Definition at line 32 of file tls13_client_misc.c.

Function Documentation

◆ tls13ComputePskBinders()

error_t tls13ComputePskBinders ( TlsContext context,
const void *  clientHello,
size_t  clientHelloLen,
const Tls13PskIdentityList identityList,
Tls13PskBinderList binderList 
)

Compute PSK binder values.

Parameters
[in]contextPointer to the TLS context
[in]clientHelloPointer to the ClientHello message
[in]clientHelloLenLength of the ClientHello message
[in]identityListList of the identities that the client is willing to negotiate with the server
[in,out]binderListList of HMAC values, one for each PSK offered in the PreSharedKey extension
Returns
Error code

Definition at line 96 of file tls13_client_misc.c.

◆ tls13IsHelloRetryRequest()

bool_t tls13IsHelloRetryRequest ( const TlsServerHello message,
size_t  length 
)

Check whether an incoming ServerHello message is a HelloRetryRequest.

Parameters
[in]messagePointer to the ServerHello message
[in]lengthLength of the ServerHello message
Returns
TRUE is the message is a HelloRetryRequest, else FALSE

Definition at line 59 of file tls13_client_misc.c.

◆ tls13SendEarlyData()

error_t tls13SendEarlyData ( TlsContext context,
const void *  data,
size_t  length,
size_t *  written 
)

Send early data to the remote TLS server.

Parameters
[in]contextPointer to the TLS context
[in]dataPointer to a buffer containing the data to be transmitted
[in]lengthNumber of bytes to be transmitted
[out]writtenActual number of bytes written
Returns
Error code

Definition at line 192 of file tls13_client_misc.c.