tls13_client.c File Reference

Handshake message processing (TLS 1.3 client) More...

#include "tls.h"
#include "tls_cipher_suites.h"
#include "tls_handshake.h"
#include "tls_client_extensions.h"
#include "tls_client_misc.h"
#include "tls_extensions.h"
#include "tls_transcript_hash.h"
#include "tls_misc.h"
#include "tls13_client.h"
#include "tls13_client_extensions.h"
#include "tls13_key_material.h"
#include "tls13_ticket.h"
#include "tls13_misc.h"
#include "kdf/hkdf.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   TLS_TRACE_LEVEL
 

Functions

error_t tls13SendEndOfEarlyData (TlsContext *context)
 Send EndOfEarlyData message. More...
 
error_t tls13FormatEndOfEarlyData (TlsContext *context, Tls13EndOfEarlyData *message, size_t *length)
 Format EndOfEarlyData message. More...
 
error_t tls13ParseHelloRetryRequest (TlsContext *context, const Tls13HelloRetryRequest *message, size_t length)
 Parse HelloRetryRequest message. More...
 
error_t tls13ParseEncryptedExtensions (TlsContext *context, const Tls13EncryptedExtensions *message, size_t length)
 Parse EncryptedExtensions message. More...
 
error_t tls13ParseNewSessionTicket (TlsContext *context, const Tls13NewSessionTicket *message, size_t length)
 Parse NewSessionTicket message. More...
 

Detailed Description

Handshake message processing (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.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   TLS_TRACE_LEVEL

Definition at line 32 of file tls13_client.c.

Function Documentation

◆ tls13FormatEndOfEarlyData()

error_t tls13FormatEndOfEarlyData ( TlsContext context,
Tls13EndOfEarlyData message,
size_t *  length 
)

Format EndOfEarlyData message.

Parameters
[in]contextPointer to the TLS context
[out]messageBuffer where to format the EndOfEarlyData message
[out]lengthLength of the resulting EndOfEarlyData message
Returns
Error code

Definition at line 128 of file tls13_client.c.

◆ tls13ParseEncryptedExtensions()

error_t tls13ParseEncryptedExtensions ( TlsContext context,
const Tls13EncryptedExtensions message,
size_t  length 
)

Parse EncryptedExtensions message.

The server sends the EncryptedExtensions message immediately after the ServerHello message. The EncryptedExtensions message contains extensions that can be protected

Parameters
[in]contextPointer to the TLS context
[in]messageIncoming EncryptedExtensions message to parse
[in]lengthMessage length
Returns
Error code

Definition at line 420 of file tls13_client.c.

◆ tls13ParseHelloRetryRequest()

error_t tls13ParseHelloRetryRequest ( TlsContext context,
const Tls13HelloRetryRequest message,
size_t  length 
)

Parse HelloRetryRequest message.

The server will send this message in response to a ClientHello message if it is able to find an acceptable set of parameters but the ClientHello does not contain sufficient information to proceed with the handshake

Parameters
[in]contextPointer to the TLS context
[in]messageIncoming HelloRetryRequest message to parse
[in]lengthMessage length
Returns
Error code

Definition at line 152 of file tls13_client.c.

◆ tls13ParseNewSessionTicket()

error_t tls13ParseNewSessionTicket ( TlsContext context,
const Tls13NewSessionTicket message,
size_t  length 
)

Parse NewSessionTicket message.

At any time after the server has received the client Finished message, it may send a NewSessionTicket message

Parameters
[in]contextPointer to the TLS context
[in]messageIncoming NewSessionTicket message to parse
[in]lengthMessage length
Returns
Error code

Definition at line 599 of file tls13_client.c.

◆ tls13SendEndOfEarlyData()

error_t tls13SendEndOfEarlyData ( TlsContext context)

Send EndOfEarlyData message.

The EndOfEarlyData message indicates that all 0-RTT application data messages, if any, have been transmitted and that the following records are protected under handshake traffic keys

Parameters
[in]contextPointer to the TLS context
Returns
Error code

Definition at line 67 of file tls13_client.c.