aboutsummaryrefslogtreecommitdiffstats
path: root/src/libtls/tls_fragmentation.c
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2010-08-13 00:31:45 +0200
committerAndreas Steffen <andreas.steffen@strongswan.org>2010-08-13 00:31:45 +0200
commit3a15a02a58131165663ea9c4b83f7905cbe2ccf5 (patch)
tree02594c64221f350fe853675b2f2df81f962f5820 /src/libtls/tls_fragmentation.c
parentb62e9a30ce6214aee03a713a9b4d602ad1281c82 (diff)
downloadstrongswan-3a15a02a58131165663ea9c4b83f7905cbe2ccf5.tar.bz2
strongswan-3a15a02a58131165663ea9c4b83f7905cbe2ccf5.tar.xz
set TLS record type before state change to STATE_FINISHED_SENT
Diffstat (limited to 'src/libtls/tls_fragmentation.c')
-rw-r--r--src/libtls/tls_fragmentation.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libtls/tls_fragmentation.c b/src/libtls/tls_fragmentation.c
index 835a3c9f5..564864937 100644
--- a/src/libtls/tls_fragmentation.c
+++ b/src/libtls/tls_fragmentation.c
@@ -226,6 +226,7 @@ METHOD(tls_fragmentation_t, build, status_t,
status = this->application->build(this->application, msg);
if (status == INVALID_STATE)
{
+ *type = TLS_APPLICATION_DATA;
this->output = chunk_clone(msg->get_buf(msg));
if (this->output.len)
{
@@ -250,6 +251,7 @@ METHOD(tls_fragmentation_t, build, status_t,
msg->write_data24(msg, writer->get_buf(writer));
break;
case INVALID_STATE:
+ *type = TLS_HANDSHAKE;
this->output = chunk_clone(msg->get_buf(msg));
break;
default:
@@ -269,8 +271,6 @@ METHOD(tls_fragmentation_t, build, status_t,
if (this->output.len)
{
- *type = this->handshake->finished(this->handshake) ?
- TLS_APPLICATION_DATA : TLS_HANDSHAKE;
if (this->output.len <= MAX_TLS_FRAGMENT_LEN)
{
*data = this->output;