tls_legacy.h
Go to the documentation of this file.
1 /**
2  * @file tls_legacy.h
3  * @brief Legacy definitions
4  *
5  * @section License
6  *
7  * Copyright (C) 2010-2018 Oryx Embedded SARL. All rights reserved.
8  *
9  * This file is part of CycloneTCP 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_LEGACY_H
30 #define _TLS_LEGACY_H
31 
32 //Deprecated definitions
33 #define TlsIoHandle TlsSocketHandle
34 
35 //Deprecated functions
36 #define tlsSetIoCallbacks(context, handle, sendCallback, receiveCallback) \
37  tlsSetSocketCallbacks(context, sendCallback, receiveCallback, handle);
38 
39 #ifdef TLS_RSA_SUPPORT
40  #if (TLS_RSA_SUPPORT == ENABLED)
41  #define TLS_RSA_KE_SUPPORT ENABLED
42  #else
43  #define TLS_RSA_KE_SUPPORT DISABLED
44  #endif
45  #undef TLS_RSA_SUPPORT
46 #endif
47 
48 #ifdef TLS_DHE_RSA_SUPPORT
49  #define TLS_DHE_RSA_KE_SUPPORT TLS_DHE_RSA_SUPPORT
50 #endif
51 
52 #ifdef TLS_DHE_DSS_SUPPORT
53  #define TLS_DHE_DSS_KE_SUPPORT TLS_DHE_DSS_SUPPORT
54 #endif
55 
56 #ifdef TLS_DH_ANON_SUPPORT
57  #define TLS_DH_ANON_KE_SUPPORT TLS_DH_ANON_SUPPORT
58 #endif
59 
60 #ifdef TLS_ECDHE_RSA_SUPPORT
61  #define TLS_ECDHE_RSA_KE_SUPPORT TLS_ECDHE_RSA_SUPPORT
62 #endif
63 
64 #ifdef TLS_ECDHE_ECDSA_SUPPORT
65  #define TLS_ECDHE_ECDSA_KE_SUPPORT TLS_ECDHE_ECDSA_SUPPORT
66 #endif
67 
68 #ifdef TLS_ECDH_ANON_SUPPORT
69  #define TLS_ECDH_ANON_KE_SUPPORT TLS_ECDH_ANON_SUPPORT
70 #endif
71 
72 #ifdef TLS_PSK_SUPPORT
73  #if (TLS_PSK_SUPPORT == ENABLED)
74  #define TLS_PSK_KE_SUPPORT ENABLED
75  #else
76  #define TLS_PSK_KE_SUPPORT DISABLED
77  #endif
78  #undef TLS_PSK_SUPPORT
79 #endif
80 
81 #ifdef TLS_RSA_PSK_SUPPORT
82  #define TLS_RSA_PSK_KE_SUPPORT TLS_RSA_PSK_SUPPORT
83 #endif
84 
85 #ifdef TLS_DHE_PSK_SUPPORT
86  #define TLS_DHE_PSK_KE_SUPPORT TLS_DHE_PSK_SUPPORT
87 #endif
88 
89 #ifdef TLS_ECDHE_PSK_SUPPORT
90  #define TLS_ECDHE_PSK_KE_SUPPORT TLS_ECDHE_PSK_SUPPORT
91 #endif
92 
93 #ifdef TLS_CURVE25519_SUPPORT
94  #define TLS_X25519_SUPPORT TLS_CURVE25519_SUPPORT
95 #endif
96 
97 #ifdef TLS_CURVE448_SUPPORT
98  #define TLS_X448_SUPPORT TLS_CURVE448_SUPPORT
99 #endif
100 
101 #define TlsSession TlsSessionState
102 #define tlsSaveSession tlsSaveSessionState
103 #define tlsRestoreSession tlsRestoreSessionState
104 
105 #endif