diff options
author | Martin Willi <martin@revosec.ch> | 2010-08-24 10:29:54 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2010-08-24 10:30:24 +0200 |
commit | a2c12359691943ede12f7f515cbe97af1b193e7b (patch) | |
tree | f29a91e8b7d98e2017f62c81456ece66e9318de4 /src | |
parent | 421a529f8838606d955529f0de39d495906a3f72 (diff) | |
download | strongswan-a2c12359691943ede12f7f515cbe97af1b193e7b.tar.bz2 strongswan-a2c12359691943ede12f7f515cbe97af1b193e7b.tar.xz |
Skip the close notify if application layer completes successfully
Diffstat (limited to 'src')
-rw-r--r-- | src/libtls/tls_alert.c | 11 | ||||
-rw-r--r-- | src/libtls/tls_fragmentation.c | 4 |
2 files changed, 11 insertions, 4 deletions
diff --git a/src/libtls/tls_alert.c b/src/libtls/tls_alert.c index 34f159e77..8a4fa7d77 100644 --- a/src/libtls/tls_alert.c +++ b/src/libtls/tls_alert.c @@ -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 diff --git a/src/libtls/tls_fragmentation.c b/src/libtls/tls_fragmentation.c index b941c97a5..ea5c89769 100644 --- a/src/libtls/tls_fragmentation.c +++ b/src/libtls/tls_fragmentation.c @@ -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, |