wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Macros | Functions
eap_tls_common.h File Reference

EAP-TLS/PEAP/TTLS/FAST server common functions. More...

Go to the source code of this file.

Data Structures

struct  eap_ssl_data
 TLS data for EAP methods. More...
 

Macros

#define EAP_TLS_FLAGS_LENGTH_INCLUDED   0x80
 
#define EAP_TLS_FLAGS_MORE_FRAGMENTS   0x40
 
#define EAP_TLS_FLAGS_START   0x20
 
#define EAP_TLS_VERSION_MASK   0x07
 
#define EAP_TLS_KEY_LEN   64
 
#define EAP_UNAUTH_TLS_TYPE   255
 
#define EAP_WFA_UNAUTH_TLS_TYPE   254
 

Functions

struct wpabufeap_tls_msg_alloc (EapType type, size_t payload_len, u8 code, u8 identifier)
 
int eap_server_tls_ssl_init (struct eap_sm *sm, struct eap_ssl_data *data, int verify_peer, int eap_type)
 
void eap_server_tls_ssl_deinit (struct eap_sm *sm, struct eap_ssl_data *data)
 
u8 * eap_server_tls_derive_key (struct eap_sm *sm, struct eap_ssl_data *data, char *label, size_t len)
 
u8 * eap_server_tls_derive_session_id (struct eap_sm *sm, struct eap_ssl_data *data, u8 eap_type, size_t *len)
 Derive a Session-Id based on TLS data. More...
 
struct wpabufeap_server_tls_build_msg (struct eap_ssl_data *data, int eap_type, int version, u8 id)
 
struct wpabufeap_server_tls_build_ack (u8 id, int eap_type, int version)
 
int eap_server_tls_phase1 (struct eap_sm *sm, struct eap_ssl_data *data)
 
struct wpabufeap_server_tls_encrypt (struct eap_sm *sm, struct eap_ssl_data *data, const struct wpabuf *plain)
 
int eap_server_tls_process (struct eap_sm *sm, struct eap_ssl_data *data, struct wpabuf *respData, void *priv, int eap_type, int(*proc_version)(struct eap_sm *sm, void *priv, int peer_version), void(*proc_msg)(struct eap_sm *sm, void *priv, const struct wpabuf *respData))
 

Detailed Description

EAP-TLS/PEAP/TTLS/FAST server common functions.

Function Documentation

u8* eap_server_tls_derive_session_id ( struct eap_sm sm,
struct eap_ssl_data data,
u8  eap_type,
size_t *  len 
)

Derive a Session-Id based on TLS data.

Parameters
smPointer to EAP state machine allocated with eap_peer_sm_init()
dataData for TLS processing
eap_typeEAP method used in Phase 1 (EAP_TYPE_TLS/PEAP/TTLS/FAST)
lenPointer to length of the session ID generated
Returns
Pointer to allocated Session-Id on success or NULL on failure

This function derive the Session-Id based on the TLS session data (client/server random and method type).

The caller is responsible for freeing the returned buffer.