blob: 5d0c6bda15479faa332092bd7cff1da5c4843ff8 [file] [log] [blame]
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -07001/*
2 * SSL/TLS interface functions for no TLS case
3 * Copyright (c) 2004-2009, Jouni Malinen <j@w1.fi>
4 *
Dmitry Shmidtc5ec7f52012-03-06 16:33:24 -08005 * This software may be distributed under the terms of the BSD license.
6 * See README for more details.
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -07007 */
8
9#include "includes.h"
10
11#include "common.h"
12#include "tls.h"
13
14void * tls_init(const struct tls_config *conf)
15{
16 return (void *) 1;
17}
18
19
20void tls_deinit(void *ssl_ctx)
21{
22}
23
24
25int tls_get_errors(void *tls_ctx)
26{
27 return 0;
28}
29
30
31struct tls_connection * tls_connection_init(void *tls_ctx)
32{
33 return NULL;
34}
35
36
37void tls_connection_deinit(void *tls_ctx, struct tls_connection *conn)
38{
39}
40
41
42int tls_connection_established(void *tls_ctx, struct tls_connection *conn)
43{
44 return -1;
45}
46
47
Hai Shalom39ba6fc2019-01-22 12:40:38 -080048char * tls_connection_peer_serial_num(void *tls_ctx,
49 struct tls_connection *conn)
50{
51 return NULL;
52}
53
54
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070055int tls_connection_shutdown(void *tls_ctx, struct tls_connection *conn)
56{
57 return -1;
58}
59
60
61int tls_connection_set_params(void *tls_ctx, struct tls_connection *conn,
62 const struct tls_connection_params *params)
63{
64 return -1;
65}
66
67
68int tls_global_set_params(void *tls_ctx,
69 const struct tls_connection_params *params)
70{
71 return -1;
72}
73
74
Hai Shalombf6e0ba2019-02-11 12:01:50 -080075int tls_global_set_verify(void *tls_ctx, int check_crl)
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070076{
77 return -1;
78}
79
80
81int tls_connection_set_verify(void *tls_ctx, struct tls_connection *conn,
Dmitry Shmidtd80a4012015-11-05 16:35:40 -080082 int verify_peer, unsigned int flags,
83 const u8 *session_ctx, size_t session_ctx_len)
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070084{
85 return -1;
86}
87
88
Dmitry Shmidtd80a4012015-11-05 16:35:40 -080089int tls_connection_get_random(void *tls_ctx, struct tls_connection *conn,
90 struct tls_random *data)
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070091{
92 return -1;
93}
94
95
Dmitry Shmidt849734c2016-05-27 09:59:01 -070096int tls_connection_export_key(void *tls_ctx, struct tls_connection *conn,
97 const char *label, u8 *out, size_t out_len)
98{
99 return -1;
100}
101
102
103int tls_connection_get_eap_fast_key(void *tls_ctx, struct tls_connection *conn,
104 u8 *out, size_t out_len)
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700105{
106 return -1;
107}
108
109
110struct wpabuf * tls_connection_handshake(void *tls_ctx,
111 struct tls_connection *conn,
112 const struct wpabuf *in_data,
113 struct wpabuf **appl_data)
114{
115 return NULL;
116}
117
118
119struct wpabuf * tls_connection_server_handshake(void *tls_ctx,
120 struct tls_connection *conn,
121 const struct wpabuf *in_data,
122 struct wpabuf **appl_data)
123{
124 return NULL;
125}
126
127
128struct wpabuf * tls_connection_encrypt(void *tls_ctx,
129 struct tls_connection *conn,
130 const struct wpabuf *in_data)
131{
132 return NULL;
133}
134
135
136struct wpabuf * tls_connection_decrypt(void *tls_ctx,
137 struct tls_connection *conn,
138 const struct wpabuf *in_data)
139{
140 return NULL;
141}
142
143
144int tls_connection_resumed(void *tls_ctx, struct tls_connection *conn)
145{
146 return 0;
147}
148
149
150int tls_connection_set_cipher_list(void *tls_ctx, struct tls_connection *conn,
151 u8 *ciphers)
152{
153 return -1;
154}
155
156
Dmitry Shmidtd80a4012015-11-05 16:35:40 -0800157int tls_get_version(void *ssl_ctx, struct tls_connection *conn,
158 char *buf, size_t buflen)
159{
160 return -1;
161}
162
163
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700164int tls_get_cipher(void *tls_ctx, struct tls_connection *conn,
165 char *buf, size_t buflen)
166{
167 return -1;
168}
169
170
171int tls_connection_enable_workaround(void *tls_ctx,
172 struct tls_connection *conn)
173{
174 return -1;
175}
176
177
178int tls_connection_client_hello_ext(void *tls_ctx, struct tls_connection *conn,
179 int ext_type, const u8 *data,
180 size_t data_len)
181{
182 return -1;
183}
184
185
186int tls_connection_get_failed(void *tls_ctx, struct tls_connection *conn)
187{
188 return 0;
189}
190
191
192int tls_connection_get_read_alerts(void *tls_ctx, struct tls_connection *conn)
193{
194 return 0;
195}
196
197
198int tls_connection_get_write_alerts(void *tls_ctx,
199 struct tls_connection *conn)
200{
201 return 0;
202}
203
204
Dmitry Shmidtff787d52015-01-12 13:01:47 -0800205int tls_get_library_version(char *buf, size_t buf_len)
206{
207 return os_snprintf(buf, buf_len, "none");
208}
Dmitry Shmidtd80a4012015-11-05 16:35:40 -0800209
210
211void tls_connection_set_success_data(struct tls_connection *conn,
212 struct wpabuf *data)
213{
214}
215
216
217void tls_connection_set_success_data_resumed(struct tls_connection *conn)
218{
219}
220
221
222const struct wpabuf *
223tls_connection_get_success_data(struct tls_connection *conn)
224{
225 return NULL;
226}
227
228
229void tls_connection_remove_session(struct tls_connection *conn)
230{
231}