blob: ae392ad8aa0f56bcb819cf5276c567984a1ad112 [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
48int tls_connection_shutdown(void *tls_ctx, struct tls_connection *conn)
49{
50 return -1;
51}
52
53
54int tls_connection_set_params(void *tls_ctx, struct tls_connection *conn,
55 const struct tls_connection_params *params)
56{
57 return -1;
58}
59
60
61int tls_global_set_params(void *tls_ctx,
62 const struct tls_connection_params *params)
63{
64 return -1;
65}
66
67
68int tls_global_set_verify(void *tls_ctx, int check_crl)
69{
70 return -1;
71}
72
73
74int tls_connection_set_verify(void *tls_ctx, struct tls_connection *conn,
Dmitry Shmidtd80a4012015-11-05 16:35:40 -080075 int verify_peer, unsigned int flags,
76 const u8 *session_ctx, size_t session_ctx_len)
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070077{
78 return -1;
79}
80
81
Dmitry Shmidtd80a4012015-11-05 16:35:40 -080082int tls_connection_get_random(void *tls_ctx, struct tls_connection *conn,
83 struct tls_random *data)
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070084{
85 return -1;
86}
87
88
89int tls_connection_prf(void *tls_ctx, struct tls_connection *conn,
90 const char *label, int server_random_first,
Dmitry Shmidtaf9da312015-04-03 10:03:11 -070091 int skip_keyblock, u8 *out, size_t out_len)
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070092{
93 return -1;
94}
95
96
97struct wpabuf * tls_connection_handshake(void *tls_ctx,
98 struct tls_connection *conn,
99 const struct wpabuf *in_data,
100 struct wpabuf **appl_data)
101{
102 return NULL;
103}
104
105
106struct wpabuf * tls_connection_server_handshake(void *tls_ctx,
107 struct tls_connection *conn,
108 const struct wpabuf *in_data,
109 struct wpabuf **appl_data)
110{
111 return NULL;
112}
113
114
115struct wpabuf * tls_connection_encrypt(void *tls_ctx,
116 struct tls_connection *conn,
117 const struct wpabuf *in_data)
118{
119 return NULL;
120}
121
122
123struct wpabuf * tls_connection_decrypt(void *tls_ctx,
124 struct tls_connection *conn,
125 const struct wpabuf *in_data)
126{
127 return NULL;
128}
129
130
131int tls_connection_resumed(void *tls_ctx, struct tls_connection *conn)
132{
133 return 0;
134}
135
136
137int tls_connection_set_cipher_list(void *tls_ctx, struct tls_connection *conn,
138 u8 *ciphers)
139{
140 return -1;
141}
142
143
Dmitry Shmidtd80a4012015-11-05 16:35:40 -0800144int tls_get_version(void *ssl_ctx, struct tls_connection *conn,
145 char *buf, size_t buflen)
146{
147 return -1;
148}
149
150
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700151int tls_get_cipher(void *tls_ctx, struct tls_connection *conn,
152 char *buf, size_t buflen)
153{
154 return -1;
155}
156
157
158int tls_connection_enable_workaround(void *tls_ctx,
159 struct tls_connection *conn)
160{
161 return -1;
162}
163
164
165int tls_connection_client_hello_ext(void *tls_ctx, struct tls_connection *conn,
166 int ext_type, const u8 *data,
167 size_t data_len)
168{
169 return -1;
170}
171
172
173int tls_connection_get_failed(void *tls_ctx, struct tls_connection *conn)
174{
175 return 0;
176}
177
178
179int tls_connection_get_read_alerts(void *tls_ctx, struct tls_connection *conn)
180{
181 return 0;
182}
183
184
185int tls_connection_get_write_alerts(void *tls_ctx,
186 struct tls_connection *conn)
187{
188 return 0;
189}
190
191
Dmitry Shmidtff787d52015-01-12 13:01:47 -0800192int tls_get_library_version(char *buf, size_t buf_len)
193{
194 return os_snprintf(buf, buf_len, "none");
195}
Dmitry Shmidtd80a4012015-11-05 16:35:40 -0800196
197
198void tls_connection_set_success_data(struct tls_connection *conn,
199 struct wpabuf *data)
200{
201}
202
203
204void tls_connection_set_success_data_resumed(struct tls_connection *conn)
205{
206}
207
208
209const struct wpabuf *
210tls_connection_get_success_data(struct tls_connection *conn)
211{
212 return NULL;
213}
214
215
216void tls_connection_remove_session(struct tls_connection *conn)
217{
218}