Classes | Defines | Functions
eap_ttls.c File Reference
#include "includes.h"
#include "common.h"
#include "crypto/ms_funcs.h"
#include "crypto/sha1.h"
#include "crypto/tls.h"
#include "eap_common/chap.h"
#include "eap_common/eap_ttls.h"
#include "mschapv2.h"
#include "eap_i.h"
#include "eap_tls_common.h"
#include "eap_config.h"
Include dependency graph for eap_ttls.c:

Go to the source code of this file.

Classes

struct  eap_ttls_data
struct  ttls_parse_avp

Defines

#define EAP_TTLS_VERSION   0 /* TTLSv1 implementation is not yet complete */
#define MSCHAPV2_KEY_LEN   16
#define MSCHAPV2_NT_RESPONSE_LEN   24

Functions

int eap_peer_ttls_register (void)
static u8 * eap_ttls_avp_add (u8 *start, u8 *avphdr, u32 avp_code, u32 vendor_id, int mandatory, const u8 *data, size_t len)
static int eap_ttls_avp_encapsulate (struct wpabuf **resp, u32 avp_code, int mandatory)
static u8 * eap_ttls_avp_hdr (u8 *avphdr, u32 avp_code, u32 vendor_id, int mandatory, size_t len)
static void eap_ttls_check_auth_status (struct eap_sm *sm, struct eap_ttls_data *data, struct eap_method_ret *ret)
static int eap_ttls_decrypt (struct eap_sm *sm, struct eap_ttls_data *data, struct eap_method_ret *ret, u8 identifier, const struct wpabuf *in_data, struct wpabuf **out_data)
static void eap_ttls_deinit (struct eap_sm *sm, void *priv)
static void eap_ttls_deinit_for_reauth (struct eap_sm *sm, void *priv)
static int eap_ttls_encrypt_response (struct eap_sm *sm, struct eap_ttls_data *data, struct wpabuf *resp, u8 identifier, struct wpabuf **out_data)
static u8 * eap_ttls_fake_identity_request (void)
static int eap_ttls_get_status (struct eap_sm *sm, void *priv, char *buf, size_t buflen, int verbose)
static u8 * eap_ttls_getKey (struct eap_sm *sm, void *priv, size_t *len)
static Boolean eap_ttls_has_reauth_data (struct eap_sm *sm, void *priv)
static u8 * eap_ttls_implicit_challenge (struct eap_sm *sm, struct eap_ttls_data *data, size_t len)
static int eap_ttls_implicit_identity_request (struct eap_sm *sm, struct eap_ttls_data *data, struct eap_method_ret *ret, u8 identifier, struct wpabuf **out_data)
static void * eap_ttls_init (struct eap_sm *sm)
static void * eap_ttls_init_for_reauth (struct eap_sm *sm, void *priv)
static Boolean eap_ttls_isKeyAvailable (struct eap_sm *sm, void *priv)
static int eap_ttls_parse_attr_eap (const u8 *dpos, size_t dlen, struct ttls_parse_avp *parse)
static int eap_ttls_parse_avp (u8 *pos, size_t left, struct ttls_parse_avp *parse)
static int eap_ttls_parse_avps (struct wpabuf *in_decrypted, struct ttls_parse_avp *parse)
static void eap_ttls_phase2_eap_deinit (struct eap_sm *sm, struct eap_ttls_data *data)
static int eap_ttls_phase2_eap_process (struct eap_sm *sm, struct eap_ttls_data *data, struct eap_method_ret *ret, struct eap_hdr *hdr, size_t len, struct wpabuf **resp)
static int eap_ttls_phase2_request (struct eap_sm *sm, struct eap_ttls_data *data, struct eap_method_ret *ret, struct eap_hdr *hdr, struct wpabuf **resp)
static int eap_ttls_phase2_request_chap (struct eap_sm *sm, struct eap_ttls_data *data, struct eap_method_ret *ret, struct wpabuf **resp)
static int eap_ttls_phase2_request_eap (struct eap_sm *sm, struct eap_ttls_data *data, struct eap_method_ret *ret, struct eap_hdr *hdr, struct wpabuf **resp)
static int eap_ttls_phase2_request_eap_method (struct eap_sm *sm, struct eap_ttls_data *data, struct eap_method_ret *ret, struct eap_hdr *hdr, size_t len, u8 method, struct wpabuf **resp)
static int eap_ttls_phase2_request_mschap (struct eap_sm *sm, struct eap_ttls_data *data, struct eap_method_ret *ret, struct wpabuf **resp)
static int eap_ttls_phase2_request_mschapv2 (struct eap_sm *sm, struct eap_ttls_data *data, struct eap_method_ret *ret, struct wpabuf **resp)
static int eap_ttls_phase2_request_pap (struct eap_sm *sm, struct eap_ttls_data *data, struct eap_method_ret *ret, struct wpabuf **resp)
static void eap_ttls_phase2_select_eap_method (struct eap_ttls_data *data, u8 method)
static int eap_ttls_phase2_start (struct eap_sm *sm, struct eap_ttls_data *data, struct eap_method_ret *ret, u8 identifier, struct wpabuf **out_data)
static struct wpabufeap_ttls_process (struct eap_sm *sm, void *priv, struct eap_method_ret *ret, const struct wpabuf *reqData)
static int eap_ttls_process_decrypted (struct eap_sm *sm, struct eap_ttls_data *data, struct eap_method_ret *ret, u8 identifier, struct ttls_parse_avp *parse, struct wpabuf *in_decrypted, struct wpabuf **out_data)
static int eap_ttls_process_handshake (struct eap_sm *sm, struct eap_ttls_data *data, struct eap_method_ret *ret, u8 identifier, const u8 *in_data, size_t in_len, struct wpabuf **out_data)
static int eap_ttls_process_phase2_eap (struct eap_sm *sm, struct eap_ttls_data *data, struct eap_method_ret *ret, struct ttls_parse_avp *parse, struct wpabuf **resp)
static int eap_ttls_process_phase2_mschapv2 (struct eap_sm *sm, struct eap_ttls_data *data, struct eap_method_ret *ret, struct ttls_parse_avp *parse)
static int eap_ttls_process_start (struct eap_sm *sm, struct eap_ttls_data *data, u8 flags, struct eap_method_ret *ret)
static int eap_ttls_v0_derive_key (struct eap_sm *sm, struct eap_ttls_data *data)
static void eap_ttlsv1_permute_inner (struct eap_sm *sm, struct eap_ttls_data *data)
static void eap_ttlsv1_phase2_eap_finish (struct eap_sm *sm, struct eap_ttls_data *data, struct eap_method_ret *ret)

Define Documentation

#define EAP_TTLS_VERSION   0 /* TTLSv1 implementation is not yet complete */

Definition at line 34 of file eap_ttls.c.

#define MSCHAPV2_KEY_LEN   16

Definition at line 38 of file eap_ttls.c.

#define MSCHAPV2_NT_RESPONSE_LEN   24

Definition at line 39 of file eap_ttls.c.


Function Documentation

int eap_peer_ttls_register ( void  )

Definition at line 1962 of file eap_ttls.c.

static u8* eap_ttls_avp_add ( u8 *  start,
u8 *  avphdr,
u32  avp_code,
u32  vendor_id,
int  mandatory,
const u8 *  data,
size_t  len 
) [static]

Definition at line 211 of file eap_ttls.c.

static int eap_ttls_avp_encapsulate ( struct wpabuf **  resp,
u32  avp_code,
int  mandatory 
) [static]

Definition at line 224 of file eap_ttls.c.

static u8* eap_ttls_avp_hdr ( u8 *  avphdr,
u32  avp_code,
u32  vendor_id,
int  mandatory,
size_t  len 
) [static]

Definition at line 187 of file eap_ttls.c.

static void eap_ttls_check_auth_status ( struct eap_sm sm,
struct eap_ttls_data data,
struct eap_method_ret ret 
) [static]

Definition at line 1760 of file eap_ttls.c.

static int eap_ttls_decrypt ( struct eap_sm sm,
struct eap_ttls_data data,
struct eap_method_ret ret,
u8  identifier,
const struct wpabuf in_data,
struct wpabuf **  out_data 
) [static]

Definition at line 1582 of file eap_ttls.c.

static void eap_ttls_deinit ( struct eap_sm sm,
void *  priv 
) [static]

Definition at line 172 of file eap_ttls.c.

static void eap_ttls_deinit_for_reauth ( struct eap_sm sm,
void *  priv 
) [static]

Definition at line 1861 of file eap_ttls.c.

static int eap_ttls_encrypt_response ( struct eap_sm sm,
struct eap_ttls_data data,
struct wpabuf resp,
u8  identifier,
struct wpabuf **  out_data 
) [static]

Definition at line 1246 of file eap_ttls.c.

static u8* eap_ttls_fake_identity_request ( void  ) [static]

Definition at line 1222 of file eap_ttls.c.

static int eap_ttls_get_status ( struct eap_sm sm,
void *  priv,
char *  buf,
size_t  buflen,
int  verbose 
) [static]

Definition at line 1893 of file eap_ttls.c.

static u8* eap_ttls_getKey ( struct eap_sm sm,
void *  priv,
size_t *  len 
) [static]

Definition at line 1943 of file eap_ttls.c.

static Boolean eap_ttls_has_reauth_data ( struct eap_sm sm,
void *  priv 
) [static]

Definition at line 1853 of file eap_ttls.c.

static u8* eap_ttls_implicit_challenge ( struct eap_sm sm,
struct eap_ttls_data data,
size_t  len 
) [static]

Definition at line 359 of file eap_ttls.c.

static int eap_ttls_implicit_identity_request ( struct eap_sm sm,
struct eap_ttls_data data,
struct eap_method_ret ret,
u8  identifier,
struct wpabuf **  out_data 
) [static]

Definition at line 1514 of file eap_ttls.c.

static void* eap_ttls_init ( struct eap_sm sm) [static]

Definition at line 84 of file eap_ttls.c.

static void* eap_ttls_init_for_reauth ( struct eap_sm sm,
void *  priv 
) [static]

Definition at line 1873 of file eap_ttls.c.

static Boolean eap_ttls_isKeyAvailable ( struct eap_sm sm,
void *  priv 
) [static]

Definition at line 1936 of file eap_ttls.c.

static int eap_ttls_parse_attr_eap ( const u8 *  dpos,
size_t  dlen,
struct ttls_parse_avp parse 
) [static]

Definition at line 1068 of file eap_ttls.c.

static int eap_ttls_parse_avp ( u8 *  pos,
size_t  left,
struct ttls_parse_avp parse 
) [static]

Definition at line 1097 of file eap_ttls.c.

static int eap_ttls_parse_avps ( struct wpabuf in_decrypted,
struct ttls_parse_avp parse 
) [static]

Definition at line 1184 of file eap_ttls.c.

static void eap_ttls_phase2_eap_deinit ( struct eap_sm sm,
struct eap_ttls_data data 
) [static]

Definition at line 161 of file eap_ttls.c.

static int eap_ttls_phase2_eap_process ( struct eap_sm sm,
struct eap_ttls_data data,
struct eap_method_ret ret,
struct eap_hdr hdr,
size_t  len,
struct wpabuf **  resp 
) [static]

Definition at line 476 of file eap_ttls.c.

static int eap_ttls_phase2_request ( struct eap_sm sm,
struct eap_ttls_data data,
struct eap_method_ret ret,
struct eap_hdr hdr,
struct wpabuf **  resp 
) [static]

Definition at line 961 of file eap_ttls.c.

static int eap_ttls_phase2_request_chap ( struct eap_sm sm,
struct eap_ttls_data data,
struct eap_method_ret ret,
struct wpabuf **  resp 
) [static]

Definition at line 878 of file eap_ttls.c.

static int eap_ttls_phase2_request_eap ( struct eap_sm sm,
struct eap_ttls_data data,
struct eap_method_ret ret,
struct eap_hdr hdr,
struct wpabuf **  resp 
) [static]

Definition at line 575 of file eap_ttls.c.

static int eap_ttls_phase2_request_eap_method ( struct eap_sm sm,
struct eap_ttls_data data,
struct eap_method_ret ret,
struct eap_hdr hdr,
size_t  len,
u8  method,
struct wpabuf **  resp 
) [static]

Definition at line 503 of file eap_ttls.c.

static int eap_ttls_phase2_request_mschap ( struct eap_sm sm,
struct eap_ttls_data data,
struct eap_method_ret ret,
struct wpabuf **  resp 
) [static]

Definition at line 728 of file eap_ttls.c.

static int eap_ttls_phase2_request_mschapv2 ( struct eap_sm sm,
struct eap_ttls_data data,
struct eap_method_ret ret,
struct wpabuf **  resp 
) [static]

Definition at line 638 of file eap_ttls.c.

static int eap_ttls_phase2_request_pap ( struct eap_sm sm,
struct eap_ttls_data data,
struct eap_method_ret ret,
struct wpabuf **  resp 
) [static]

Definition at line 817 of file eap_ttls.c.

static void eap_ttls_phase2_select_eap_method ( struct eap_ttls_data data,
u8  method 
) [static]

Definition at line 454 of file eap_ttls.c.

static int eap_ttls_phase2_start ( struct eap_sm sm,
struct eap_ttls_data data,
struct eap_method_ret ret,
u8  identifier,
struct wpabuf **  out_data 
) [static]

Definition at line 1552 of file eap_ttls.c.

static struct wpabuf* eap_ttls_process ( struct eap_sm sm,
void *  priv,
struct eap_method_ret ret,
const struct wpabuf reqData 
) [static, read]

Definition at line 1793 of file eap_ttls.c.

static int eap_ttls_process_decrypted ( struct eap_sm sm,
struct eap_ttls_data data,
struct eap_method_ret ret,
u8  identifier,
struct ttls_parse_avp parse,
struct wpabuf in_decrypted,
struct wpabuf **  out_data 
) [static]

Definition at line 1423 of file eap_ttls.c.

static int eap_ttls_process_handshake ( struct eap_sm sm,
struct eap_ttls_data data,
struct eap_method_ret ret,
u8  identifier,
const u8 *  in_data,
size_t  in_len,
struct wpabuf **  out_data 
) [static]

Definition at line 1705 of file eap_ttls.c.

static int eap_ttls_process_phase2_eap ( struct eap_sm sm,
struct eap_ttls_data data,
struct eap_method_ret ret,
struct ttls_parse_avp parse,
struct wpabuf **  resp 
) [static]

Definition at line 1269 of file eap_ttls.c.

static int eap_ttls_process_phase2_mschapv2 ( struct eap_sm sm,
struct eap_ttls_data data,
struct eap_method_ret ret,
struct ttls_parse_avp parse 
) [static]

Definition at line 1325 of file eap_ttls.c.

static int eap_ttls_process_start ( struct eap_sm sm,
struct eap_ttls_data data,
u8  flags,
struct eap_method_ret ret 
) [static]

Definition at line 1665 of file eap_ttls.c.

static int eap_ttls_v0_derive_key ( struct eap_sm sm,
struct eap_ttls_data data 
) [static]

Definition at line 282 of file eap_ttls.c.

static void eap_ttlsv1_permute_inner ( struct eap_sm sm,
struct eap_ttls_data data 
) [static]

Definition at line 618 of file eap_ttls.c.

static void eap_ttlsv1_phase2_eap_finish ( struct eap_sm sm,
struct eap_ttls_data data,
struct eap_method_ret ret 
) [static]

Definition at line 423 of file eap_ttls.c.



wpa_supplicant
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Apr 24 2014 15:34:38