wpa_supplicant / hostapd
2.5
|
EAP peer method: EAP-FAST PAC file processing. More...
#include "includes.h"
#include "common.h"
#include "eap_config.h"
#include "eap_i.h"
#include "eap_fast_pac.h"
Data Structures | |
struct | eap_fast_read_ctx |
Macros | |
#define | EAP_FAST_PAC_BINARY_MAGIC 0x6ae4920c |
#define | EAP_FAST_PAC_BINARY_FORMAT_VERSION 0 |
Functions | |
void | eap_fast_free_pac (struct eap_fast_pac *pac) |
Free PAC data. More... | |
struct eap_fast_pac * | eap_fast_get_pac (struct eap_fast_pac *pac_root, const u8 *a_id, size_t a_id_len, u16 pac_type) |
Get a PAC entry based on A-ID. More... | |
int | eap_fast_add_pac (struct eap_fast_pac **pac_root, struct eap_fast_pac **pac_current, struct eap_fast_pac *entry) |
Add a copy of a PAC entry to a list. More... | |
int | eap_fast_load_pac (struct eap_sm *sm, struct eap_fast_pac **pac_root, const char *pac_file) |
Load PAC entries (text format) More... | |
int | eap_fast_save_pac (struct eap_sm *sm, struct eap_fast_pac *pac_root, const char *pac_file) |
Save PAC entries (text format) More... | |
size_t | eap_fast_pac_list_truncate (struct eap_fast_pac *pac_root, size_t max_len) |
Truncate a PAC list to the given length. More... | |
int | eap_fast_load_pac_bin (struct eap_sm *sm, struct eap_fast_pac **pac_root, const char *pac_file) |
Load PAC entries (binary format) More... | |
int | eap_fast_save_pac_bin (struct eap_sm *sm, struct eap_fast_pac *pac_root, const char *pac_file) |
Save PAC entries (binary format) More... | |
EAP peer method: EAP-FAST PAC file processing.
int eap_fast_add_pac | ( | struct eap_fast_pac ** | pac_root, |
struct eap_fast_pac ** | pac_current, | ||
struct eap_fast_pac * | entry | ||
) |
Add a copy of a PAC entry to a list.
pac_root | Pointer to PAC list root pointer |
pac_current | Pointer to the current PAC pointer |
entry | New entry to clone and add to the list |
This function makes a clone of the given PAC entry and adds this copied entry to the list (pac_root). If an old entry for the same A-ID is found, it will be removed from the PAC list and in this case, pac_current entry is set to NULL if it was the removed entry.
void eap_fast_free_pac | ( | struct eap_fast_pac * | pac | ) |
Free PAC data.
pac | Pointer to the PAC entry |
Note that the PAC entry must not be in a list since this function does not remove the list links.
struct eap_fast_pac* eap_fast_get_pac | ( | struct eap_fast_pac * | pac_root, |
const u8 * | a_id, | ||
size_t | a_id_len, | ||
u16 | pac_type | ||
) |
Get a PAC entry based on A-ID.
pac_root | Pointer to root of the PAC list |
a_id | A-ID to search for |
a_id_len | Length of A-ID |
pac_type | PAC-Type to search for |
int eap_fast_load_pac | ( | struct eap_sm * | sm, |
struct eap_fast_pac ** | pac_root, | ||
const char * | pac_file | ||
) |
Load PAC entries (text format)
sm | Pointer to EAP state machine allocated with eap_peer_sm_init() |
pac_root | Pointer to root of the PAC list (to be filled) |
pac_file | Name of the PAC file/blob to load |
int eap_fast_load_pac_bin | ( | struct eap_sm * | sm, |
struct eap_fast_pac ** | pac_root, | ||
const char * | pac_file | ||
) |
Load PAC entries (binary format)
sm | Pointer to EAP state machine allocated with eap_peer_sm_init() |
pac_root | Pointer to root of the PAC list (to be filled) |
pac_file | Name of the PAC file/blob to load |
size_t eap_fast_pac_list_truncate | ( | struct eap_fast_pac * | pac_root, |
size_t | max_len | ||
) |
Truncate a PAC list to the given length.
pac_root | Root of the PAC list |
max_len | Maximum length of the list (>= 1) |
int eap_fast_save_pac | ( | struct eap_sm * | sm, |
struct eap_fast_pac * | pac_root, | ||
const char * | pac_file | ||
) |
Save PAC entries (text format)
sm | Pointer to EAP state machine allocated with eap_peer_sm_init() |
pac_root | Root of the PAC list |
pac_file | Name of the PAC file/blob |
int eap_fast_save_pac_bin | ( | struct eap_sm * | sm, |
struct eap_fast_pac * | pac_root, | ||
const char * | pac_file | ||
) |
Save PAC entries (binary format)
sm | Pointer to EAP state machine allocated with eap_peer_sm_init() |
pac_root | Root of the PAC list |
pac_file | Name of the PAC file/blob |