Send TLS close notify if application returns SUCCESS
This commit is contained in:
@@ -223,7 +223,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;
|
||||||
return SUCCESS;
|
/* FALL */
|
||||||
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);
|
||||||
@@ -368,7 +368,7 @@ static status_t build_application(private_tls_fragmentation_t *this)
|
|||||||
break;
|
break;
|
||||||
case SUCCESS:
|
case SUCCESS:
|
||||||
this->application_finished = TRUE;
|
this->application_finished = TRUE;
|
||||||
break;
|
/* FALL */
|
||||||
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);
|
||||||
@@ -391,6 +391,10 @@ METHOD(tls_fragmentation_t, build, status_t,
|
|||||||
this->state = ALERT_SENT;
|
this->state = ALERT_SENT;
|
||||||
return INVALID_STATE;
|
return INVALID_STATE;
|
||||||
case ALERT_SENT:
|
case ALERT_SENT:
|
||||||
|
if (this->application_finished)
|
||||||
|
{
|
||||||
|
return SUCCESS;
|
||||||
|
}
|
||||||
return FAILED;
|
return FAILED;
|
||||||
case ALERT_NONE:
|
case ALERT_NONE:
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user