2016-11-04 02:12:21 -04:00
|
|
|
/*
|
|
|
|
* EAP peer state machine functions (RFC 4137)
|
|
|
|
* Copyright (c) 2004-2012, Jouni Malinen <j@w1.fi>
|
|
|
|
*
|
|
|
|
* This software may be distributed under the terms of the BSD license.
|
|
|
|
* See README for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef EAP_H
|
|
|
|
#define EAP_H
|
|
|
|
|
2018-08-13 04:37:56 -04:00
|
|
|
#include "common/defs.h"
|
|
|
|
#include "eap_peer/eap_defs.h"
|
2016-11-04 02:12:21 -04:00
|
|
|
|
|
|
|
struct eap_sm;
|
|
|
|
|
|
|
|
struct eap_method_type {
|
|
|
|
int vendor;
|
2018-04-19 23:33:04 -04:00
|
|
|
EapType method;
|
2016-11-04 02:12:21 -04:00
|
|
|
};
|
|
|
|
|
2018-04-19 23:33:04 -04:00
|
|
|
u8 *g_wpa_anonymous_identity;
|
|
|
|
int g_wpa_anonymous_identity_len;
|
|
|
|
u8 *g_wpa_username;
|
|
|
|
int g_wpa_username_len;
|
|
|
|
const u8 *g_wpa_client_cert;
|
|
|
|
int g_wpa_client_cert_len;
|
|
|
|
const u8 *g_wpa_private_key;
|
|
|
|
int g_wpa_private_key_len;
|
|
|
|
const u8 *g_wpa_private_key_passwd;
|
|
|
|
int g_wpa_private_key_passwd_len;
|
|
|
|
|
|
|
|
const u8 *g_wpa_ca_cert;
|
|
|
|
int g_wpa_ca_cert_len;
|
|
|
|
|
|
|
|
u8 *g_wpa_password;
|
|
|
|
int g_wpa_password_len;
|
|
|
|
|
|
|
|
u8 *g_wpa_new_password;
|
|
|
|
int g_wpa_new_password_len;
|
|
|
|
|
2020-06-23 04:34:23 -04:00
|
|
|
char *g_wpa_ttls_phase2_type;
|
|
|
|
|
2021-10-09 13:27:32 -04:00
|
|
|
bool g_wpa_suiteb_certification;
|
|
|
|
|
2016-11-04 02:12:21 -04:00
|
|
|
const u8 * eap_get_eapKeyData(struct eap_sm *sm, size_t *len);
|
2018-04-19 23:33:04 -04:00
|
|
|
void eap_deinit_prev_method(struct eap_sm *sm, const char *txt);
|
|
|
|
struct wpabuf * eap_sm_build_nak(struct eap_sm *sm, EapType type, u8 id);
|
2020-06-23 04:34:23 -04:00
|
|
|
struct wpabuf * eap_sm_buildIdentity(struct eap_sm *sm, int id, int encrypted);
|
2018-04-19 23:33:04 -04:00
|
|
|
int eap_peer_blob_init(struct eap_sm *sm);
|
|
|
|
void eap_peer_blob_deinit(struct eap_sm *sm);
|
|
|
|
int eap_peer_config_init(
|
2018-08-13 04:37:56 -04:00
|
|
|
struct eap_sm *sm, const u8 *private_key_passwd,
|
2018-04-19 23:33:04 -04:00
|
|
|
int private_key_passwd_len);
|
|
|
|
void eap_peer_config_deinit(struct eap_sm *sm);
|
|
|
|
void eap_sm_abort(struct eap_sm *sm);
|
|
|
|
int eap_peer_register_methods(void);
|
2020-06-23 04:34:23 -04:00
|
|
|
void eap_sm_request_identity(struct eap_sm *sm);
|
2016-11-04 02:12:21 -04:00
|
|
|
|
|
|
|
#endif /* EAP_H */
|