From 3a15a02a58131165663ea9c4b83f7905cbe2ccf5 Mon Sep 17 00:00:00 2001 From: Andreas Steffen Date: Fri, 13 Aug 2010 00:31:45 +0200 Subject: set TLS record type before state change to STATE_FINISHED_SENT --- src/libtls/tls_fragmentation.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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; -- cgit v1.2.3