diff options
author | Matt Caswell <matt@openssl.org> | 2016-11-21 16:22:00 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-12-05 17:05:40 +0000 |
commit | b4c6e37e7428eec3d46b6737b60df8e423d0a8df (patch) | |
tree | 25b34b99586d8817ff9dfe2b18e4eb5c2ef6ff00 /util/TLSProxy | |
parent | e60ce9c4513c432705c84b0efebf1421ee769eee (diff) |
Add more TLS1.3 record tests
Add some tests for the new record construction
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'util/TLSProxy')
-rw-r--r-- | util/TLSProxy/Record.pm | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/util/TLSProxy/Record.pm b/util/TLSProxy/Record.pm index fe78185ccc..202c1ec9a6 100644 --- a/util/TLSProxy/Record.pm +++ b/util/TLSProxy/Record.pm @@ -195,7 +195,8 @@ sub new data => $data, decrypt_data => $decrypt_data, orig_decrypt_data => $decrypt_data, - encrypted => 0 + encrypted => 0, + outer_content_type => RT_APPLICATION_DATA }; return bless $self, $class; @@ -289,7 +290,7 @@ sub reconstruct_record $data = pack('n', $self->len | 0x8000); } else { if (TLSProxy::Proxy->is_tls13() && $self->encrypted) { - $data = pack('Cnn', RT_APPLICATION_DATA, $self->version, + $data = pack('Cnn', $self->outer_content_type, $self->version, $self->len + 1); $tls13_enc = 1; } else { @@ -386,4 +387,12 @@ sub encrypted } return $self->{encrypted}; } +sub outer_content_type +{ + my $self = shift; + if (@_) { + $self->{outer_content_type} = shift; + } + return $self->{outer_content_type}; +} 1; |