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  * Copyright (C) 2010-2018 Oryx Embedded SARL. All rights reserved.
8  *
9  * This file is part of CycloneSSL Open.
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software Foundation,
23  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24  *
25  * @author Oryx Embedded SARL (www.oryx-embedded.com)
26  * @version 1.9.0
27  **/
28 
29 #ifndef _TLS_CLIENT_EXTENSIONS_H
30 #define _TLS_CLIENT_EXTENSIONS_H
31 
32 //Dependencies
33 #include "tls.h"
34 
35 //C++ guard
36 #ifdef __cplusplus
37  extern "C" {
38 #endif
39 
40 //TLS client specific functions
42  uint8_t *p, size_t *written);
43 
45  uint8_t *p, size_t *written);
46 
48  uint8_t *p, size_t *written);
49 
51  uint8_t *p, size_t *written);
52 
54  uint_t cipherSuiteTypes, uint8_t *p, size_t *written);
55 
57  uint_t cipherSuiteTypes, uint8_t *p, size_t *written);
58 
60  uint8_t *p, size_t *written);
61 
63  uint8_t *p, size_t *written);
64 
66  uint8_t *p, size_t *written);
67 
69  uint8_t *p, size_t *written);
70 
72  uint8_t *p, size_t *written);
73 
75  size_t clientHelloLen, uint8_t *p, size_t *written);
76 
78  const TlsServerNameList *serverNameList);
79 
81  const uint8_t *maxFragLen);
82 
84  const uint8_t *recordSizeLimit);
85 
87  const TlsEcPointFormatList *ecPointFormatList);
88 
90  const TlsProtocolNameList *protocolNameList);
91 
93  const uint8_t *clientCertType);
94 
96  const uint8_t *serverCertType);
97 
99  const uint8_t *extendedMasterSecret);
100 
103 
104 //C++ guard
105 #ifdef __cplusplus
106  }
107 #endif
108 
109 #endif
error_t tlsFormatClientCertTypeListExtension(TlsContext *context, uint8_t *p, size_t *written)
Format ClientCertType extension.
TLS (Transport Layer Security)
error_t tlsFormatClientRecordSizeLimitExtension(TlsContext *context, uint8_t *p, size_t *written)
Format RecordSizeLimit extension.
error_t tlsParseServerRecordSizeLimitExtension(TlsContext *context, const uint8_t *recordSizeLimit)
Parse RecordSizeLimit extension.
uint8_t p
Definition: ndp.h:295
error_t tlsParseServerSniExtension(TlsContext *context, const TlsServerNameList *serverNameList)
Parse SNI extension.
error_t tlsFormatClientEmsExtension(TlsContext *context, uint8_t *p, size_t *written)
Format ExtendedMasterSecret extension.
error_t tlsParseServerEcPointFormatsExtension(TlsContext *context, const TlsEcPointFormatList *ecPointFormatList)
Parse EcPointFormats extension.
error_t tlsParseServerEmsExtension(TlsContext *context, const uint8_t *extendedMasterSecret)
Parse ExtendedMasterSecret extension.
__start_packed struct @74 TlsProtocolNameList
List of protocol names.
__start_packed struct @76 TlsEcPointFormatList
List of supported EC point formats.
error_t tlsFormatClientRenegoInfoExtension(TlsContext *context, uint8_t *p, size_t *written)
Format RenegotiationInfo 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
Error codes.
Definition: error.h:40
uint8_t extensions[]
Definition: tls13_misc.h:322
error_t tlsFormatClientSniExtension(TlsContext *context, uint8_t *p, size_t *written)
Format SNI extension.
unsigned int uint_t
Definition: compiler_port.h:43
error_t tlsParseClientCertTypeExtension(TlsContext *context, const uint8_t *clientCertType)
Parse ClientCertType extension.
error_t tlsParseServerMaxFragLenExtension(TlsContext *context, const uint8_t *maxFragLen)
Parse MaxFragmentLength extension.
error_t tlsFormatClientEcPointFormatsExtension(TlsContext *context, uint_t cipherSuiteTypes, uint8_t *p, size_t *written)
Format EcPointFormats extension.
error_t tlsParseServerRenegoInfoExtension(TlsContext *context, const TlsHelloExtensions *extensions)
Parse RenegotiationInfo extension.
error_t tlsFormatClientSupportedVersionsExtension(TlsContext *context, uint8_t *p, size_t *written)
Format SupportedVersions extension.
error_t tlsParseServerCertTypeExtension(TlsContext *context, const uint8_t *serverCertType)
Parse ServerCertType extension.
error_t tlsFormatClientAlpnExtension(TlsContext *context, uint8_t *p, size_t *written)
Format ALPN extension.
Hello extensions.
Definition: tls.h:1878
error_t tlsFormatServerCertTypeListExtension(TlsContext *context, uint8_t *p, size_t *written)
Format ServerCertType extension.
__start_packed struct @72 TlsServerNameList
List of server names.
#define TlsContext
Definition: tls.h:34
error_t tlsFormatClientHelloPaddingExtension(TlsContext *context, size_t clientHelloLen, uint8_t *p, size_t *written)
Format ClientHello Padding extension.
error_t tlsFormatSupportedGroupsExtension(TlsContext *context, uint_t cipherSuiteTypes, uint8_t *p, size_t *written)
Format SupportedGroups extension.