tlsv1_client.h

Go to the documentation of this file.
00001 
00016 #ifndef TLSV1_CLIENT_H
00017 #define TLSV1_CLIENT_H
00018 
00019 #include "tlsv1_cred.h"
00020 
00021 struct tlsv1_client;
00022 
00023 int tlsv1_client_global_init(void);
00024 void tlsv1_client_global_deinit(void);
00025 struct tlsv1_client * tlsv1_client_init(void);
00026 void tlsv1_client_deinit(struct tlsv1_client *conn);
00027 int tlsv1_client_established(struct tlsv1_client *conn);
00028 int tlsv1_client_prf(struct tlsv1_client *conn, const char *label,
00029                      int server_random_first, u8 *out, size_t out_len);
00030 u8 * tlsv1_client_handshake(struct tlsv1_client *conn,
00031                             const u8 *in_data, size_t in_len,
00032                             size_t *out_len, u8 **appl_data,
00033                             size_t *appl_data_len);
00034 int tlsv1_client_encrypt(struct tlsv1_client *conn,
00035                          const u8 *in_data, size_t in_len,
00036                          u8 *out_data, size_t out_len);
00037 int tlsv1_client_decrypt(struct tlsv1_client *conn,
00038                          const u8 *in_data, size_t in_len,
00039                          u8 *out_data, size_t out_len);
00040 int tlsv1_client_get_cipher(struct tlsv1_client *conn, char *buf,
00041                             size_t buflen);
00042 int tlsv1_client_shutdown(struct tlsv1_client *conn);
00043 int tlsv1_client_resumed(struct tlsv1_client *conn);
00044 int tlsv1_client_hello_ext(struct tlsv1_client *conn, int ext_type,
00045                            const u8 *data, size_t data_len);
00046 int tlsv1_client_get_keys(struct tlsv1_client *conn, struct tls_keys *keys);
00047 int tlsv1_client_get_keyblock_size(struct tlsv1_client *conn);
00048 int tlsv1_client_set_cipher_list(struct tlsv1_client *conn, u8 *ciphers);
00049 int tlsv1_client_set_cred(struct tlsv1_client *conn,
00050                           struct tlsv1_credentials *cred);
00051 
00052 typedef int (*tlsv1_client_session_ticket_cb)
00053 (void *ctx, const u8 *ticket, size_t len, const u8 *client_random,
00054  const u8 *server_random, u8 *master_secret);
00055 
00056 void tlsv1_client_set_session_ticket_cb(struct tlsv1_client *conn,
00057                                         tlsv1_client_session_ticket_cb cb,
00058                                         void *ctx);
00059 
00060 #endif /* TLSV1_CLIENT_H */
00061 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated on Sat Nov 21 23:16:53 2009 for hostapd by  doxygen 1.6.1