From 8e47ee18c8f7e59575effdd8dfcfbfff1a365ede Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Mon, 7 Nov 2016 14:26:41 +0000 Subject: Add a test for the wrong version number in a record Prior to TLS1.3 we check that the received record version number is correct. In TLS1.3 we need to ignore the record version number. This adds a test to make sure we do it correctly. Reviewed-by: Rich Salz --- util/TLSProxy/Record.pm | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'util/TLSProxy') diff --git a/util/TLSProxy/Record.pm b/util/TLSProxy/Record.pm index 106fa7414a..a4e7adcf82 100644 --- a/util/TLSProxy/Record.pm +++ b/util/TLSProxy/Record.pm @@ -278,11 +278,6 @@ sub content_type my $self = shift; return $self->{content_type}; } -sub version -{ - my $self = shift; - return $self->{version}; -} sub sslv2 { my $self = shift; @@ -332,4 +327,12 @@ sub len } return $self->{len}; } +sub version +{ + my $self = shift; + if (@_) { + $self->{version} = shift; + } + return $self->{version}; +} 1; -- cgit v1.2.3