Formatting and parsing of extensions (TLS server) More...
#include "tls.h"
#include "tls_cipher_suites.h"
#include "tls_server_extensions.h"
#include "tls_extensions.h"
#include "tls_misc.h"
#include "debug.h"
Go to the source code of this file.
Macros | |
#define | TRACE_LEVEL TLS_TRACE_LEVEL |
Functions | |
error_t | tlsFormatServerSniExtension (TlsContext *context, uint8_t *p, size_t *written) |
Format SNI extension. More... | |
error_t | tlsFormatServerMaxFragLenExtension (TlsContext *context, uint8_t *p, size_t *written) |
Format MaxFragmentLength extension. More... | |
error_t | tlsFormatServerRecordSizeLimitExtension (TlsContext *context, uint8_t *p, size_t *written) |
Format RecordSizeLimit extension. More... | |
error_t | tlsFormatServerEcPointFormatsExtension (TlsContext *context, uint8_t *p, size_t *written) |
Format EcPointFormats extension. More... | |
error_t | tlsFormatServerAlpnExtension (TlsContext *context, uint8_t *p, size_t *written) |
Format ALPN extension. More... | |
error_t | tlsFormatClientCertTypeExtension (TlsContext *context, uint8_t *p, size_t *written) |
Format ClientCertType extension. More... | |
error_t | tlsFormatServerCertTypeExtension (TlsContext *context, uint8_t *p, size_t *written) |
Format ServerCertType extension. More... | |
error_t | tlsFormatServerEtmExtension (TlsContext *context, uint8_t *p, size_t *written) |
Format EncryptThenMac extension. More... | |
error_t | tlsFormatServerEmsExtension (TlsContext *context, uint8_t *p, size_t *written) |
Format ExtendedMasterSecret extension. More... | |
error_t | tlsFormatServerSessionTicketExtension (TlsContext *context, uint8_t *p, size_t *written) |
Format SessionTicket extension. More... | |
error_t | tlsFormatServerRenegoInfoExtension (TlsContext *context, uint8_t *p, size_t *written) |
Format RenegotiationInfo extension. More... | |
error_t | tlsParseClientSupportedVersionsExtension (TlsContext *context, const TlsSupportedVersionList *supportedVersionList) |
Parse SupportedVersions extension. More... | |
error_t | tlsParseClientSniExtension (TlsContext *context, const TlsServerNameList *serverNameList) |
Parse SNI extension. More... | |
error_t | tlsParseClientMaxFragLenExtension (TlsContext *context, const TlsExtension *maxFragLen) |
Parse MaxFragmentLength extension. More... | |
error_t | tlsParseClientRecordSizeLimitExtension (TlsContext *context, const TlsExtension *recordSizeLimit) |
Parse RecordSizeLimit extension. More... | |
error_t | tlsParseClientEcPointFormatsExtension (TlsContext *context, const TlsEcPointFormatList *ecPointFormatList) |
Parse EcPointFormats extension. More... | |
error_t | tlsParseClientAlpnExtension (TlsContext *context, const TlsProtocolNameList *protocolNameList) |
Parse ALPN extension. More... | |
error_t | tlsParseClientCertTypeListExtension (TlsContext *context, const TlsCertTypeList *clientCertTypeList) |
Parse ClientCertType extension. More... | |
error_t | tlsParseServerCertTypeListExtension (TlsContext *context, const TlsCertTypeList *serverCertTypeList) |
Parse ServerCertType extension. More... | |
error_t | tlsParseClientEtmExtension (TlsContext *context, const TlsExtension *encryptThenMac) |
Parse EncryptThenMac extension. More... | |
error_t | tlsParseClientEmsExtension (TlsContext *context, const TlsExtension *extendedMasterSecret) |
Parse ExtendedMasterSecret extension. More... | |
error_t | tlsParseClientSessionTicketExtension (TlsContext *context, const TlsExtension *sessionTicket) |
Parse SessionTicket extension. More... | |
error_t | tlsParseClientRenegoInfoExtension (TlsContext *context, const TlsHelloExtensions *extensions) |
Parse RenegotiationInfo extension. More... | |
Detailed Description
Formatting and parsing of extensions (TLS 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.
- Version
- 2.4.4
Definition in file tls_server_extensions.c.
Macro Definition Documentation
◆ TRACE_LEVEL
#define TRACE_LEVEL TLS_TRACE_LEVEL |
Definition at line 32 of file tls_server_extensions.c.
Function Documentation
◆ tlsFormatClientCertTypeExtension()
error_t tlsFormatClientCertTypeExtension | ( | 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 373 of file tls_server_extensions.c.
◆ tlsFormatServerAlpnExtension()
error_t tlsFormatServerAlpnExtension | ( | 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 306 of file tls_server_extensions.c.
◆ tlsFormatServerCertTypeExtension()
error_t tlsFormatServerCertTypeExtension | ( | 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 421 of file tls_server_extensions.c.
◆ tlsFormatServerEcPointFormatsExtension()
error_t tlsFormatServerEcPointFormatsExtension | ( | 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 238 of file tls_server_extensions.c.
◆ tlsFormatServerEmsExtension()
error_t tlsFormatServerEmsExtension | ( | 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 510 of file tls_server_extensions.c.
◆ tlsFormatServerEtmExtension()
error_t tlsFormatServerEtmExtension | ( | 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 468 of file tls_server_extensions.c.
◆ tlsFormatServerMaxFragLenExtension()
error_t tlsFormatServerMaxFragLenExtension | ( | 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 108 of file tls_server_extensions.c.
◆ tlsFormatServerRecordSizeLimitExtension()
error_t tlsFormatServerRecordSizeLimitExtension | ( | 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 179 of file tls_server_extensions.c.
◆ tlsFormatServerRenegoInfoExtension()
error_t tlsFormatServerRenegoInfoExtension | ( | 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 597 of file tls_server_extensions.c.
◆ tlsFormatServerSessionTicketExtension()
error_t tlsFormatServerSessionTicketExtension | ( | 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 551 of file tls_server_extensions.c.
◆ tlsFormatServerSniExtension()
error_t tlsFormatServerSniExtension | ( | 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 54 of file tls_server_extensions.c.
◆ tlsParseClientAlpnExtension()
error_t tlsParseClientAlpnExtension | ( | 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 1017 of file tls_server_extensions.c.
◆ tlsParseClientCertTypeListExtension()
error_t tlsParseClientCertTypeListExtension | ( | TlsContext * | context, |
const TlsCertTypeList * | clientCertTypeList | ||
) |
Parse ClientCertType extension.
- Parameters
-
[in] context Pointer to the TLS context [in] clientCertTypeList Pointer to the ClientCertType extension
- Returns
- Error code
Definition at line 1119 of file tls_server_extensions.c.
◆ tlsParseClientEcPointFormatsExtension()
error_t tlsParseClientEcPointFormatsExtension | ( | 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 956 of file tls_server_extensions.c.
◆ tlsParseClientEmsExtension()
error_t tlsParseClientEmsExtension | ( | 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 1304 of file tls_server_extensions.c.
◆ tlsParseClientEtmExtension()
error_t tlsParseClientEtmExtension | ( | 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 1262 of file tls_server_extensions.c.
◆ tlsParseClientMaxFragLenExtension()
error_t tlsParseClientMaxFragLenExtension | ( | 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 798 of file tls_server_extensions.c.
◆ tlsParseClientRecordSizeLimitExtension()
error_t tlsParseClientRecordSizeLimitExtension | ( | 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 875 of file tls_server_extensions.c.
◆ tlsParseClientRenegoInfoExtension()
error_t tlsParseClientRenegoInfoExtension | ( | TlsContext * | context, |
const TlsHelloExtensions * | extensions | ||
) |
Parse RenegotiationInfo extension.
- Parameters
-
[in] context Pointer to the TLS context [in] extensions ClientHello extensions offered by the client
- Returns
- Error code
Definition at line 1387 of file tls_server_extensions.c.
◆ tlsParseClientSessionTicketExtension()
error_t tlsParseClientSessionTicketExtension | ( | 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 1353 of file tls_server_extensions.c.
◆ tlsParseClientSniExtension()
error_t tlsParseClientSniExtension | ( | TlsContext * | context, |
const TlsServerNameList * | serverNameList | ||
) |
Parse SNI extension.
- Parameters
-
[in] context Pointer to the TLS context [in] serverNameList Pointer to the SNI extension
- Returns
- Error code
Definition at line 712 of file tls_server_extensions.c.
◆ tlsParseClientSupportedVersionsExtension()
error_t tlsParseClientSupportedVersionsExtension | ( | TlsContext * | context, |
const TlsSupportedVersionList * | supportedVersionList | ||
) |
Parse SupportedVersions extension.
- Parameters
-
[in] context Pointer to the TLS context [in] supportedVersionList Pointer to the SupportedVersions extension
- Returns
- Error code
Definition at line 661 of file tls_server_extensions.c.
◆ tlsParseServerCertTypeListExtension()
error_t tlsParseServerCertTypeListExtension | ( | TlsContext * | context, |
const TlsCertTypeList * | serverCertTypeList | ||
) |
Parse ServerCertType extension.
- Parameters
-
[in] context Pointer to the TLS context [in] serverCertTypeList Pointer to the ServerCertType extension
- Returns
- Error code
Definition at line 1199 of file tls_server_extensions.c.