Classes | Defines | Functions
eap_peap.c File Reference
#include "includes.h"
#include "common.h"
#include "crypto/sha1.h"
#include "crypto/tls.h"
#include "eap_common/eap_tlv_common.h"
#include "eap_common/eap_peap_common.h"
#include "eap_i.h"
#include "eap_tls_common.h"
#include "eap_config.h"
#include "tncc.h"
Include dependency graph for eap_peap.c:

Go to the source code of this file.

Classes

struct  eap_peap_data

Defines

#define EAP_PEAP_VERSION   1

Functions

static int eap_peap_decrypt (struct eap_sm *sm, struct eap_peap_data *data, struct eap_method_ret *ret, const struct eap_hdr *req, const struct wpabuf *in_data, struct wpabuf **out_data)
static void eap_peap_deinit (struct eap_sm *sm, void *priv)
static void eap_peap_deinit_for_reauth (struct eap_sm *sm, void *priv)
static int eap_peap_derive_cmk (struct eap_sm *sm, struct eap_peap_data *data)
static int eap_peap_get_isk (struct eap_sm *sm, struct eap_peap_data *data, u8 *isk, size_t isk_len)
static int eap_peap_get_status (struct eap_sm *sm, void *priv, char *buf, size_t buflen, int verbose)
static u8 * eap_peap_getKey (struct eap_sm *sm, void *priv, size_t *len)
static Boolean eap_peap_has_reauth_data (struct eap_sm *sm, void *priv)
static void * eap_peap_init (struct eap_sm *sm)
static void * eap_peap_init_for_reauth (struct eap_sm *sm, void *priv)
static Boolean eap_peap_isKeyAvailable (struct eap_sm *sm, void *priv)
static int eap_peap_parse_phase1 (struct eap_peap_data *data, const char *phase1)
static int eap_peap_phase2_request (struct eap_sm *sm, struct eap_peap_data *data, struct eap_method_ret *ret, struct wpabuf *req, struct wpabuf **resp)
static struct wpabufeap_peap_process (struct eap_sm *sm, void *priv, struct eap_method_ret *ret, const struct wpabuf *reqData)
static struct wpabufeap_peapv2_tlv_eap_payload (struct wpabuf *buf)
int eap_peer_peap_register (void)
static int eap_tlv_add_cryptobinding (struct eap_sm *sm, struct eap_peap_data *data, struct wpabuf *buf)
static struct wpabufeap_tlv_build_nak (int id, u16 nak_type)
static struct wpabufeap_tlv_build_result (struct eap_sm *sm, struct eap_peap_data *data, int crypto_tlv_used, int id, u16 status)
static int eap_tlv_process (struct eap_sm *sm, struct eap_peap_data *data, struct eap_method_ret *ret, const struct wpabuf *req, struct wpabuf **resp, int force_failure)
static int eap_tlv_validate_cryptobinding (struct eap_sm *sm, struct eap_peap_data *data, const u8 *crypto_tlv, size_t crypto_tlv_len)

Define Documentation

#define EAP_PEAP_VERSION   1

Definition at line 33 of file eap_peap.c.


Function Documentation

static int eap_peap_decrypt ( struct eap_sm sm,
struct eap_peap_data data,
struct eap_method_ret ret,
const struct eap_hdr req,
const struct wpabuf in_data,
struct wpabuf **  out_data 
) [static]

Definition at line 756 of file eap_peap.c.

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

Definition at line 178 of file eap_peap.c.

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

Definition at line 1171 of file eap_peap.c.

static int eap_peap_derive_cmk ( struct eap_sm sm,
struct eap_peap_data data 
) [static]

Definition at line 250 of file eap_peap.c.

static int eap_peap_get_isk ( struct eap_sm sm,
struct eap_peap_data data,
u8 *  isk,
size_t  isk_len 
) [static]

Definition at line 221 of file eap_peap.c.

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

Definition at line 1202 of file eap_peap.c.

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

Definition at line 1229 of file eap_peap.c.

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

Definition at line 1163 of file eap_peap.c.

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

Definition at line 138 of file eap_peap.c.

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

Definition at line 1180 of file eap_peap.c.

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

Definition at line 1222 of file eap_peap.c.

static int eap_peap_parse_phase1 ( struct eap_peap_data data,
const char *  phase1 
) [static]

Definition at line 77 of file eap_peap.c.

static int eap_peap_phase2_request ( struct eap_sm sm,
struct eap_peap_data data,
struct eap_method_ret ret,
struct wpabuf req,
struct wpabuf **  resp 
) [static]

Definition at line 611 of file eap_peap.c.

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

Definition at line 1030 of file eap_peap.c.

static struct wpabuf* eap_peapv2_tlv_eap_payload ( struct wpabuf buf) [static, read]

Definition at line 584 of file eap_peap.c.

int eap_peer_peap_register ( void  )

Definition at line 1264 of file eap_peap.c.

static int eap_tlv_add_cryptobinding ( struct eap_sm sm,
struct eap_peap_data data,
struct wpabuf buf 
) [static]

Definition at line 302 of file eap_peap.c.

static struct wpabuf* eap_tlv_build_nak ( int  id,
u16  nak_type 
) [static, read]

eap_tlv_build_nak - Build EAP-TLV NAK message : EAP identifier for the header : TLV type (EAP_TLV_*) Returns: Buffer to the allocated EAP-TLV NAK message or NULL on failure

This funtion builds an EAP-TLV NAK message. The caller is responsible for freeing the returned buffer.

Definition at line 202 of file eap_peap.c.

static struct wpabuf* eap_tlv_build_result ( struct eap_sm sm,
struct eap_peap_data data,
int  crypto_tlv_used,
int  id,
u16  status 
) [static, read]

eap_tlv_build_result - Build EAP-TLV Result message : EAP identifier for the header : Status (EAP_TLV_RESULT_SUCCESS or EAP_TLV_RESULT_FAILURE) Returns: Buffer to the allocated EAP-TLV Result message or NULL on failure

This funtion builds an EAP-TLV Result message. The caller is responsible for freeing the returned buffer.

Definition at line 352 of file eap_peap.c.

static int eap_tlv_process ( struct eap_sm sm,
struct eap_peap_data data,
struct eap_method_ret ret,
const struct wpabuf req,
struct wpabuf **  resp,
int  force_failure 
) [static]

eap_tlv_process - Process a received EAP-TLV message and generate a response : Pointer to EAP state machine allocated with eap_peer_sm_init() : Return values from EAP request validation and processing : EAP-TLV request to be processed. The caller must have validated that the buffer is large enough to contain full request (hdr->length bytes) and that the EAP type is EAP_TYPE_TLV. : Buffer to return a pointer to the allocated response message. This field should be initialized to NULL before the call. The value will be updated if a response message is generated. The caller is responsible for freeing the allocated message. : Force negotiation to fail Returns: 0 on success, -1 on failure

Definition at line 460 of file eap_peap.c.

static int eap_tlv_validate_cryptobinding ( struct eap_sm sm,
struct eap_peap_data data,
const u8 *  crypto_tlv,
size_t  crypto_tlv_len 
) [static]

Definition at line 385 of file eap_peap.c.



wpa_supplicant_node
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Jan 2 2014 11:25:17