tls_server_extensions.h
Go to the documentation of this file.
1 /**
2  * @file tls_server_extensions.h
3  * @brief Formatting and parsing of extensions (TLS server)
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_SERVER_EXTENSIONS_H
32 #define _TLS_SERVER_EXTENSIONS_H
33 
34 //Dependencies
35 #include "tls.h"
36 
37 //C++ guard
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
42 //TLS server 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  uint8_t *p, 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  const TlsSupportedVersionList *supportedVersionList);
72 
74  const TlsServerNameList *serverNameList);
75 
77  const uint8_t *maxFragLen);
78 
80  const uint8_t *recordSizeLimit);
81 
83  const TlsEcPointFormatList *ecPointFormatList);
84 
86  const TlsProtocolNameList *protocolNameList);
87 
89  const TlsCertTypeList *clientCertTypeList);
90 
92  const TlsCertTypeList *serverCertTypeList);
93 
95  const uint8_t *extendedMasterSecret);
96 
98  const TlsRenegoInfo *renegoInfo);
99 
100 //C++ guard
101 #ifdef __cplusplus
102 }
103 #endif
104 
105 #endif
error_t tlsFormatServerSniExtension(TlsContext *context, uint8_t *p, size_t *written)
Format SNI extension.
error_t tlsFormatClientCertTypeExtension(TlsContext *context, uint8_t *p, size_t *written)
Format ClientCertType extension.
error_t tlsParseClientRenegoInfoExtension(TlsContext *context, const TlsRenegoInfo *renegoInfo)
Parse RenegotiationInfo extension.
uint8_t p
Definition: ndp.h:298
error_t tlsFormatServerEcPointFormatsExtension(TlsContext *context, uint8_t *p, size_t *written)
Format EcPointFormats extension.
error_t tlsParseClientAlpnExtension(TlsContext *context, const TlsProtocolNameList *protocolNameList)
Parse ALPN extension.
error_t tlsFormatServerAlpnExtension(TlsContext *context, uint8_t *p, size_t *written)
Format ALPN extension.
error_t tlsFormatServerMaxFragLenExtension(TlsContext *context, uint8_t *p, size_t *written)
Format MaxFragmentLength extension.
error_t tlsParseClientEcPointFormatsExtension(TlsContext *context, const TlsEcPointFormatList *ecPointFormatList)
Parse EcPointFormats extension.
error_t tlsParseServerCertTypeListExtension(TlsContext *context, const TlsCertTypeList *serverCertTypeList)
Parse ServerCertType extension.
#define TlsContext
Definition: tls.h:36
error_t
Error codes.
Definition: error.h:42
error_t tlsParseClientSniExtension(TlsContext *context, const TlsServerNameList *serverNameList)
Parse SNI extension.
error_t tlsFormatServerCertTypeExtension(TlsContext *context, uint8_t *p, size_t *written)
Format ServerCertType extension.
__start_packed struct @74 TlsProtocolNameList
List of protocol names.
error_t tlsParseClientEmsExtension(TlsContext *context, const uint8_t *extendedMasterSecret)
Parse ExtendedMasterSecret extension.
error_t tlsFormatServerRenegoInfoExtension(TlsContext *context, uint8_t *p, size_t *written)
Format RenegotiationInfo extension.
error_t tlsFormatServerEmsExtension(TlsContext *context, uint8_t *p, size_t *written)
Format ExtendedMasterSecret extension.
error_t tlsParseClientSupportedVersionsExtension(TlsContext *context, const TlsSupportedVersionList *supportedVersionList)
Parse SupportedVersions extension.
error_t tlsParseClientCertTypeListExtension(TlsContext *context, const TlsCertTypeList *clientCertTypeList)
Parse ClientCertType extension.
__start_packed struct @72 TlsServerNameList
List of server names.
__start_packed struct @77 TlsCertTypeList
List of supported certificate types.
__start_packed struct @70 TlsSupportedVersionList
List of supported versions.
error_t tlsFormatServerRecordSizeLimitExtension(TlsContext *context, uint8_t *p, size_t *written)
Format RecordSizeLimit extension.
TLS (Transport Layer Security)
error_t tlsParseClientMaxFragLenExtension(TlsContext *context, const uint8_t *maxFragLen)
Parse MaxFragmentLength extension.
__start_packed struct @76 TlsEcPointFormatList
List of supported EC point formats.
error_t tlsParseClientRecordSizeLimitExtension(TlsContext *context, const uint8_t *recordSizeLimit)
Parse RecordSizeLimit extension.
__start_packed struct @78 TlsRenegoInfo
Renegotiated connection.