Skip the close notify if application layer completes successfully
This commit is contained in:
@@ -138,8 +138,15 @@ METHOD(tls_alert_t, get, bool,
|
|||||||
this->consumed = TRUE;
|
this->consumed = TRUE;
|
||||||
*level = TLS_FATAL;
|
*level = TLS_FATAL;
|
||||||
*desc = this->desc;
|
*desc = this->desc;
|
||||||
DBG1(DBG_TLS, "sending fatal TLS alert '%N'",
|
if (this->desc == TLS_CLOSE_NOTIFY)
|
||||||
tls_alert_desc_names, this->desc);
|
{
|
||||||
|
DBG1(DBG_TLS, "sending TLS close notify");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DBG1(DBG_TLS, "sending fatal TLS alert '%N'",
|
||||||
|
tls_alert_desc_names, this->desc);
|
||||||
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -211,7 +211,7 @@ static status_t process_application(private_tls_fragmentation_t *this,
|
|||||||
continue;
|
continue;
|
||||||
case SUCCESS:
|
case SUCCESS:
|
||||||
this->application_finished = TRUE;
|
this->application_finished = TRUE;
|
||||||
/* FALL */
|
return SUCCESS;
|
||||||
case FAILED:
|
case FAILED:
|
||||||
default:
|
default:
|
||||||
this->alert->add(this->alert, TLS_FATAL, TLS_CLOSE_NOTIFY);
|
this->alert->add(this->alert, TLS_FATAL, TLS_CLOSE_NOTIFY);
|
||||||
@@ -340,7 +340,7 @@ METHOD(tls_fragmentation_t, build, status_t,
|
|||||||
break;
|
break;
|
||||||
case SUCCESS:
|
case SUCCESS:
|
||||||
this->application_finished = TRUE;
|
this->application_finished = TRUE;
|
||||||
/* FALL */
|
return SUCCESS;
|
||||||
case FAILED:
|
case FAILED:
|
||||||
default:
|
default:
|
||||||
this->alert->add(this->alert, TLS_FATAL,
|
this->alert->add(this->alert, TLS_FATAL,
|
||||||
|
|||||||
Reference in New Issue
Block a user