ERP: Add wpa_supplicant ERP_FLUSH ctrl_iface command
This can be used to flush all the ERP keys. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
02a8d45ace
commit
65d9a5e254
6 changed files with 30 additions and 1 deletions
|
@ -459,7 +459,7 @@ static void eap_erp_remove_keys_realm(struct eap_sm *sm, const char *realm)
|
|||
#endif /* CONFIG_ERP */
|
||||
|
||||
|
||||
static void eap_peer_erp_free_keys(struct eap_sm *sm)
|
||||
void eap_peer_erp_free_keys(struct eap_sm *sm)
|
||||
{
|
||||
#ifdef CONFIG_ERP
|
||||
struct eap_erp_key *erp, *tmp;
|
||||
|
|
|
@ -336,6 +336,7 @@ struct ext_password_data;
|
|||
void eap_sm_set_ext_pw_ctx(struct eap_sm *sm, struct ext_password_data *ext);
|
||||
void eap_set_anon_id(struct eap_sm *sm, const u8 *id, size_t len);
|
||||
int eap_peer_was_failure_expected(struct eap_sm *sm);
|
||||
void eap_peer_erp_free_keys(struct eap_sm *sm);
|
||||
|
||||
#endif /* IEEE8021X_EAPOL */
|
||||
|
||||
|
|
|
@ -2121,3 +2121,10 @@ int eapol_sm_get_eap_proxy_imsi(struct eapol_sm *sm, char *imsi, size_t *len)
|
|||
return -1;
|
||||
#endif /* CONFIG_EAP_PROXY */
|
||||
}
|
||||
|
||||
|
||||
void eapol_sm_erp_flush(struct eapol_sm *sm)
|
||||
{
|
||||
if (sm)
|
||||
eap_peer_erp_free_keys(sm->eap);
|
||||
}
|
||||
|
|
|
@ -316,6 +316,7 @@ const char * eapol_sm_get_method_name(struct eapol_sm *sm);
|
|||
void eapol_sm_set_ext_pw_ctx(struct eapol_sm *sm,
|
||||
struct ext_password_data *ext);
|
||||
int eapol_sm_failed(struct eapol_sm *sm);
|
||||
void eapol_sm_erp_flush(struct eapol_sm *sm);
|
||||
int eapol_sm_get_eap_proxy_imsi(struct eapol_sm *sm, char *imsi, size_t *len);
|
||||
#else /* IEEE8021X_EAPOL */
|
||||
static inline struct eapol_sm *eapol_sm_init(struct eapol_ctx *ctx)
|
||||
|
@ -416,6 +417,9 @@ static inline int eapol_sm_failed(struct eapol_sm *sm)
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
static inline void eapol_sm_erp_flush(struct eapol_sm *sm)
|
||||
{
|
||||
}
|
||||
#endif /* IEEE8021X_EAPOL */
|
||||
|
||||
#endif /* EAPOL_SUPP_SM_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue