tlsv1_client.h
Go to the documentation of this file.
00001 /*
00002  * TLSv1 client (RFC 2246)
00003  * Copyright (c) 2006-2007, Jouni Malinen <j@w1.fi>
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License version 2 as
00007  * published by the Free Software Foundation.
00008  *
00009  * Alternatively, this software may be distributed under the terms of BSD
00010  * license.
00011  *
00012  * See README and COPYING for more details.
00013  */
00014 
00015 #ifndef TLSV1_CLIENT_H
00016 #define TLSV1_CLIENT_H
00017 
00018 #include "tlsv1_cred.h"
00019 
00020 struct tlsv1_client;
00021 
00022 int tlsv1_client_global_init(void);
00023 void tlsv1_client_global_deinit(void);
00024 struct tlsv1_client * tlsv1_client_init(void);
00025 void tlsv1_client_deinit(struct tlsv1_client *conn);
00026 int tlsv1_client_established(struct tlsv1_client *conn);
00027 int tlsv1_client_prf(struct tlsv1_client *conn, const char *label,
00028                      int server_random_first, u8 *out, size_t out_len);
00029 u8 * tlsv1_client_handshake(struct tlsv1_client *conn,
00030                             const u8 *in_data, size_t in_len,
00031                             size_t *out_len, u8 **appl_data,
00032                             size_t *appl_data_len);
00033 int tlsv1_client_encrypt(struct tlsv1_client *conn,
00034                          const u8 *in_data, size_t in_len,
00035                          u8 *out_data, size_t out_len);
00036 int tlsv1_client_decrypt(struct tlsv1_client *conn,
00037                          const u8 *in_data, size_t in_len,
00038                          u8 *out_data, size_t out_len);
00039 int tlsv1_client_get_cipher(struct tlsv1_client *conn, char *buf,
00040                             size_t buflen);
00041 int tlsv1_client_shutdown(struct tlsv1_client *conn);
00042 int tlsv1_client_resumed(struct tlsv1_client *conn);
00043 int tlsv1_client_hello_ext(struct tlsv1_client *conn, int ext_type,
00044                            const u8 *data, size_t data_len);
00045 int tlsv1_client_get_keys(struct tlsv1_client *conn, struct tls_keys *keys);
00046 int tlsv1_client_get_keyblock_size(struct tlsv1_client *conn);
00047 int tlsv1_client_set_cipher_list(struct tlsv1_client *conn, u8 *ciphers);
00048 int tlsv1_client_set_cred(struct tlsv1_client *conn,
00049                           struct tlsv1_credentials *cred);
00050 
00051 typedef int (*tlsv1_client_session_ticket_cb)
00052 (void *ctx, const u8 *ticket, size_t len, const u8 *client_random,
00053  const u8 *server_random, u8 *master_secret);
00054 
00055 void tlsv1_client_set_session_ticket_cb(struct tlsv1_client *conn,
00056                                         tlsv1_client_session_ticket_cb cb,
00057                                         void *ctx);
00058 
00059 #endif /* TLSV1_CLIENT_H */


wpa_supplicant
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Jan 2 2014 11:26:38