Helper functions for TLS 1.3 server. More...
#include "tls.h"#include "tls_server_misc.h"#include "tls_transcript_hash.h"#include "tls_ffdhe.h"#include "tls_misc.h"#include "tls13_server_extensions.h"#include "tls13_server_misc.h"#include "debug.h"Go to the source code of this file.
| Macros | |
| #define | TRACE_LEVEL TLS_TRACE_LEVEL | 
| Functions | |
| error_t | tls13NegotiateCipherSuite (TlsContext *context, const void *clientHello, size_t clientHelloLen, const TlsCipherSuites *cipherSuites, TlsHelloExtensions *extensions) | 
| Cipher suite and key exchange method negotiation.  More... | |
| error_t | tls13SelectGroup (TlsContext *context, const TlsSupportedGroupList *groupList) | 
| Select the group to be used when performing (EC)DHE key exchange.  More... | |
| bool_t | tls13IsGroupOffered (uint16_t namedGroup, const TlsSupportedGroupList *groupList) | 
| Check whether a group is offered in the SupportedGroups extension.  More... | |
| bool_t | tls13IsGroupObsolete (TlsContext *context, uint16_t namedGroup) | 
| Check whether a given group is obsolete.  More... | |
| error_t | tls13VerifyPskBinder (TlsContext *context, const void *clientHello, size_t clientHelloLen, const Tls13PskIdentityList *identityList, const Tls13PskBinderList *binderList, int_t selectedIdentity) | 
| Verify PSK binder value.  More... | |
| error_t | tls13ProcessEarlyData (TlsContext *context, const uint8_t *data, size_t length) | 
| Process early data.  More... | |
Detailed Description
Helper functions for TLS 1.3 server.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2025 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.5.4
Definition in file tls13_server_misc.c.
Macro Definition Documentation
◆ TRACE_LEVEL
| #define TRACE_LEVEL TLS_TRACE_LEVEL | 
Definition at line 32 of file tls13_server_misc.c.
Function Documentation
◆ tls13IsGroupObsolete()
| bool_t tls13IsGroupObsolete | ( | TlsContext * | context, | 
| uint16_t | namedGroup | ||
| ) | 
Check whether a given group is obsolete.
- Parameters
- 
  [in] context Pointer to the TLS context [in] namedGroup Named group 
- Returns
- TRUE is the group is obsolete, else FALSE
Definition at line 349 of file tls13_server_misc.c.
◆ tls13IsGroupOffered()
| bool_t tls13IsGroupOffered | ( | uint16_t | namedGroup, | 
| const TlsSupportedGroupList * | groupList | ||
| ) | 
Check whether a group is offered in the SupportedGroups extension.
- Parameters
- 
  [in] namedGroup Named group [in] groupList List of named groups supported by the client 
- Returns
- TRUE if the group is offered in the SupportedGroups extension, else FALSE
Definition at line 310 of file tls13_server_misc.c.
◆ tls13NegotiateCipherSuite()
| error_t tls13NegotiateCipherSuite | ( | TlsContext * | context, | 
| const void * | clientHello, | ||
| size_t | clientHelloLen, | ||
| const TlsCipherSuites * | cipherSuites, | ||
| TlsHelloExtensions * | extensions | ||
| ) | 
Cipher suite and key exchange method negotiation.
- Parameters
- 
  [in] context Pointer to the TLS context [in] clientHello Pointer to the ClientHello message [in] clientHelloLen Length of the ClientHello message [in] cipherSuites List of cipher suites offered by the client [in] extensions ClientHello extensions offered by the client 
- Returns
- Error code
Definition at line 59 of file tls13_server_misc.c.
◆ tls13ProcessEarlyData()
| error_t tls13ProcessEarlyData | ( | TlsContext * | context, | 
| const uint8_t * | data, | ||
| size_t | length | ||
| ) | 
Process early data.
- Parameters
- 
  [in] context Pointer to the TLS context [in] data Pointer to the early data [in] length Length of the early data, in bytes 
- Returns
- Error code
Definition at line 526 of file tls13_server_misc.c.
◆ tls13SelectGroup()
| error_t tls13SelectGroup | ( | TlsContext * | context, | 
| const TlsSupportedGroupList * | groupList | ||
| ) | 
Select the group to be used when performing (EC)DHE key exchange.
- Parameters
- 
  [in] context Pointer to the TLS context [in] groupList List of named groups supported by the client 
- Returns
- Error code
Definition at line 206 of file tls13_server_misc.c.
◆ tls13VerifyPskBinder()
| error_t tls13VerifyPskBinder | ( | TlsContext * | context, | 
| const void * | clientHello, | ||
| size_t | clientHelloLen, | ||
| const Tls13PskIdentityList * | identityList, | ||
| const Tls13PskBinderList * | binderList, | ||
| int_t | selectedIdentity | ||
| ) | 
Verify PSK binder value.
- Parameters
- 
  [in] context Pointer to the TLS context [in] clientHello Pointer to the ClientHello message [in] clientHelloLen Length of the ClientHello message [in] identityList List of the identities that the client is willing to negotiate with the server [in] binderList List of HMAC values, one for each PSK offered in the PreSharedKey extension [in] selectedIdentity Selected PSK identity 
- Returns
- Error code
Definition at line 394 of file tls13_server_misc.c.
