tls13_server_misc.h File Reference

Helper functions for TLS 1.3 server. More...

#include "tls.h"

Go to the source code of this file.

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...
 
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-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_server_misc.h.

Function Documentation

◆ tls13IsGroupOffered()

bool_t tls13IsGroupOffered ( uint16_t  namedGroup,
const TlsSupportedGroupList groupList 
)

Check whether a group is offered in the SupportedGroups extension.

Parameters
[in]namedGroupNamed group
[in]groupListList of named groups supported by the client
Returns
TRUE if the group is offered in the SupportedGroups extension, else FALSE

Definition at line 285 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]contextPointer to the TLS context
[in]clientHelloPointer to the ClientHello message
[in]clientHelloLenLength of the ClientHello message
[in]cipherSuitesList of cipher suites offered by the client
[in]extensionsClientHello 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]contextPointer to the TLS context
[in]dataPointer to the early data
[in]lengthLength of the early data, in bytes
Returns
Error code

Definition at line 462 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]contextPointer to the TLS context
[in]groupListList of named groups supported by the client
Returns
Error code

Definition at line 204 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]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]binderListList of HMAC values, one for each PSK offered in the PreSharedKey extension
[in]selectedIdentitySelected PSK identity
Returns
Error code

Definition at line 330 of file tls13_server_misc.c.