TNC: Provide 'tnc' configuration option for EAP server and methods

This commit is contained in:
Jouni Malinen 2008-03-09 10:42:53 +02:00
parent da08a7c732
commit c3e258ae9f
9 changed files with 12 additions and 0 deletions

View File

@ -806,6 +806,7 @@ eapol_auth_alloc(struct eapol_authenticator *eapol, const u8 *addr,
eap_conf.pac_opaque_encr_key = eapol->conf.pac_opaque_encr_key;
eap_conf.eap_fast_a_id = eapol->conf.eap_fast_a_id;
eap_conf.eap_sim_aka_result_ind = eapol->conf.eap_sim_aka_result_ind;
eap_conf.tnc = eapol->conf.tnc;
sm->eap = eap_server_sm_init(sm, &eapol_cb, &eap_conf);
if (sm->eap == NULL) {
eapol_auth_free(sm);
@ -1237,6 +1238,7 @@ static int eapol_auth_conf_clone(struct eapol_auth_config *dst,
else
dst->eap_fast_a_id = NULL;
dst->eap_sim_aka_result_ind = src->eap_sim_aka_result_ind;
dst->tnc = src->tnc;
return 0;
}

View File

@ -50,6 +50,7 @@ struct eapol_auth_config {
u8 *pac_opaque_encr_key;
char *eap_fast_a_id;
int eap_sim_aka_result_ind;
int tnc;
/*
* Pointer to hostapd data. This is a temporary workaround for

View File

@ -1140,6 +1140,7 @@ static int hostapd_setup_radius_srv(struct hostapd_data *hapd,
srv.pac_opaque_encr_key = conf->pac_opaque_encr_key;
srv.eap_fast_a_id = conf->eap_fast_a_id;
srv.eap_sim_aka_result_ind = conf->eap_sim_aka_result_ind;
srv.tnc = conf->tnc;
srv.ipv6 = conf->radius_server_ipv6;
srv.get_eap_user = hostapd_radius_get_eap_user;

View File

@ -1608,6 +1608,7 @@ int ieee802_1x_init(struct hostapd_data *hapd)
conf.pac_opaque_encr_key = hapd->conf->pac_opaque_encr_key;
conf.eap_fast_a_id = hapd->conf->eap_fast_a_id;
conf.eap_sim_aka_result_ind = hapd->conf->eap_sim_aka_result_ind;
conf.tnc = hapd->conf->tnc;
os_memset(&cb, 0, sizeof(cb));
cb.eapol_send = ieee802_1x_eapol_send;

View File

@ -1154,6 +1154,7 @@ struct eap_sm * eap_server_sm_init(void *eapol_ctx,
if (conf->eap_fast_a_id)
sm->eap_fast_a_id = os_strdup(conf->eap_fast_a_id);
sm->eap_sim_aka_result_ind = conf->eap_sim_aka_result_ind;
sm->tnc = conf->tnc;
wpa_printf(MSG_DEBUG, "EAP: Server state machine created");

View File

@ -97,6 +97,7 @@ struct eap_config {
u8 *pac_opaque_encr_key;
char *eap_fast_a_id;
int eap_sim_aka_result_ind;
int tnc;
};

View File

@ -174,6 +174,7 @@ struct eap_sm {
u8 *pac_opaque_encr_key;
char *eap_fast_a_id;
int eap_sim_aka_result_ind;
int tnc;
};
int eap_user_get(struct eap_sm *sm, const u8 *identity, size_t identity_len,

View File

@ -87,6 +87,7 @@ struct radius_server_data {
u8 *pac_opaque_encr_key;
char *eap_fast_a_id;
int eap_sim_aka_result_ind;
int tnc;
int ipv6;
struct os_time start_time;
struct radius_server_counters counters;
@ -311,6 +312,7 @@ radius_server_get_new_session(struct radius_server_data *data,
eap_conf.pac_opaque_encr_key = data->pac_opaque_encr_key;
eap_conf.eap_fast_a_id = data->eap_fast_a_id;
eap_conf.eap_sim_aka_result_ind = data->eap_sim_aka_result_ind;
eap_conf.tnc = data->tnc;
sess->eap = eap_server_sm_init(sess, &radius_server_eapol_cb,
&eap_conf);
if (sess->eap == NULL) {
@ -1016,6 +1018,7 @@ radius_server_init(struct radius_server_conf *conf)
data->eap_fast_a_id = os_strdup(conf->eap_fast_a_id);
data->get_eap_user = conf->get_eap_user;
data->eap_sim_aka_result_ind = conf->eap_sim_aka_result_ind;
data->tnc = conf->tnc;
data->clients = radius_server_read_clients(conf->client_file,
conf->ipv6);

View File

@ -27,6 +27,7 @@ struct radius_server_conf {
u8 *pac_opaque_encr_key;
char *eap_fast_a_id;
int eap_sim_aka_result_ind;
int tnc;
int ipv6;
int (*get_eap_user)(void *ctx, const u8 *identity, size_t identity_len,
int phase2, struct eap_user *user);