moved eap_from_string() fomr libcharon to libstrongswan to make it available in starter

This commit is contained in:
Andreas Steffen
2010-08-13 15:07:53 +02:00
parent e643da585b
commit 87799b0c00
5 changed files with 42 additions and 76 deletions
+2 -33
View File
@@ -671,39 +671,8 @@ static void load_conn(starter_conn_t *conn, kw_list_t *kw, starter_config_t *cfg
}
break;
}
if (streq(kw->value, "aka"))
{
conn->eap_type = 23;
}
else if (streq(kw->value, "sim"))
{
conn->eap_type = 18;
}
else if (streq(kw->value, "md5"))
{
conn->eap_type = 4;
}
else if (streq(kw->value, "gtc"))
{
conn->eap_type = 6;
}
else if (streq(kw->value, "tls"))
{
conn->eap_type = 13;
}
else if (streq(kw->value, "ttls"))
{
conn->eap_type = 21;
}
else if (streq(kw->value, "mschapv2"))
{
conn->eap_type = 26;
}
else if (streq(kw->value, "radius"))
{ /* pseudo-type */
conn->eap_type = 253;
}
else
conn->eap_type = eap_type_from_string(kw->value);
if (conn->eap_type == 0)
{
conn->eap_type = atoi(kw->value);
if (conn->eap_type == 0)