aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_server/eap_server_ikev2.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2013-07-06 15:37:35 (GMT)
committerJouni Malinen <j@w1.fi>2013-07-07 17:30:10 (GMT)
commit162865bc9703aa85c3162479a7798a6c92dce37b (patch)
treea1e37ede4b715f83150b7baa3d8e29b75a9ba8f6 /src/eap_server/eap_server_ikev2.c
parent8f89d828b14b8c25afc087649a38c2817fac1f6c (diff)
downloadhostap-162865bc9703aa85c3162479a7798a6c92dce37b.zip
hostap-162865bc9703aa85c3162479a7798a6c92dce37b.tar.gz
hostap-162865bc9703aa85c3162479a7798a6c92dce37b.tar.bz2
EAP-IKEv2 server: Use configured server identity
Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/eap_server/eap_server_ikev2.c')
-rw-r--r--src/eap_server/eap_server_ikev2.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/eap_server/eap_server_ikev2.c b/src/eap_server/eap_server_ikev2.c
index 42aaca2..1ada0c8 100644
--- a/src/eap_server/eap_server_ikev2.c
+++ b/src/eap_server/eap_server_ikev2.c
@@ -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;