Skip the close notify if application layer completes successfully

This commit is contained in:
Martin Willi 2010-08-24 10:29:54 +02:00
parent 421a529f88
commit a2c1235969
2 changed files with 11 additions and 4 deletions

View File

@ -138,8 +138,15 @@ METHOD(tls_alert_t, get, bool,
this->consumed = TRUE;
*level = TLS_FATAL;
*desc = this->desc;
DBG1(DBG_TLS, "sending fatal TLS alert '%N'",
tls_alert_desc_names, this->desc);
if (this->desc == TLS_CLOSE_NOTIFY)
{
DBG1(DBG_TLS, "sending TLS close notify");
}
else
{
DBG1(DBG_TLS, "sending fatal TLS alert '%N'",
tls_alert_desc_names, this->desc);
}
return TRUE;
}
else

View File

@ -211,7 +211,7 @@ static status_t process_application(private_tls_fragmentation_t *this,
continue;
case SUCCESS:
this->application_finished = TRUE;
/* FALL */
return SUCCESS;
case FAILED:
default:
this->alert->add(this->alert, TLS_FATAL, TLS_CLOSE_NOTIFY);
@ -340,7 +340,7 @@ METHOD(tls_fragmentation_t, build, status_t,
break;
case SUCCESS:
this->application_finished = TRUE;
/* FALL */
return SUCCESS;
case FAILED:
default:
this->alert->add(this->alert, TLS_FATAL,