tls_extensions.h
Go to the documentation of this file.
1 /**
2  * @file tls_extensions.h
3  * @brief Parsing and checking of TLS extensions
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_EXTENSIONS_H
30 #define _TLS_EXTENSIONS_H
31 
32 //Dependencies
33 #include "tls.h"
34 
35 //C++ guard
36 #ifdef __cplusplus
37  extern "C" {
38 #endif
39 
40 //TLS related functions
43 
46 
47 error_t tlsCheckDuplicateExtension(uint16_t type, const uint8_t *p,
48  size_t length);
49 
51  const char_t *protocol, size_t length);
52 
53 //C++ guard
54 #ifdef __cplusplus
55  }
56 #endif
57 
58 #endif
TLS (Transport Layer Security)
uint16_t version
Definition: dtls_misc.h:163
TlsMessageType
Handshake message type.
Definition: tls.h:926
char char_t
Definition: compiler_port.h:41
uint8_t p
Definition: ndp.h:295
error_t tlsCheckDuplicateExtension(uint16_t type, const uint8_t *p, size_t length)
Check whether the specified extension type is a duplicate.
char_t type
error_t tlsParseHelloExtensions(TlsMessageType msgType, const uint8_t *p, size_t length, TlsHelloExtensions *extensions)
Parse Hello extensions.
error_t tlsCheckHelloExtensions(TlsMessageType msgType, uint16_t version, TlsHelloExtensions *extensions)
Check Hello extensions.
error_t
Error codes.
Definition: error.h:40
uint8_t extensions[]
Definition: tls13_misc.h:322
Hello extensions.
Definition: tls.h:1878
uint8_t protocol
bool_t tlsIsAlpnProtocolSupported(TlsContext *context, const char_t *protocol, size_t length)
Check whether the specified ALPN protocol is supported.
uint8_t length
Definition: dtls_misc.h:140
uint8_t msgType
Definition: dtls_misc.h:177
#define TlsContext
Definition: tls.h:34
int bool_t
Definition: compiler_port.h:47