aboutsummaryrefslogtreecommitdiffstats
path: root/src/radius
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2008-10-19 09:55:59 +0300
committerJouni Malinen <j@w1.fi>2008-10-19 09:55:59 +0300
commit2d86724409021bb98fa37e08e9cc37014faf9e29 (patch)
tree5602de55b4216e85706777a3a6b1ce6264a7a847 /src/radius
parent2100a768bfe2d3186dd7ff2bd62fde61c944d674 (diff)
downloadexternal_wpa_supplicant_8_ti-2d86724409021bb98fa37e08e9cc37014faf9e29.zip
external_wpa_supplicant_8_ti-2d86724409021bb98fa37e08e9cc37014faf9e29.tar.gz
external_wpa_supplicant_8_ti-2d86724409021bb98fa37e08e9cc37014faf9e29.tar.bz2
EAP-FAST: Allow A-ID and A-ID-Info to be configured separately
Changed EAP-FAST configuration to use separate fields for A-ID and A-ID-Info (eap_fast_a_id_info) to allow A-ID to be set to a fixed 16-octet len binary value for better interoperability with some peer implementations; eap_fast_a_id is now configured as a hex string.
Diffstat (limited to 'src/radius')
-rw-r--r--src/radius/radius_server.c19
-rw-r--r--src/radius/radius_server.h4
2 files changed, 19 insertions, 4 deletions
diff --git a/src/radius/radius_server.c b/src/radius/radius_server.c
index e0c4b21..19be48a 100644
--- a/src/radius/radius_server.c
+++ b/src/radius/radius_server.c
@@ -85,7 +85,9 @@ struct radius_server_data {
void *eap_sim_db_priv;
void *ssl_ctx;
u8 *pac_opaque_encr_key;
- char *eap_fast_a_id;
+ u8 *eap_fast_a_id;
+ size_t eap_fast_a_id_len;
+ char *eap_fast_a_id_info;
int eap_fast_prov;
int pac_key_lifetime;
int pac_key_refresh_time;
@@ -314,6 +316,8 @@ radius_server_get_new_session(struct radius_server_data *data,
eap_conf.eap_server = 1;
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_fast_a_id_len = data->eap_fast_a_id_len;
+ eap_conf.eap_fast_a_id_info = data->eap_fast_a_id_info;
eap_conf.eap_fast_prov = data->eap_fast_prov;
eap_conf.pac_key_lifetime = data->pac_key_lifetime;
eap_conf.pac_key_refresh_time = data->pac_key_refresh_time;
@@ -1020,8 +1024,16 @@ radius_server_init(struct radius_server_conf *conf)
os_memcpy(data->pac_opaque_encr_key, conf->pac_opaque_encr_key,
16);
}
- if (conf->eap_fast_a_id)
- data->eap_fast_a_id = os_strdup(conf->eap_fast_a_id);
+ if (conf->eap_fast_a_id) {
+ data->eap_fast_a_id = os_malloc(conf->eap_fast_a_id_len);
+ if (data->eap_fast_a_id) {
+ os_memcpy(data->eap_fast_a_id, conf->eap_fast_a_id,
+ conf->eap_fast_a_id_len);
+ data->eap_fast_a_id_len = conf->eap_fast_a_id_len;
+ }
+ }
+ if (conf->eap_fast_a_id_info)
+ data->eap_fast_a_id_info = os_strdup(conf->eap_fast_a_id_info);
data->eap_fast_prov = conf->eap_fast_prov;
data->pac_key_lifetime = conf->pac_key_lifetime;
data->pac_key_refresh_time = conf->pac_key_refresh_time;
@@ -1074,6 +1086,7 @@ void radius_server_deinit(struct radius_server_data *data)
os_free(data->pac_opaque_encr_key);
os_free(data->eap_fast_a_id);
+ os_free(data->eap_fast_a_id_info);
os_free(data);
}
diff --git a/src/radius/radius_server.h b/src/radius/radius_server.h
index 8e5145f..37c6527 100644
--- a/src/radius/radius_server.h
+++ b/src/radius/radius_server.h
@@ -25,7 +25,9 @@ struct radius_server_conf {
void *eap_sim_db_priv;
void *ssl_ctx;
u8 *pac_opaque_encr_key;
- char *eap_fast_a_id;
+ u8 *eap_fast_a_id;
+ size_t eap_fast_a_id_len;
+ char *eap_fast_a_id_info;
int eap_fast_prov;
int pac_key_lifetime;
int pac_key_refresh_time;