tls_client_extensions.h File Reference

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

Function Documentation

◆ tlsFormatClientAlpnExtension()

error_t tlsFormatClientAlpnExtension ( TlsContext context,
uint8_t *  p,
size_t *  written 
)

Format ALPN extension.

Parameters
[in]contextPointer to the TLS context
[in]pOutput stream where to write the ALPN extension
[out]writtenTotal number of bytes that have been written
Returns
Error code

Definition at line 588 of file tls_client_extensions.c.

◆ tlsFormatClientCertTypeListExtension()

error_t tlsFormatClientCertTypeListExtension ( TlsContext context,
uint8_t *  p,
size_t *  written 
)

Format ClientCertType extension.

Parameters
[in]contextPointer to the TLS context
[in]pOutput stream where to write the ClientCertType extension
[out]writtenTotal number of bytes that have been written
Returns
Error code

Definition at line 674 of file tls_client_extensions.c.

◆ tlsFormatClientEcPointFormatsExtension()

error_t tlsFormatClientEcPointFormatsExtension ( TlsContext context,
uint8_t *  p,
size_t *  written 
)

Format EcPointFormats extension.

Parameters
[in]contextPointer to the TLS context
[in]pOutput stream where to write the EcPointFormats extension
[out]writtenTotal number of bytes that have been written
Returns
Error code

Definition at line 526 of file tls_client_extensions.c.

◆ tlsFormatClientEmsExtension()

error_t tlsFormatClientEmsExtension ( TlsContext context,
uint8_t *  p,
size_t *  written 
)

Format ExtendedMasterSecret extension.

Parameters
[in]contextPointer to the TLS context
[in]pOutput stream where to write the ExtendedMasterSecret extension
[out]writtenTotal number of bytes that have been written
Returns
Error code

Definition at line 835 of file tls_client_extensions.c.

◆ tlsFormatClientEtmExtension()

error_t tlsFormatClientEtmExtension ( TlsContext context,
uint8_t *  p,
size_t *  written 
)

Format EncryptThenMac extension.

Parameters
[in]contextPointer to the TLS context
[in]pOutput stream where to write the EncryptThenMac extension
[out]writtenTotal number of bytes that have been written
Returns
Error code

Definition at line 790 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]contextPointer to the TLS context
[in]clientHelloLenActual length of the ClientHello message
[in]pOutput stream where to write the ClientHello Padding extension
[out]writtenTotal number of bytes that have been written
Returns
Error code

Definition at line 1016 of file tls_client_extensions.c.

◆ tlsFormatClientMaxFragLenExtension()

error_t tlsFormatClientMaxFragLenExtension ( TlsContext context,
uint8_t *  p,
size_t *  written 
)

Format MaxFragmentLength extension.

Parameters
[in]contextPointer to the TLS context
[in]pOutput stream where to write the MaxFragmentLength extension
[out]writtenTotal number of bytes that have been written
Returns
Error code

Definition at line 268 of file tls_client_extensions.c.

◆ tlsFormatClientRecordSizeLimitExtension()

error_t tlsFormatClientRecordSizeLimitExtension ( TlsContext context,
uint8_t *  p,
size_t *  written 
)

Format RecordSizeLimit extension.

Parameters
[in]contextPointer to the TLS context
[in]pOutput stream where to write the RecordSizeLimit extension
[out]writtenTotal number of bytes that have been written
Returns
Error code

Definition at line 332 of file tls_client_extensions.c.

◆ tlsFormatClientRenegoInfoExtension()

error_t tlsFormatClientRenegoInfoExtension ( TlsContext context,
uint8_t *  p,
size_t *  written 
)

Format RenegotiationInfo extension.

Parameters
[in]contextPointer to the TLS context
[in]pOutput stream where to write the RenegotiationInfo extension
[out]writtenTotal number of bytes that have been written
Returns
Error code

Definition at line 948 of file tls_client_extensions.c.

◆ tlsFormatClientSessionTicketExtension()

error_t tlsFormatClientSessionTicketExtension ( TlsContext context,
uint8_t *  p,
size_t *  written 
)

Format SessionTicket extension.

Parameters
[in]contextPointer to the TLS context
[in]pOutput stream where to write the SessionTicket extension
[out]writtenTotal number of bytes that have been written
Returns
Error code

Definition at line 880 of file tls_client_extensions.c.

◆ tlsFormatClientSniExtension()

error_t tlsFormatClientSniExtension ( TlsContext context,
uint8_t *  p,
size_t *  written 
)

Format SNI extension.

Parameters
[in]contextPointer to the TLS context
[in]pOutput stream where to write the ServerName extension
[out]writtenTotal number of bytes that have been written
Returns
Error code

Definition at line 195 of file tls_client_extensions.c.

◆ tlsFormatClientSupportedVersionsExtension()

error_t tlsFormatClientSupportedVersionsExtension ( TlsContext context,
uint8_t *  p,
size_t *  written 
)

Format SupportedVersions extension.

Parameters
[in]contextPointer to the TLS context
[in]pOutput stream where to write the SupportedVersions extension
[out]writtenTotal number of bytes that have been written
Returns
Error code

Definition at line 87 of file tls_client_extensions.c.

◆ tlsFormatServerCertTypeListExtension()

error_t tlsFormatServerCertTypeListExtension ( TlsContext context,
uint8_t *  p,
size_t *  written 
)

Format ServerCertType extension.

Parameters
[in]contextPointer to the TLS context
[in]pOutput stream where to write the ServerCertType extension
[out]writtenTotal number of bytes that have been written
Returns
Error code

Definition at line 730 of file tls_client_extensions.c.

◆ tlsFormatSupportedGroupsExtension()

error_t tlsFormatSupportedGroupsExtension ( TlsContext context,
uint8_t *  p,
size_t *  written 
)

Format SupportedGroups extension.

Parameters
[in]contextPointer to the TLS context
[in]pOutput stream where to write the SupportedGroups extension
[out]writtenTotal number of bytes that have been written
Returns
Error code

Definition at line 388 of file tls_client_extensions.c.

◆ tlsParseClientCertTypeExtension()

error_t tlsParseClientCertTypeExtension ( TlsContext context,
const TlsExtension clientCertType 
)

Parse ClientCertType extension.

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

Definition at line 1346 of file tls_client_extensions.c.

◆ tlsParseServerAlpnExtension()

error_t tlsParseServerAlpnExtension ( TlsContext context,
const TlsProtocolNameList protocolNameList 
)

Parse ALPN extension.

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

Definition at line 1266 of file tls_client_extensions.c.

◆ tlsParseServerCertTypeExtension()

error_t tlsParseServerCertTypeExtension ( TlsContext context,
const TlsExtension serverCertType 
)

Parse ServerCertType extension.

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

Definition at line 1380 of file tls_client_extensions.c.

◆ tlsParseServerEcPointFormatsExtension()

error_t tlsParseServerEcPointFormatsExtension ( TlsContext context,
const TlsEcPointFormatList ecPointFormatList 
)

Parse EcPointFormats extension.

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

Definition at line 1218 of file tls_client_extensions.c.

◆ tlsParseServerEmsExtension()

error_t tlsParseServerEmsExtension ( TlsContext context,
const TlsExtension extendedMasterSecret 
)

Parse ExtendedMasterSecret extension.

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

Definition at line 1459 of file tls_client_extensions.c.

◆ tlsParseServerEtmExtension()

error_t tlsParseServerEtmExtension ( TlsContext context,
const TlsExtension encryptThenMac 
)

Parse EncryptThenMac extension.

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

Definition at line 1422 of file tls_client_extensions.c.

◆ tlsParseServerMaxFragLenExtension()

error_t tlsParseServerMaxFragLenExtension ( TlsContext context,
const TlsExtension maxFragLen 
)

Parse MaxFragmentLength extension.

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

Definition at line 1105 of file tls_client_extensions.c.

◆ tlsParseServerRecordSizeLimitExtension()

error_t tlsParseServerRecordSizeLimitExtension ( TlsContext context,
const TlsExtension recordSizeLimit 
)

Parse RecordSizeLimit extension.

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

Definition at line 1158 of file tls_client_extensions.c.

◆ tlsParseServerRenegoInfoExtension()

error_t tlsParseServerRenegoInfoExtension ( TlsContext context,
const TlsHelloExtensions extensions 
)

Parse RenegotiationInfo extension.

Parameters
[in]contextPointer to the TLS context
[in]extensionsServerHello extensions offered by the server
Returns
Error code

Definition at line 1545 of file tls_client_extensions.c.

◆ tlsParseServerSessionTicketExtension()

error_t tlsParseServerSessionTicketExtension ( TlsContext context,
const TlsExtension sessionTicket 
)

Parse SessionTicket extension.

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

Definition at line 1508 of file tls_client_extensions.c.

◆ tlsParseServerSniExtension()

error_t tlsParseServerSniExtension ( TlsContext context,
const TlsServerNameList serverNameList 
)

Parse SNI extension.

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

Definition at line 1078 of file tls_client_extensions.c.