summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2012-02-18 12:57:42 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2012-02-18 12:57:42 +0100
commite6c6e1ffc206713b211b917ef6bd28a9aedd4733 (patch)
treeebd006a63db8683fb92bab425fd9b11a4777d471
parentdcfa2518a99309dd7003948167bdae512cfaf162 (diff)
downloadgnutls-e6c6e1ffc206713b211b917ef6bd28a9aedd4733.tar.gz
Set the handshake type when calling record_add_to_buffers().
-rw-r--r--lib/gnutls_record.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/gnutls_record.c b/lib/gnutls_record.c
index 5489e41b0b..a9a50c7022 100644
--- a/lib/gnutls_record.c
+++ b/lib/gnutls_record.c
@@ -1078,11 +1078,14 @@ begin:
if (record.v2)
decrypted->htype = GNUTLS_HANDSHAKE_CLIENT_HELLO_V2;
else
- decrypted->htype = -1;
+ {
+ uint8_t * p = _mbuffer_get_udata_ptr(decrypted);
+ decrypted->htype = p[0];
+ }
ret =
record_add_to_buffers (session, &record, type, htype,
- packet_sequence, decrypted);
+ packet_sequence, decrypted);
/* bufel is now either deinitialized or buffered somewhere else */