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-2019 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 1.9.6
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  uint_t cipherSuiteTypes, uint8_t *p, size_t *written);
57 
59  uint_t cipherSuiteTypes, 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  size_t clientHelloLen, uint8_t *p, size_t *written);
78 
80  const TlsServerNameList *serverNameList);
81 
83  const uint8_t *maxFragLen);
84 
86  const uint8_t *recordSizeLimit);
87 
89  const TlsEcPointFormatList *ecPointFormatList);
90 
92  const TlsProtocolNameList *protocolNameList);
93 
95  const uint8_t *clientCertType);
96 
98  const uint8_t *serverCertType);
99 
101  const uint8_t *extendedMasterSecret);
102 
105 
106 //C++ guard
107 #ifdef __cplusplus
108 }
109 #endif
110 
111 #endif
error_t tlsFormatClientEcPointFormatsExtension(TlsContext *context, uint_t cipherSuiteTypes, uint8_t *p, size_t *written)
Format EcPointFormats extension.
uint8_t p
Definition: ndp.h:298
error_t tlsFormatClientSupportedVersionsExtension(TlsContext *context, uint8_t *p, size_t *written)
Format SupportedVersions extension.
error_t tlsParseServerRenegoInfoExtension(TlsContext *context, const TlsHelloExtensions *extensions)
Parse RenegotiationInfo 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:42
error_t tlsParseServerCertTypeExtension(TlsContext *context, const uint8_t *serverCertType)
Parse ServerCertType extension.
error_t tlsParseServerEmsExtension(TlsContext *context, const uint8_t *extendedMasterSecret)
Parse ExtendedMasterSecret extension.
error_t tlsFormatClientSniExtension(TlsContext *context, uint8_t *p, size_t *written)
Format SNI extension.
__start_packed struct @74 TlsProtocolNameList
List of protocol names.
error_t tlsParseServerRecordSizeLimitExtension(TlsContext *context, const uint8_t *recordSizeLimit)
Parse RecordSizeLimit extension.
error_t tlsFormatClientRenegoInfoExtension(TlsContext *context, uint8_t *p, size_t *written)
Format RenegotiationInfo 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:1894
uint8_t extensions[]
Definition: tls13_misc.h:327
__start_packed struct @72 TlsServerNameList
List of server names.
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 tlsFormatSupportedGroupsExtension(TlsContext *context, uint_t cipherSuiteTypes, uint8_t *p, size_t *written)
Format SupportedGroups extension.
error_t tlsParseClientCertTypeExtension(TlsContext *context, const uint8_t *clientCertType)
Parse ClientCertType extension.
error_t tlsFormatClientMaxFragLenExtension(TlsContext *context, uint8_t *p, size_t *written)
Format MaxFragmentLength extension.
unsigned int uint_t
Definition: compiler_port.h:45
error_t tlsParseServerAlpnExtension(TlsContext *context, const TlsProtocolNameList *protocolNameList)
Parse ALPN extension.
__start_packed struct @76 TlsEcPointFormatList
List of supported EC point formats.
error_t tlsParseServerMaxFragLenExtension(TlsContext *context, const uint8_t *maxFragLen)
Parse MaxFragmentLength extension.
error_t tlsFormatClientRecordSizeLimitExtension(TlsContext *context, uint8_t *p, size_t *written)
Format RecordSizeLimit extension.