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
12 * See README and COPYING for more details.
20 void * tls_init(const struct tls_config *conf)
25 void tls_deinit(void *ssl_ctx)
32 int tls_get_errors(void *tls_ctx)
38 struct tls_connection * tls_connection_init(void *tls_ctx)
44 void tls_connection_deinit(void *tls_ctx, struct tls_connection *conn)
49 int tls_connection_established(void *tls_ctx, struct tls_connection *conn)
55 int tls_connection_shutdown(void *tls_ctx, struct tls_connection *conn)
61 int tls_connection_set_params(void *tls_ctx, struct tls_connection *conn,
62 const struct tls_connection_params *params)
68 int tls_global_set_params(void *tls_ctx,
69 const struct tls_connection_params *params)
75 int tls_global_set_verify(void *tls_ctx, int check_crl)
81 int tls_connection_set_verify(void *tls_ctx, struct tls_connection *conn,
88 int tls_connection_set_ia(void *tls_ctx, struct tls_connection *conn,
95 int tls_connection_get_keys(void *tls_ctx, struct tls_connection *conn,
96 struct tls_keys *keys)
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)
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)
119 u8 * tls_connection_server_handshake(void *tls_ctx,
120 struct tls_connection *conn,
121 const u8 *in_data, size_t in_len,
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)
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)
144 int tls_connection_resumed(void *tls_ctx, struct tls_connection *conn)
150 int tls_connection_set_master_key(void *tls_ctx, struct tls_connection *conn,
151 const u8 *key, size_t key_len)
157 int tls_connection_set_cipher_list(void *tls_ctx, struct tls_connection *conn,
164 int tls_get_cipher(void *tls_ctx, struct tls_connection *conn,
165 char *buf, size_t buflen)
171 int tls_connection_enable_workaround(void *tls_ctx,
172 struct tls_connection *conn)
178 int tls_connection_client_hello_ext(void *tls_ctx, struct tls_connection *conn,
179 int ext_type, const u8 *data,
186 int tls_connection_get_failed(void *tls_ctx, struct tls_connection *conn)
192 int tls_connection_get_read_alerts(void *tls_ctx, struct tls_connection *conn)
198 int tls_connection_get_write_alerts(void *tls_ctx,
199 struct tls_connection *conn)
205 int tls_connection_get_keyblock_size(void *tls_ctx,
206 struct tls_connection *conn)
212 unsigned int tls_capabilities(void *tls_ctx)
218 int tls_connection_ia_send_phase_finished(void *tls_ctx,
219 struct tls_connection *conn,
221 u8 *out_data, size_t out_len)
227 int tls_connection_ia_final_phase_finished(void *tls_ctx,
228 struct tls_connection *conn)
234 int tls_connection_ia_permute_inner_secret(void *tls_ctx,
235 struct tls_connection *conn,
236 const u8 *key, size_t key_len)
241 #endif /* EAP_TLS_NONE */