wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Functions
eap_server_tls_common.c File Reference

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

#include "includes.h"
#include "common.h"
#include "crypto/sha1.h"
#include "crypto/tls.h"
#include "eap_i.h"
#include "eap_tls_common.h"

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.