EAP-IKEv2 server: Use configured server identity

Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2013-07-06 18:37:35 +03:00
parent 8f89d828b1
commit 162865bc97

View File

@ -103,8 +103,11 @@ static void * eap_ikev2_init(struct eap_sm *sm)
data->ikev2.proposal.encr = ENCR_AES_CBC;
data->ikev2.proposal.dh = DH_GROUP2_1024BIT_MODP;
data->ikev2.IDi = (u8 *) os_strdup("hostapd");
data->ikev2.IDi_len = 7;
data->ikev2.IDi = os_malloc(sm->server_id_len);
if (data->ikev2.IDi == NULL)
goto failed;
os_memcpy(data->ikev2.IDi, sm->server_id, sm->server_id_len);
data->ikev2.IDi_len = sm->server_id_len;
data->ikev2.get_shared_secret = eap_ikev2_get_shared_secret;
data->ikev2.cb_ctx = sm;