wpa_supplicant / hostapd  2.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Fields
eapol_ctx Struct Reference

Global (for all networks) EAPOL state machine context. More...

#include <eapol_supp_sm.h>

Data Fields

void * ctx
 Pointer to arbitrary upper level context.
 
int preauth
 IEEE 802.11i/RSN pre-authentication. More...
 
void(* cb )(struct eapol_sm *eapol, enum eapol_supp_result result, void *ctx)
 Function to be called when EAPOL negotiation has been completed. More...
 
void * cb_ctx
 Callback context for cb()
 
void * msg_ctx
 Callback context for wpa_msg() calls.
 
void * scard_ctx
 Callback context for PC/SC scard_*() function calls. More...
 
void * eapol_send_ctx
 Callback context for eapol_send() calls.
 
void(* eapol_done_cb )(void *ctx)
 Function to be called at successful completion. More...
 
int(* eapol_send )(void *ctx, int type, const u8 *buf, size_t len)
 Send EAPOL packets. More...
 
int(* set_wep_key )(void *ctx, int unicast, int keyidx, const u8 *key, size_t keylen)
 Configure WEP keys. More...
 
void(* set_config_blob )(void *ctx, struct wpa_config_blob *blob)
 Set or add a named configuration blob. More...
 
const struct wpa_config_blob *(* get_config_blob )(void *ctx, const char *name)
 Get a named configuration blob. More...
 
void(* aborted_cached )(void *ctx)
 Notify that cached PMK attempt was aborted. More...
 
const char * opensc_engine_path
 Path to the OpenSSL engine for opensc. More...
 
const char * pkcs11_engine_path
 Path to the OpenSSL engine for PKCS#11. More...
 
const char * pkcs11_module_path
 Path to the OpenSSL OpenSC/PKCS#11 module. More...
 
const char * openssl_ciphers
 OpenSSL cipher string. More...
 
struct wps_contextwps
 WPS context data. More...
 
void(* eap_param_needed )(void *ctx, enum wpa_ctrl_req_type field, const char *txt)
 Notify that EAP parameter is needed. More...
 
void(* port_cb )(void *ctx, int authorized)
 Set port authorized/unauthorized callback (optional) More...
 
void(* cert_cb )(void *ctx, int depth, const char *subject, const char *altsubject[], int num_altsubject, const char *cert_hash, const struct wpabuf *cert)
 Notification of a peer certificate. More...
 
int cert_in_cb
 Include server certificates in callback.
 
void(* status_cb )(void *ctx, const char *status, const char *parameter)
 Notification of a change in EAP status. More...
 
void(* set_anon_id )(void *ctx, const u8 *id, size_t len)
 Set or add anonymous identity. More...
 

Detailed Description

Global (for all networks) EAPOL state machine context.

Field Documentation

void(* eapol_ctx::aborted_cached)(void *ctx)

Notify that cached PMK attempt was aborted.

Parameters
ctxCallback context (ctx)
void(* eapol_ctx::cb)(struct eapol_sm *eapol, enum eapol_supp_result result, void *ctx)

Function to be called when EAPOL negotiation has been completed.

Parameters
eapolPointer to EAPOL state machine data
resultWhether the authentication was completed successfully
ctxPointer to context data (cb_ctx)
       This optional callback function will be called when the EAPOL
       authentication has been completed. This allows the owner of the
       EAPOL state machine to process the key and terminate the EAPOL state
       machine. Currently, this is used only in RSN pre-authentication.
void(* eapol_ctx::cert_cb)(void *ctx, int depth, const char *subject, const char *altsubject[], int num_altsubject, const char *cert_hash, const struct wpabuf *cert)

Notification of a peer certificate.

Parameters
ctxCallback context (ctx)
depthDepth in certificate chain (0 = server)
subjectSubject of the peer certificate
altsubjectSelect fields from AltSubject of the peer certificate
num_altsubjectNumber of altsubject values
cert_hashSHA-256 hash of the certificate
certPeer certificate
void(* eapol_ctx::eap_param_needed)(void *ctx, enum wpa_ctrl_req_type field, const char *txt)

Notify that EAP parameter is needed.

Parameters
ctxCallback context (ctx)
fieldField indicator (e.g., WPA_CTRL_REQ_EAP_IDENTITY)
txtUser readable text describing the required parameter
void(* eapol_ctx::eapol_done_cb)(void *ctx)

Function to be called at successful completion.

Parameters
ctxCallback context (ctx)
       This function is called at the successful completion of EAPOL
       authentication. If dynamic WEP keys are used, this is called only
       after all the expected keys have been received.
int(* eapol_ctx::eapol_send)(void *ctx, int type, const u8 *buf, size_t len)

Send EAPOL packets.

Parameters
ctxCallback context (eapol_send_ctx)
typeEAPOL type (IEEE802_1X_TYPE_*)
bufPointer to EAPOL payload
lenLength of the EAPOL payload
Returns
0 on success, -1 on failure
const struct wpa_config_blob*(* eapol_ctx::get_config_blob)(void *ctx, const char *name)

Get a named configuration blob.

Parameters
ctxCallback context (ctx)
nameName of the blob
Returns
Pointer to blob data or NULL if not found
const char* eapol_ctx::opensc_engine_path

Path to the OpenSSL engine for opensc.

This is an OpenSSL specific configuration option for loading OpenSC engine (engine_opensc.so); if NULL, this engine is not loaded.

const char* eapol_ctx::openssl_ciphers

OpenSSL cipher string.

This is an OpenSSL specific configuration option for configuring the default ciphers. If not set, "DEFAULT:!EXP:!LOW" is used as the default.

const char* eapol_ctx::pkcs11_engine_path

Path to the OpenSSL engine for PKCS#11.

This is an OpenSSL specific configuration option for loading PKCS#11 engine (engine_pkcs11.so); if NULL, this engine is not loaded.

const char* eapol_ctx::pkcs11_module_path

Path to the OpenSSL OpenSC/PKCS#11 module.

This is an OpenSSL specific configuration option for configuring path to OpenSC/PKCS#11 engine (opensc-pkcs11.so); if NULL, this module is not loaded.

void(* eapol_ctx::port_cb)(void *ctx, int authorized)

Set port authorized/unauthorized callback (optional)

Parameters
ctxCallback context (ctx)
authorizedWhether the supplicant port is now in authorized state
int eapol_ctx::preauth

IEEE 802.11i/RSN pre-authentication.

This EAPOL state machine is used for IEEE 802.11i/RSN pre-authentication

void* eapol_ctx::scard_ctx

Callback context for PC/SC scard_*() function calls.

This context can be updated with eapol_sm_register_scard_ctx().

void(* eapol_ctx::set_anon_id)(void *ctx, const u8 *id, size_t len)

Set or add anonymous identity.

Parameters
ctxeapol_ctx from eap_peer_sm_init() call
idAnonymous identity (e.g., EAP-SIM pseudonym)
lenLength of anonymous identity in octets
void(* eapol_ctx::set_config_blob)(void *ctx, struct wpa_config_blob *blob)

Set or add a named configuration blob.

Parameters
ctxCallback context (ctx)
blobNew value for the blob
       Adds a new configuration blob or replaces the current value of an
       existing blob.
int(* eapol_ctx::set_wep_key)(void *ctx, int unicast, int keyidx, const u8 *key, size_t keylen)

Configure WEP keys.

Parameters
ctxCallback context (ctx)
unicastNon-zero = unicast, 0 = multicast/broadcast key
keyidxKey index (0..3)
keyWEP key
keylenLength of the WEP key
Returns
0 on success, -1 on failure
void(* eapol_ctx::status_cb)(void *ctx, const char *status, const char *parameter)

Notification of a change in EAP status.

Parameters
ctxCallback context (ctx)
statusStep in the process of EAP authentication
parameterStep-specific parameter, e.g., EAP method name
struct wps_context* eapol_ctx::wps

WPS context data.

This is only used by EAP-WSC and can be left NULL if not available.


The documentation for this struct was generated from the following file: