From 3ba03819d43b89c770e508be2d8c57c3919d482a Mon Sep 17 00:00:00 2001 From: occheung Date: Fri, 27 Nov 2020 09:43:51 +0800 Subject: [PATCH] server hello: fix handshake length --- src/tls.rs | 2 +- src/tls_packet.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tls.rs b/src/tls.rs index 6793153..555a55d 100644 --- a/src/tls.rs +++ b/src/tls.rs @@ -464,7 +464,7 @@ impl<'s> TlsSocket<'s> { let slice: &[u8] = buffer.into(); // Update session - todo!(); + // todo!(); // Send the data (slice.len(), ()) diff --git a/src/tls_packet.rs b/src/tls_packet.rs index a5caa97..c880bde 100644 --- a/src/tls_packet.rs +++ b/src/tls_packet.rs @@ -105,6 +105,7 @@ impl<'a> TlsRepr<'a> { ) } ); + repr.length = repr.handshake_data.get_length().try_into().unwrap(); repr }; self.length = handshake_repr.get_length();