The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Macros | Functions
eap_fast.c File Reference

Contains the interfaces that are called from the main handler. More...

#include "eap_fast.h"
#include "eap_fast_crypto.h"
#include <freeradius-devel/tls/utils.h>
#include <freeradius-devel/util/sha1.h>
#include <freeradius-devel/tls/openssl_user_macros.h>
#include <openssl/rand.h>
#include <openssl/ssl.h>
+ Include dependency graph for eap_fast.c:

Go to the source code of this file.

Macros

#define EAP_FAST_TLV_MAX   11
 
#define EAPTLS_MPPE_KEY_LEN   32
 
#define MIN(a, b)   (((a)>(b)) ? (b) : (a))
 
#define RANDFILL(x)   do { fr_assert(sizeof(x) % sizeof(uint32_t) == 0); for (size_t i = 0; i < sizeof(x); i += sizeof(uint32_t)) *((uint32_t *)&x[i]) = fr_rand(); } while(0)
 

Functions

static void eap_fast_append_crypto_binding (request_t *request, fr_tls_session_t *tls_session)
 
static void eap_fast_append_result (fr_tls_session_t *tls_session, fr_radius_packet_code_t code)
 
static fr_radius_packet_code_t eap_fast_crypto_binding (request_t *request, UNUSED eap_session_t *eap_session, fr_tls_session_t *tls_session, eap_tlv_crypto_binding_tlv_t *binding)
 
ssize_t eap_fast_decode_pair (TALLOC_CTX *ctx, fr_pair_list_t *out, fr_dict_attr_t const *parent, uint8_t const *data, size_t data_len, void *decode_ctx)
 FIXME do something with mandatory. More...
 
static fr_radius_packet_code_t eap_fast_eap_payload (request_t *request, eap_session_t *eap_session, fr_tls_session_t *tls_session, fr_pair_t *tlv_eap_payload)
 
static void eap_fast_init_keys (request_t *request, fr_tls_session_t *tls_session)
 RFC 4851 section 5.1 - EAP-FAST Authentication Phase 1: Key Derivations. More...
 
fr_radius_packet_code_t eap_fast_process (request_t *request, eap_session_t *eap_session, fr_tls_session_t *tls_session)
 
static fr_radius_packet_code_t eap_fast_process_tlvs (request_t *request, eap_session_t *eap_session, fr_tls_session_t *tls_session, fr_pair_list_t *fast_vps)
 
static void eap_fast_send_error (fr_tls_session_t *tls_session, int error)
 
static void eap_fast_send_identity_request (request_t *request, fr_tls_session_t *tls_session, eap_session_t *eap_session)
 
static void eap_fast_send_pac_tunnel (request_t *request, fr_tls_session_t *tls_session)
 
void eap_fast_tlv_append (fr_tls_session_t *tls_session, fr_dict_attr_t const *tlv, bool mandatory, int length, void const *data)
 
static void eap_fast_update_icmk (request_t *request, fr_tls_session_t *tls_session, uint8_t *msk)
 RFC 4851 section 5.2 - Intermediate Compound Key Derivations. More...
 
static int eap_fast_verify (request_t *request, fr_tls_session_t *tls_session, uint8_t const *data, unsigned int data_len)
 
static rlm_rcode_t process_reply (UNUSED eap_session_t *eap_session, fr_tls_session_t *tls_session, request_t *request, fr_packet_t *reply, fr_pair_list_t *reply_list)
 

Detailed Description

Contains the interfaces that are called from the main handler.

Id
cf84959a488cf9cfd1a71b796b97c86847de9bc8
Author
Alexander Clouter (alex@.nosp@m.digr.nosp@m.iz.or.nosp@m.g.uk)

Definition in file eap_fast.c.

Macro Definition Documentation

◆ EAP_FAST_TLV_MAX

#define EAP_FAST_TLV_MAX   11

Definition at line 244 of file eap_fast.c.

◆ EAPTLS_MPPE_KEY_LEN

#define EAPTLS_MPPE_KEY_LEN   32

◆ MIN

#define MIN (   a,
 
)    (((a)>(b)) ? (b) : (a))

◆ RANDFILL

#define RANDFILL (   x)    do { fr_assert(sizeof(x) % sizeof(uint32_t) == 0); for (size_t i = 0; i < sizeof(x); i += sizeof(uint32_t)) *((uint32_t *)&x[i]) = fr_rand(); } while(0)

Definition at line 37 of file eap_fast.c.

Function Documentation

◆ eap_fast_append_crypto_binding()

static void eap_fast_append_crypto_binding ( request_t request,
fr_tls_session_t *  tls_session 
)
static

Definition at line 217 of file eap_fast.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ eap_fast_append_result()

static void eap_fast_append_result ( fr_tls_session_t *  tls_session,
fr_radius_packet_code_t  code 
)
static

Definition at line 127 of file eap_fast.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ eap_fast_crypto_binding()

static fr_radius_packet_code_t eap_fast_crypto_binding ( request_t request,
UNUSED eap_session_t eap_session,
fr_tls_session_t *  tls_session,
eap_tlv_crypto_binding_tlv_t binding 
)
static

Definition at line 777 of file eap_fast.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ eap_fast_decode_pair()

ssize_t eap_fast_decode_pair ( TALLOC_CTX *  ctx,
fr_pair_list_t out,
fr_dict_attr_t const *  parent,
uint8_t const *  data,
size_t  data_len,
void *  decode_ctx 
)

FIXME do something with mandatory.

Definition at line 428 of file eap_fast.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ eap_fast_eap_payload()

static fr_radius_packet_code_t eap_fast_eap_payload ( request_t request,
eap_session_t eap_session,
fr_tls_session_t *  tls_session,
fr_pair_t tlv_eap_payload 
)
static

Definition at line 570 of file eap_fast.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ eap_fast_init_keys()

static void eap_fast_init_keys ( request_t request,
fr_tls_session_t *  tls_session 
)
static

RFC 4851 section 5.1 - EAP-FAST Authentication Phase 1: Key Derivations.

Definition at line 42 of file eap_fast.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ eap_fast_process()

fr_radius_packet_code_t eap_fast_process ( request_t request,
eap_session_t eap_session,
fr_tls_session_t *  tls_session 
)

Definition at line 898 of file eap_fast.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ eap_fast_process_tlvs()

static fr_radius_packet_code_t eap_fast_process_tlvs ( request_t request,
eap_session_t eap_session,
fr_tls_session_t *  tls_session,
fr_pair_list_t fast_vps 
)
static

Definition at line 800 of file eap_fast.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ eap_fast_send_error()

static void eap_fast_send_error ( fr_tls_session_t *  tls_session,
int  error 
)
static

Definition at line 119 of file eap_fast.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ eap_fast_send_identity_request()

static void eap_fast_send_identity_request ( request_t request,
fr_tls_session_t *  tls_session,
eap_session_t eap_session 
)
static

Definition at line 140 of file eap_fast.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ eap_fast_send_pac_tunnel()

static void eap_fast_send_pac_tunnel ( request_t request,
fr_tls_session_t *  tls_session 
)
static

Definition at line 155 of file eap_fast.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ eap_fast_tlv_append()

void eap_fast_tlv_append ( fr_tls_session_t *  tls_session,
fr_dict_attr_t const *  tlv,
bool  mandatory,
int  length,
void const *  data 
)

Definition at line 108 of file eap_fast.c.

+ Here is the caller graph for this function:

◆ eap_fast_update_icmk()

static void eap_fast_update_icmk ( request_t request,
fr_tls_session_t *  tls_session,
uint8_t msk 
)
static

RFC 4851 section 5.2 - Intermediate Compound Key Derivations.

Definition at line 77 of file eap_fast.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ eap_fast_verify()

static int eap_fast_verify ( request_t request,
fr_tls_session_t *  tls_session,
uint8_t const *  data,
unsigned int  data_len 
)
static

Definition at line 246 of file eap_fast.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ process_reply()

static rlm_rcode_t process_reply ( UNUSED eap_session_t eap_session,
fr_tls_session_t *  tls_session,
request_t request,
fr_packet_t reply,
fr_pair_list_t reply_list 
)
static

Definition at line 477 of file eap_fast.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: