We are using 4.1.2 really.
[dragonfly/netmp.git] / contrib / hostapd-0.5.8 / tls_none.c
blobad08d5076c8804132741ed5d2cd668bfd572d9a3
1 /*
2 * WPA Supplicant / SSL/TLS interface functions for no TLS case
3 * Copyright (c) 2004, Jouni Malinen <j@w1.fi>
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.
9 * Alternatively, this software may be distributed under the terms of BSD
10 * license.
12 * See README and COPYING for more details.
15 #include "includes.h"
17 #include "common.h"
18 #include "tls.h"
20 void * tls_init(const struct tls_config *conf)
22 return (void *) 1;
25 void tls_deinit(void *ssl_ctx)
30 #ifdef EAP_TLS_NONE
32 int tls_get_errors(void *tls_ctx)
34 return 0;
38 struct tls_connection * tls_connection_init(void *tls_ctx)
40 return NULL;
44 void tls_connection_deinit(void *tls_ctx, struct tls_connection *conn)
49 int tls_connection_established(void *tls_ctx, struct tls_connection *conn)
51 return -1;
55 int tls_connection_shutdown(void *tls_ctx, struct tls_connection *conn)
57 return -1;
61 int tls_connection_set_params(void *tls_ctx, struct tls_connection *conn,
62 const struct tls_connection_params *params)
64 return -1;
68 int tls_global_set_params(void *tls_ctx,
69 const struct tls_connection_params *params)
71 return -1;
75 int tls_global_set_verify(void *tls_ctx, int check_crl)
77 return -1;
81 int tls_connection_set_verify(void *tls_ctx, struct tls_connection *conn,
82 int verify_peer)
84 return -1;
88 int tls_connection_set_ia(void *tls_ctx, struct tls_connection *conn,
89 int tls_ia)
91 return -1;
95 int tls_connection_get_keys(void *tls_ctx, struct tls_connection *conn,
96 struct tls_keys *keys)
98 return -1;
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)
106 return -1;
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)
115 return NULL;
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)
124 return NULL;
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)
132 return -1;
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)
140 return -1;
144 int tls_connection_resumed(void *tls_ctx, struct tls_connection *conn)
146 return 0;
150 int tls_connection_set_master_key(void *tls_ctx, struct tls_connection *conn,
151 const u8 *key, size_t key_len)
153 return -1;
157 int tls_connection_set_cipher_list(void *tls_ctx, struct tls_connection *conn,
158 u8 *ciphers)
160 return -1;
164 int tls_get_cipher(void *tls_ctx, struct tls_connection *conn,
165 char *buf, size_t buflen)
167 return -1;
171 int tls_connection_enable_workaround(void *tls_ctx,
172 struct tls_connection *conn)
174 return -1;
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)
182 return -1;
186 int tls_connection_get_failed(void *tls_ctx, struct tls_connection *conn)
188 return 0;
192 int tls_connection_get_read_alerts(void *tls_ctx, struct tls_connection *conn)
194 return 0;
198 int tls_connection_get_write_alerts(void *tls_ctx,
199 struct tls_connection *conn)
201 return 0;
205 int tls_connection_get_keyblock_size(void *tls_ctx,
206 struct tls_connection *conn)
208 return -1;
212 unsigned int tls_capabilities(void *tls_ctx)
214 return 0;
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)
223 return -1;
227 int tls_connection_ia_final_phase_finished(void *tls_ctx,
228 struct tls_connection *conn)
230 return -1;
234 int tls_connection_ia_permute_inner_secret(void *tls_ctx,
235 struct tls_connection *conn,
236 const u8 *key, size_t key_len)
238 return -1;
241 #endif /* EAP_TLS_NONE */