wpa_supplicant / hostapd 2.0
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.
void(* cb )(struct eapol_sm *eapol, int success, void *ctx)
 Function to be called when EAPOL negotiation has been completed.
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.
void * eapol_send_ctx
 Callback context for eapol_send() calls.
void(* eapol_done_cb )(void *ctx)
 Function to be called at successful completion.
int(* eapol_send )(void *ctx, int type, const u8 *buf, size_t len)
 Send EAPOL packets.
int(* set_wep_key )(void *ctx, int unicast, int keyidx, const u8 *key, size_t keylen)
 Configure WEP keys.
void(* set_config_blob )(void *ctx, struct wpa_config_blob *blob)
 Set or add a named configuration blob.
struct wpa_config_blob *(* get_config_blob )(void *ctx, const char *name)
 Get a named configuration blob.
void(* aborted_cached )(void *ctx)
 Notify that cached PMK attempt was aborted.
const char * opensc_engine_path
 Path to the OpenSSL engine for opensc.
const char * pkcs11_engine_path
 Path to the OpenSSL engine for PKCS#11.
const char * pkcs11_module_path
 Path to the OpenSSL OpenSC/PKCS#11 module.
struct wps_contextwps
 WPS context data.
void(* eap_param_needed )(void *ctx, enum wpa_ctrl_req_type field, const char *txt)
 Notify that EAP parameter is needed.
void(* port_cb )(void *ctx, int authorized)
 Set port authorized/unauthorized callback (optional)
void(* cert_cb )(void *ctx, int depth, const char *subject, const char *cert_hash, const struct wpabuf *cert)
 Notification of a peer certificate.
int cert_in_cb
 Include server certificates in callback.

Detailed Description

Global (for all networks) EAPOL state machine context.


Field Documentation

Notify that cached PMK attempt was aborted.

Parameters:
ctxCallback context (ctx)
void(* eapol_ctx::cb)(struct eapol_sm *eapol, int success, void *ctx)

Function to be called when EAPOL negotiation has been completed.

Parameters:
eapolPointer to EAPOL state machine data
successWhether 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 *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
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
struct wpa_config_blob*(* eapol_ctx::get_config_blob)(void *ctx, const char *name) [read]

Get a named configuration blob.

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

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.

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.

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

IEEE 802.11i/RSN pre-authentication.

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

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

This context can be updated with eapol_sm_register_scard_ctx().

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

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:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines