Formatting and parsing of extensions (TLS client) More...
#include "tls.h"Go to the source code of this file.
Functions | |
| error_t | tlsFormatClientSupportedVersionsExtension (TlsContext *context, uint8_t *p, size_t *written) |
| Format SupportedVersions extension. More... | |
| error_t | tlsFormatClientSniExtension (TlsContext *context, uint8_t *p, size_t *written) |
| Format SNI extension. More... | |
| error_t | tlsFormatClientMaxFragLenExtension (TlsContext *context, uint8_t *p, size_t *written) |
| Format MaxFragmentLength extension. More... | |
| error_t | tlsFormatClientRecordSizeLimitExtension (TlsContext *context, uint8_t *p, size_t *written) |
| Format RecordSizeLimit extension. More... | |
| error_t | tlsFormatTrustedCaKeysExtension (TlsContext *context, uint8_t *p, size_t *written) |
| Format TrustedCaKeys extension. More... | |
| error_t | tlsFormatSupportedGroupsExtension (TlsContext *context, uint8_t *p, size_t *written) |
| Format SupportedGroups extension. More... | |
| error_t | tlsFormatClientEcPointFormatsExtension (TlsContext *context, uint8_t *p, size_t *written) |
| Format EcPointFormats extension. More... | |
| error_t | tlsFormatClientAlpnExtension (TlsContext *context, uint8_t *p, size_t *written) |
| Format ALPN extension. More... | |
| error_t | tlsFormatClientCertTypeListExtension (TlsContext *context, uint8_t *p, size_t *written) |
| Format ClientCertType extension. More... | |
| error_t | tlsFormatServerCertTypeListExtension (TlsContext *context, uint8_t *p, size_t *written) |
| Format ServerCertType extension. More... | |
| error_t | tlsFormatClientEtmExtension (TlsContext *context, uint8_t *p, size_t *written) |
| Format EncryptThenMac extension. More... | |
| error_t | tlsFormatClientEmsExtension (TlsContext *context, uint8_t *p, size_t *written) |
| Format ExtendedMasterSecret extension. More... | |
| error_t | tlsFormatClientSessionTicketExtension (TlsContext *context, uint8_t *p, size_t *written) |
| Format SessionTicket extension. More... | |
| error_t | tlsFormatClientRenegoInfoExtension (TlsContext *context, uint8_t *p, size_t *written) |
| Format RenegotiationInfo extension. More... | |
| error_t | tlsFormatClientHelloPaddingExtension (TlsContext *context, size_t clientHelloLen, uint8_t *p, size_t *written) |
| Format ClientHello Padding extension. More... | |
| error_t | tlsParseServerSniExtension (TlsContext *context, const TlsServerNameList *serverNameList) |
| Parse SNI extension. More... | |
| error_t | tlsParseServerMaxFragLenExtension (TlsContext *context, const TlsExtension *maxFragLen) |
| Parse MaxFragmentLength extension. More... | |
| error_t | tlsParseServerRecordSizeLimitExtension (TlsContext *context, const TlsExtension *recordSizeLimit) |
| Parse RecordSizeLimit extension. More... | |
| error_t | tlsParseServerEcPointFormatsExtension (TlsContext *context, const TlsEcPointFormatList *ecPointFormatList) |
| Parse EcPointFormats extension. More... | |
| error_t | tlsParseServerAlpnExtension (TlsContext *context, const TlsProtocolNameList *protocolNameList) |
| Parse ALPN extension. More... | |
| error_t | tlsParseClientCertTypeExtension (TlsContext *context, const TlsExtension *clientCertType) |
| Parse ClientCertType extension. More... | |
| error_t | tlsParseServerCertTypeExtension (TlsContext *context, const TlsExtension *serverCertType) |
| Parse ServerCertType extension. More... | |
| error_t | tlsParseServerEtmExtension (TlsContext *context, const TlsExtension *encryptThenMac) |
| Parse EncryptThenMac extension. More... | |
| error_t | tlsParseServerEmsExtension (TlsContext *context, const TlsExtension *extendedMasterSecret) |
| Parse ExtendedMasterSecret extension. More... | |
| error_t | tlsParseServerSessionTicketExtension (TlsContext *context, const TlsExtension *sessionTicket) |
| Parse SessionTicket extension. More... | |
| error_t | tlsParseServerRenegoInfoExtension (TlsContext *context, const TlsHelloExtensions *extensions) |
| Parse RenegotiationInfo extension. More... | |
Detailed Description
Formatting and parsing of extensions (TLS client)
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 tls_client_extensions.h.
Function Documentation
◆ tlsFormatClientAlpnExtension()
| error_t tlsFormatClientAlpnExtension | ( | TlsContext * | context, |
| uint8_t * | p, | ||
| size_t * | written | ||
| ) |
Format ALPN extension.
- Parameters
-
[in] context Pointer to the TLS context [in] p Output stream where to write the ALPN extension [out] written Total number of bytes that have been written
- Returns
- Error code
Definition at line 669 of file tls_client_extensions.c.
◆ tlsFormatClientCertTypeListExtension()
| error_t tlsFormatClientCertTypeListExtension | ( | TlsContext * | context, |
| uint8_t * | p, | ||
| size_t * | written | ||
| ) |
Format ClientCertType extension.
- Parameters
-
[in] context Pointer to the TLS context [in] p Output stream where to write the ClientCertType extension [out] written Total number of bytes that have been written
- Returns
- Error code
Definition at line 755 of file tls_client_extensions.c.
◆ tlsFormatClientEcPointFormatsExtension()
| error_t tlsFormatClientEcPointFormatsExtension | ( | TlsContext * | context, |
| uint8_t * | p, | ||
| size_t * | written | ||
| ) |
Format EcPointFormats extension.
- Parameters
-
[in] context Pointer to the TLS context [in] p Output stream where to write the EcPointFormats extension [out] written Total number of bytes that have been written
- Returns
- Error code
Definition at line 607 of file tls_client_extensions.c.
◆ tlsFormatClientEmsExtension()
| error_t tlsFormatClientEmsExtension | ( | TlsContext * | context, |
| uint8_t * | p, | ||
| size_t * | written | ||
| ) |
Format ExtendedMasterSecret extension.
- Parameters
-
[in] context Pointer to the TLS context [in] p Output stream where to write the ExtendedMasterSecret extension [out] written Total number of bytes that have been written
- Returns
- Error code
Definition at line 916 of file tls_client_extensions.c.
◆ tlsFormatClientEtmExtension()
| error_t tlsFormatClientEtmExtension | ( | TlsContext * | context, |
| uint8_t * | p, | ||
| size_t * | written | ||
| ) |
Format EncryptThenMac extension.
- Parameters
-
[in] context Pointer to the TLS context [in] p Output stream where to write the EncryptThenMac extension [out] written Total number of bytes that have been written
- Returns
- Error code
Definition at line 871 of file tls_client_extensions.c.
◆ tlsFormatClientHelloPaddingExtension()
| error_t tlsFormatClientHelloPaddingExtension | ( | TlsContext * | context, |
| size_t | clientHelloLen, | ||
| uint8_t * | p, | ||
| size_t * | written | ||
| ) |
Format ClientHello Padding extension.
- Parameters
-
[in] context Pointer to the TLS context [in] clientHelloLen Actual length of the ClientHello message [in] p Output stream where to write the ClientHello Padding extension [out] written Total number of bytes that have been written
- Returns
- Error code
Definition at line 1097 of file tls_client_extensions.c.
◆ tlsFormatClientMaxFragLenExtension()
| error_t tlsFormatClientMaxFragLenExtension | ( | TlsContext * | context, |
| uint8_t * | p, | ||
| size_t * | written | ||
| ) |
Format MaxFragmentLength extension.
- Parameters
-
[in] context Pointer to the TLS context [in] p Output stream where to write the MaxFragmentLength extension [out] written Total number of bytes that have been written
- Returns
- Error code
Definition at line 272 of file tls_client_extensions.c.
◆ tlsFormatClientRecordSizeLimitExtension()
| error_t tlsFormatClientRecordSizeLimitExtension | ( | TlsContext * | context, |
| uint8_t * | p, | ||
| size_t * | written | ||
| ) |
Format RecordSizeLimit extension.
- Parameters
-
[in] context Pointer to the TLS context [in] p Output stream where to write the RecordSizeLimit extension [out] written Total number of bytes that have been written
- Returns
- Error code
Definition at line 336 of file tls_client_extensions.c.
◆ tlsFormatClientRenegoInfoExtension()
| error_t tlsFormatClientRenegoInfoExtension | ( | TlsContext * | context, |
| uint8_t * | p, | ||
| size_t * | written | ||
| ) |
Format RenegotiationInfo extension.
- Parameters
-
[in] context Pointer to the TLS context [in] p Output stream where to write the RenegotiationInfo extension [out] written Total number of bytes that have been written
- Returns
- Error code
Definition at line 1029 of file tls_client_extensions.c.
◆ tlsFormatClientSessionTicketExtension()
| error_t tlsFormatClientSessionTicketExtension | ( | TlsContext * | context, |
| uint8_t * | p, | ||
| size_t * | written | ||
| ) |
Format SessionTicket extension.
- Parameters
-
[in] context Pointer to the TLS context [in] p Output stream where to write the SessionTicket extension [out] written Total number of bytes that have been written
- Returns
- Error code
Definition at line 961 of file tls_client_extensions.c.
◆ tlsFormatClientSniExtension()
| error_t tlsFormatClientSniExtension | ( | TlsContext * | context, |
| uint8_t * | p, | ||
| size_t * | written | ||
| ) |
Format SNI extension.
- Parameters
-
[in] context Pointer to the TLS context [in] p Output stream where to write the ServerName extension [out] written Total number of bytes that have been written
- Returns
- Error code
Definition at line 199 of file tls_client_extensions.c.
◆ tlsFormatClientSupportedVersionsExtension()
| error_t tlsFormatClientSupportedVersionsExtension | ( | TlsContext * | context, |
| uint8_t * | p, | ||
| size_t * | written | ||
| ) |
Format SupportedVersions extension.
- Parameters
-
[in] context Pointer to the TLS context [in] p Output stream where to write the SupportedVersions extension [out] written Total number of bytes that have been written
- Returns
- Error code
Definition at line 91 of file tls_client_extensions.c.
◆ tlsFormatServerCertTypeListExtension()
| error_t tlsFormatServerCertTypeListExtension | ( | TlsContext * | context, |
| uint8_t * | p, | ||
| size_t * | written | ||
| ) |
Format ServerCertType extension.
- Parameters
-
[in] context Pointer to the TLS context [in] p Output stream where to write the ServerCertType extension [out] written Total number of bytes that have been written
- Returns
- Error code
Definition at line 811 of file tls_client_extensions.c.
◆ tlsFormatSupportedGroupsExtension()
| error_t tlsFormatSupportedGroupsExtension | ( | TlsContext * | context, |
| uint8_t * | p, | ||
| size_t * | written | ||
| ) |
Format SupportedGroups extension.
- Parameters
-
[in] context Pointer to the TLS context [in] p Output stream where to write the SupportedGroups extension [out] written Total number of bytes that have been written
- Returns
- Error code
Definition at line 456 of file tls_client_extensions.c.
◆ tlsFormatTrustedCaKeysExtension()
| error_t tlsFormatTrustedCaKeysExtension | ( | TlsContext * | context, |
| uint8_t * | p, | ||
| size_t * | written | ||
| ) |
Format TrustedCaKeys extension.
- Parameters
-
[in] context Pointer to the TLS context [in] p Output stream where to write the TrustedCaKeys extension [out] written Total number of bytes that have been written
- Returns
- Error code
Definition at line 393 of file tls_client_extensions.c.
◆ tlsParseClientCertTypeExtension()
| error_t tlsParseClientCertTypeExtension | ( | TlsContext * | context, |
| const TlsExtension * | clientCertType | ||
| ) |
Parse ClientCertType extension.
- Parameters
-
[in] context Pointer to the TLS context [in] clientCertType Pointer to the ClientCertType extension
- Returns
- Error code
Definition at line 1427 of file tls_client_extensions.c.
◆ tlsParseServerAlpnExtension()
| error_t tlsParseServerAlpnExtension | ( | TlsContext * | context, |
| const TlsProtocolNameList * | protocolNameList | ||
| ) |
Parse ALPN extension.
- Parameters
-
[in] context Pointer to the TLS context [in] protocolNameList Pointer to the ALPN extension
- Returns
- Error code
Definition at line 1347 of file tls_client_extensions.c.
◆ tlsParseServerCertTypeExtension()
| error_t tlsParseServerCertTypeExtension | ( | TlsContext * | context, |
| const TlsExtension * | serverCertType | ||
| ) |
Parse ServerCertType extension.
- Parameters
-
[in] context Pointer to the TLS context [in] serverCertType Pointer to the ServerCertType extension
- Returns
- Error code
Definition at line 1461 of file tls_client_extensions.c.
◆ tlsParseServerEcPointFormatsExtension()
| error_t tlsParseServerEcPointFormatsExtension | ( | TlsContext * | context, |
| const TlsEcPointFormatList * | ecPointFormatList | ||
| ) |
Parse EcPointFormats extension.
- Parameters
-
[in] context Pointer to the TLS context [in] ecPointFormatList Pointer to the EcPointFormats extension
- Returns
- Error code
Definition at line 1299 of file tls_client_extensions.c.
◆ tlsParseServerEmsExtension()
| error_t tlsParseServerEmsExtension | ( | TlsContext * | context, |
| const TlsExtension * | extendedMasterSecret | ||
| ) |
Parse ExtendedMasterSecret extension.
- Parameters
-
[in] context Pointer to the TLS context [in] extendedMasterSecret Pointer to the ExtendedMasterSecret extension
- Returns
- Error code
Definition at line 1540 of file tls_client_extensions.c.
◆ tlsParseServerEtmExtension()
| error_t tlsParseServerEtmExtension | ( | TlsContext * | context, |
| const TlsExtension * | encryptThenMac | ||
| ) |
Parse EncryptThenMac extension.
- Parameters
-
[in] context Pointer to the TLS context [in] encryptThenMac Pointer to the EncryptThenMac extension
- Returns
- Error code
Definition at line 1503 of file tls_client_extensions.c.
◆ tlsParseServerMaxFragLenExtension()
| error_t tlsParseServerMaxFragLenExtension | ( | TlsContext * | context, |
| const TlsExtension * | maxFragLen | ||
| ) |
Parse MaxFragmentLength extension.
- Parameters
-
[in] context Pointer to the TLS context [in] maxFragLen Pointer to the MaxFragmentLength extension
- Returns
- Error code
Definition at line 1186 of file tls_client_extensions.c.
◆ tlsParseServerRecordSizeLimitExtension()
| error_t tlsParseServerRecordSizeLimitExtension | ( | TlsContext * | context, |
| const TlsExtension * | recordSizeLimit | ||
| ) |
Parse RecordSizeLimit extension.
- Parameters
-
[in] context Pointer to the TLS context [in] recordSizeLimit Pointer to the RecordSizeLimit extension
- Returns
- Error code
Definition at line 1239 of file tls_client_extensions.c.
◆ tlsParseServerRenegoInfoExtension()
| error_t tlsParseServerRenegoInfoExtension | ( | TlsContext * | context, |
| const TlsHelloExtensions * | extensions | ||
| ) |
Parse RenegotiationInfo extension.
- Parameters
-
[in] context Pointer to the TLS context [in] extensions ServerHello extensions offered by the server
- Returns
- Error code
Definition at line 1626 of file tls_client_extensions.c.
◆ tlsParseServerSessionTicketExtension()
| error_t tlsParseServerSessionTicketExtension | ( | TlsContext * | context, |
| const TlsExtension * | sessionTicket | ||
| ) |
Parse SessionTicket extension.
- Parameters
-
[in] context Pointer to the TLS context [in] sessionTicket Pointer to the SessionTicket extension
- Returns
- Error code
Definition at line 1589 of file tls_client_extensions.c.
◆ tlsParseServerSniExtension()
| error_t tlsParseServerSniExtension | ( | TlsContext * | context, |
| const TlsServerNameList * | serverNameList | ||
| ) |
Parse SNI extension.
- Parameters
-
[in] context Pointer to the TLS context [in] serverNameList Pointer to the ServerName extension
- Returns
- Error code
Definition at line 1159 of file tls_client_extensions.c.
