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, uint_t cipherSuiteTypes, uint8_t *p, size_t *written)
 Format SupportedGroups extension. More...
 
error_t tlsFormatClientEcPointFormatsExtension (TlsContext *context, uint_t cipherSuiteTypes, 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 tlsFormatClientEmsExtension (TlsContext *context, uint8_t *p, size_t *written)
 Format ExtendedMasterSecret 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 uint8_t *maxFragLen)
 Parse MaxFragmentLength extension. More...
 
error_t tlsParseServerRecordSizeLimitExtension (TlsContext *context, const uint8_t *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 uint8_t *clientCertType)
 Parse ClientCertType extension. More...
 
error_t tlsParseServerCertTypeExtension (TlsContext *context, const uint8_t *serverCertType)
 Parse ServerCertType extension. More...
 
error_t tlsParseServerEmsExtension (TlsContext *context, const uint8_t *extendedMasterSecret)
 Parse ExtendedMasterSecret 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-2019 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
1.9.6

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 540 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 626 of file tls_client_extensions.c.

◆ tlsFormatClientEcPointFormatsExtension()

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

Format EcPointFormats extension.

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

Definition at line 478 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 742 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 855 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 251 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 312 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 787 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 178 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 84 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 682 of file tls_client_extensions.c.

◆ tlsFormatSupportedGroupsExtension()

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

Format SupportedGroups extension.

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

Definition at line 368 of file tls_client_extensions.c.

◆ tlsParseClientCertTypeExtension()

error_t tlsParseClientCertTypeExtension ( TlsContext context,
const uint8_t *  clientCertType 
)

Parse ClientCertType extension.

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

Definition at line 1177 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 1097 of file tls_client_extensions.c.

◆ tlsParseServerCertTypeExtension()

error_t tlsParseServerCertTypeExtension ( TlsContext context,
const uint8_t *  serverCertType 
)

Parse ServerCertType extension.

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

Definition at line 1211 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 1049 of file tls_client_extensions.c.

◆ tlsParseServerEmsExtension()

error_t tlsParseServerEmsExtension ( TlsContext context,
const uint8_t *  extendedMasterSecret 
)

Parse ExtendedMasterSecret extension.

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

Definition at line 1253 of file tls_client_extensions.c.

◆ tlsParseServerMaxFragLenExtension()

error_t tlsParseServerMaxFragLenExtension ( TlsContext context,
const uint8_t *  maxFragLen 
)

Parse MaxFragmentLength extension.

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

Definition at line 940 of file tls_client_extensions.c.

◆ tlsParseServerRecordSizeLimitExtension()

error_t tlsParseServerRecordSizeLimitExtension ( TlsContext context,
const uint8_t *  recordSizeLimit 
)

Parse RecordSizeLimit extension.

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

Definition at line 989 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 1306 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 913 of file tls_client_extensions.c.