tls_client_extensions.h
Go to the documentation of this file.
1 /**
2  * @file tls_client_extensions.h
3  * @brief Formatting and parsing of extensions (TLS client)
4  *
5  * @section License
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  *
9  * Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.
10  *
11  * This file is part of CycloneSSL Open.
12  *
13  * This program is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU General Public License
15  * as published by the Free Software Foundation; either version 2
16  * of the License, or (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software Foundation,
25  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26  *
27  * @author Oryx Embedded SARL (www.oryx-embedded.com)
28  * @version 2.4.4
29  **/
30 
31 #ifndef _TLS_CLIENT_EXTENSIONS_H
32 #define _TLS_CLIENT_EXTENSIONS_H
33 
34 //Dependencies
35 #include "tls.h"
36 
37 //C++ guard
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 //TLS client specific functions
44  uint8_t *p, size_t *written);
45 
47  uint8_t *p, size_t *written);
48 
50  uint8_t *p, size_t *written);
51 
53  uint8_t *p, size_t *written);
54 
56  size_t *written);
57 
59  uint8_t *p, size_t *written);
60 
62  uint8_t *p, size_t *written);
63 
65  uint8_t *p, size_t *written);
66 
68  uint8_t *p, size_t *written);
69 
71  uint8_t *p, size_t *written);
72 
74  uint8_t *p, size_t *written);
75 
77  uint8_t *p, size_t *written);
78 
80  uint8_t *p, size_t *written);
81 
83  size_t clientHelloLen, uint8_t *p, size_t *written);
84 
86  const TlsServerNameList *serverNameList);
87 
89  const TlsExtension *maxFragLen);
90 
92  const TlsExtension *recordSizeLimit);
93 
95  const TlsEcPointFormatList *ecPointFormatList);
96 
98  const TlsProtocolNameList *protocolNameList);
99 
101  const TlsExtension *clientCertType);
102 
104  const TlsExtension *serverCertType);
105 
107  const TlsExtension *encryptThenMac);
108 
111 
113  const TlsExtension *sessionTicket);
114 
117 
118 //C++ guard
119 #ifdef __cplusplus
120 }
121 #endif
122 
123 #endif
uint8_t extensions[]
Definition: ntp_common.h:207
error_t tlsParseServerEmsExtension(TlsContext *context, const TlsExtension *extendedMasterSecret)
Parse ExtendedMasterSecret extension.
uint8_t p
Definition: ndp.h:300
error_t tlsFormatClientSupportedVersionsExtension(TlsContext *context, uint8_t *p, size_t *written)
Format SupportedVersions extension.
TlsEcPointFormatList
Definition: tls.h:1662
error_t tlsParseServerEtmExtension(TlsContext *context, const TlsExtension *encryptThenMac)
Parse EncryptThenMac extension.
TlsProtocolNameList
Definition: tls.h:1640
error_t tlsParseServerRenegoInfoExtension(TlsContext *context, const TlsHelloExtensions *extensions)
Parse RenegotiationInfo extension.
error_t tlsFormatClientSessionTicketExtension(TlsContext *context, uint8_t *p, size_t *written)
Format SessionTicket extension.
error_t tlsParseClientCertTypeExtension(TlsContext *context, const TlsExtension *clientCertType)
Parse ClientCertType extension.
TlsExtension
Definition: tls.h:1573
bool_t extendedMasterSecret
Extended master secret computation.
Definition: tls.h:1888
error_t tlsParseServerMaxFragLenExtension(TlsContext *context, const TlsExtension *maxFragLen)
Parse MaxFragmentLength extension.
error_t tlsFormatClientEcPointFormatsExtension(TlsContext *context, uint8_t *p, size_t *written)
Format EcPointFormats extension.
error_t tlsFormatSupportedGroupsExtension(TlsContext *context, uint8_t *p, size_t *written)
Format SupportedGroups extension.
error_t tlsFormatClientAlpnExtension(TlsContext *context, uint8_t *p, size_t *written)
Format ALPN extension.
#define TlsContext
Definition: tls.h:36
error_t
Error codes.
Definition: error.h:43
TlsServerNameList
Definition: tls.h:1618
error_t tlsParseServerSessionTicketExtension(TlsContext *context, const TlsExtension *sessionTicket)
Parse SessionTicket extension.
error_t tlsFormatClientSniExtension(TlsContext *context, uint8_t *p, size_t *written)
Format SNI extension.
error_t tlsFormatClientRenegoInfoExtension(TlsContext *context, uint8_t *p, size_t *written)
Format RenegotiationInfo extension.
error_t tlsFormatClientEtmExtension(TlsContext *context, uint8_t *p, size_t *written)
Format EncryptThenMac extension.
error_t tlsFormatClientCertTypeListExtension(TlsContext *context, uint8_t *p, size_t *written)
Format ClientCertType extension.
error_t tlsParseServerEcPointFormatsExtension(TlsContext *context, const TlsEcPointFormatList *ecPointFormatList)
Parse EcPointFormats extension.
Hello extensions.
Definition: tls.h:2098
error_t tlsParseServerCertTypeExtension(TlsContext *context, const TlsExtension *serverCertType)
Parse ServerCertType extension.
error_t tlsFormatServerCertTypeListExtension(TlsContext *context, uint8_t *p, size_t *written)
Format ServerCertType extension.
error_t tlsFormatClientHelloPaddingExtension(TlsContext *context, size_t clientHelloLen, uint8_t *p, size_t *written)
Format ClientHello Padding extension.
error_t tlsFormatClientEmsExtension(TlsContext *context, uint8_t *p, size_t *written)
Format ExtendedMasterSecret extension.
TLS (Transport Layer Security)
error_t tlsParseServerSniExtension(TlsContext *context, const TlsServerNameList *serverNameList)
Parse SNI extension.
error_t tlsFormatClientMaxFragLenExtension(TlsContext *context, uint8_t *p, size_t *written)
Format MaxFragmentLength extension.
error_t tlsParseServerAlpnExtension(TlsContext *context, const TlsProtocolNameList *protocolNameList)
Parse ALPN extension.
error_t tlsParseServerRecordSizeLimitExtension(TlsContext *context, const TlsExtension *recordSizeLimit)
Parse RecordSizeLimit extension.
error_t tlsFormatClientRecordSizeLimitExtension(TlsContext *context, uint8_t *p, size_t *written)
Format RecordSizeLimit extension.