kate(4): put missing \n into device_printf(9) calls
[dragonfly.git] / contrib / wpa_supplicant-0.5.8 / tls_none.c
1 /*
2  * WPA Supplicant / SSL/TLS interface functions for no TLS case
3  * Copyright (c) 2004, Jouni Malinen <j@w1.fi>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation.
8  *
9  * Alternatively, this software may be distributed under the terms of BSD
10  * license.
11  *
12  * See README and COPYING for more details.
13  */
14
15 #include "includes.h"
16
17 #include "common.h"
18 #include "tls.h"
19
20 void * tls_init(const struct tls_config *conf)
21 {
22         return (void *) 1;
23 }
24
25 void tls_deinit(void *ssl_ctx)
26 {
27 }
28
29
30 #ifdef EAP_TLS_NONE
31
32 int tls_get_errors(void *tls_ctx)
33 {
34         return 0;
35 }
36
37
38 struct tls_connection * tls_connection_init(void *tls_ctx)
39 {
40         return NULL;
41 }
42
43
44 void tls_connection_deinit(void *tls_ctx, struct tls_connection *conn)
45 {
46 }
47
48
49 int tls_connection_established(void *tls_ctx, struct tls_connection *conn)
50 {
51         return -1;
52 }
53
54
55 int tls_connection_shutdown(void *tls_ctx, struct tls_connection *conn)
56 {
57         return -1;
58 }
59
60
61 int 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
68 int tls_global_set_params(void *tls_ctx,
69                           const struct tls_connection_params *params)
70 {
71         return -1;
72 }
73
74
75 int tls_global_set_verify(void *tls_ctx, int check_crl)
76 {
77         return -1;
78 }
79
80
81 int tls_connection_set_verify(void *tls_ctx, struct tls_connection *conn,
82                               int verify_peer)
83 {
84         return -1;
85 }
86
87
88 int tls_connection_set_ia(void *tls_ctx, struct tls_connection *conn,
89                           int tls_ia)
90 {
91         return -1;
92 }
93
94
95 int tls_connection_get_keys(void *tls_ctx, struct tls_connection *conn,
96                             struct tls_keys *keys)
97 {
98         return -1;
99 }
100
101
102 int tls_connection_prf(void *tls_ctx, struct tls_connection *conn,
103                        const char *label, int server_random_first,
104                        u8 *out, size_t out_len)
105 {
106         return -1;
107 }
108
109
110 u8 * tls_connection_handshake(void *tls_ctx, struct tls_connection *conn,
111                               const u8 *in_data, size_t in_len,
112                               size_t *out_len, u8 **appl_data,
113                               size_t *appl_data_len)
114 {
115         return NULL;
116 }
117
118
119 u8 * tls_connection_server_handshake(void *tls_ctx,
120                                      struct tls_connection *conn,
121                                      const u8 *in_data, size_t in_len,
122                                      size_t *out_len)
123 {
124         return NULL;
125 }
126
127
128 int tls_connection_encrypt(void *tls_ctx, struct tls_connection *conn,
129                            const u8 *in_data, size_t in_len,
130                            u8 *out_data, size_t out_len)
131 {
132         return -1;
133 }
134
135
136 int tls_connection_decrypt(void *tls_ctx, struct tls_connection *conn,
137                            const u8 *in_data, size_t in_len,
138                            u8 *out_data, size_t out_len)
139 {
140         return -1;
141 }
142
143
144 int tls_connection_resumed(void *tls_ctx, struct tls_connection *conn)
145 {
146         return 0;
147 }
148
149
150 int tls_connection_set_master_key(void *tls_ctx, struct tls_connection *conn,
151                                   const u8 *key, size_t key_len)
152 {
153         return -1;
154 }
155
156
157 int tls_connection_set_cipher_list(void *tls_ctx, struct tls_connection *conn,
158                                    u8 *ciphers)
159 {
160         return -1;
161 }
162
163
164 int tls_get_cipher(void *tls_ctx, struct tls_connection *conn,
165                    char *buf, size_t buflen)
166 {
167         return -1;
168 }
169
170
171 int tls_connection_enable_workaround(void *tls_ctx,
172                                      struct tls_connection *conn)
173 {
174         return -1;
175 }
176
177
178 int 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
186 int tls_connection_get_failed(void *tls_ctx, struct tls_connection *conn)
187 {
188         return 0;
189 }
190
191
192 int tls_connection_get_read_alerts(void *tls_ctx, struct tls_connection *conn)
193 {
194         return 0;
195 }
196
197
198 int tls_connection_get_write_alerts(void *tls_ctx,
199                                     struct tls_connection *conn)
200 {
201         return 0;
202 }
203
204
205 int tls_connection_get_keyblock_size(void *tls_ctx,
206                                      struct tls_connection *conn)
207 {
208         return -1;
209 }
210
211
212 unsigned int tls_capabilities(void *tls_ctx)
213 {
214         return 0;
215 }
216
217
218 int tls_connection_ia_send_phase_finished(void *tls_ctx,
219                                           struct tls_connection *conn,
220                                           int final,
221                                           u8 *out_data, size_t out_len)
222 {
223         return -1;
224 }
225
226
227 int tls_connection_ia_final_phase_finished(void *tls_ctx,
228                                            struct tls_connection *conn)
229 {
230         return -1;
231 }
232
233
234 int tls_connection_ia_permute_inner_secret(void *tls_ctx,
235                                            struct tls_connection *conn,
236                                            const u8 *key, size_t key_len)
237 {
238         return -1;
239 }
240
241 #endif /* EAP_TLS_NONE */