tls_quic_misc.h
Go to the documentation of this file.
1 /**
2  * @file tls_quic_misc.h
3  * @brief QUIC helper functions
4  *
5  * @section License
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  *
9  * Copyright (C) 2010-2025 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  * @section Description
28  *
29  * The TLS protocol provides communications security over the Internet. The
30  * protocol allows client/server applications to communicate in a way that
31  * is designed to prevent eavesdropping, tampering, or message forgery
32  *
33  * @author Oryx Embedded SARL (www.oryx-embedded.com)
34  * @version 2.5.4
35  **/
36 
37 #ifndef _TLS_QUIC_MISC_H
38 #define _TLS_QUIC_MISC_H
39 
40 //Dependencies
41 #include "tls.h"
42 
43 //C++ guard
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47 
48 //QUIC TLS related functions
50  uint8_t *p, size_t *written);
51 
53  const TlsExtension *quicTransportParams);
54 
56  const uint8_t *clientKey, const uint8_t *serverKey, size_t keyLen);
57 
58 error_t tlsSendQuicHandshakeMessage(TlsContext *context, const uint8_t *message,
59  size_t length);
60 
62  size_t length);
63 
64 //C++ guard
65 #ifdef __cplusplus
66 }
67 #endif
68 
69 #endif
error_t tlsFormatQuicTransportParamsExtension(TlsContext *context, uint8_t *p, size_t *written)
Format QuicTransportParameters extension.
Definition: tls_quic_misc.c:57
uint8_t p
Definition: ndp.h:300
uint8_t message[]
Definition: chap.h:154
TlsExtension
Definition: tls.h:1691
error_t tlsSendQuicAlertMessage(TlsContext *context, const TlsAlert *message, size_t length)
Send alert message.
TlsEncryptionLevel
Encryption level.
Definition: tls.h:1579
#define TlsContext
Definition: tls.h:36
error_t
Error codes.
Definition: error.h:43
TlsAlert
Definition: tls.h:1991
uint8_t length
Definition: tcp.h:375
error_t tlsParseQuicTransportParamsExtension(TlsContext *context, const TlsExtension *quicTransportParams)
Parse QuicTransportParameters extension.
error_t tlsSetQuicEncryptionKeys(TlsContext *context, TlsEncryptionLevel level, const uint8_t *clientKey, const uint8_t *serverKey, size_t keyLen)
Set encryption keys.
TLS (Transport Layer Security)
error_t tlsSendQuicHandshakeMessage(TlsContext *context, const uint8_t *message, size_t length)
Send handshake message.