implemented server-initiated phase2 of EAP-TTLS authentication

This commit is contained in:
Andreas Steffen
2010-08-16 18:30:41 +02:00
parent f2b9b9725c
commit 9ba53310ee
2 changed files with 53 additions and 16 deletions
+23 -15
View File
@@ -133,22 +133,30 @@ METHOD(tls_application_t, process, status_t,
return FAILED;
}
if (this->method->process(this->method, in, &this->out) == NEED_MORE)
{
in->destroy(in);
return NEED_MORE;
}
if (vendor)
{
DBG1(DBG_IKE, "vendor specific EAP method %d-%d failed", type, vendor);
}
else
{
DBG1(DBG_IKE, "%N method failed", eap_type_names, type);
}
status = this->method->process(this->method, in, &this->out);
in->destroy(in);
return FAILED;
switch (status)
{
case SUCCESS:
this->method->destroy(this->method);
this->method = NULL;
/* fall through to NEED_MORE since response must be sent */
case NEED_MORE:
return NEED_MORE;
case FAILED:
default:
if (vendor)
{
DBG1(DBG_IKE, "vendor specific EAP method %d-%d failed",
type, vendor);
}
else
{
DBG1(DBG_IKE, "%N method failed", eap_type_names, type);
}
return FAILED;
}
}
METHOD(tls_application_t, build, status_t,