diff options
author | Matt Caswell <matt@openssl.org> | 2016-11-11 16:22:19 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-11-23 15:31:21 +0000 |
commit | 9970290e1d984bf8cc1dce7093bca915062cfdd7 (patch) | |
tree | a904625ae6a0fa9fdbfc87aa3d02bc1fde32f203 /util/TLSProxy/Record.pm | |
parent | 6484776f177b38dd668618a75bee58674ca42578 (diff) | |
download | openssl-9970290e1d984bf8cc1dce7093bca915062cfdd7.tar.gz |
Fix the tests following the state machine changes for TLSv1.3
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'util/TLSProxy/Record.pm')
-rw-r--r-- | util/TLSProxy/Record.pm | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/util/TLSProxy/Record.pm b/util/TLSProxy/Record.pm index bf6de439ad..6d35f08bed 100644 --- a/util/TLSProxy/Record.pm +++ b/util/TLSProxy/Record.pm @@ -11,8 +11,8 @@ use TLSProxy::Proxy; package TLSProxy::Record; -my $server_ccs_seen = 0; -my $client_ccs_seen = 0; +my $server_encrypting = 0; +my $client_encrypting = 0; my $etm = 0; use constant TLS_RECORD_HEADER_LENGTH => 5; @@ -36,6 +36,7 @@ my %record_type = ( use constant { VERS_TLS_1_4 => 773, + VERS_TLS_1_3_DRAFT => 32530, VERS_TLS_1_3 => 772, VERS_TLS_1_2 => 771, VERS_TLS_1_1 => 770, @@ -108,8 +109,8 @@ sub get_records substr($packet, TLS_RECORD_HEADER_LENGTH, $len_real) ); - if (($server && $server_ccs_seen) - || (!$server && $client_ccs_seen)) { + if (($server && $server_encrypting) + || (!$server && $client_encrypting)) { if ($version != VERS_TLS_1_3() && $etm) { $record->decryptETM(); } else { @@ -133,26 +134,26 @@ sub get_records sub clear { - $server_ccs_seen = 0; - $client_ccs_seen = 0; + $server_encrypting = 0; + $client_encrypting = 0; } #Class level accessors -sub server_ccs_seen +sub server_encrypting { my $class = shift; if (@_) { - $server_ccs_seen = shift; + $server_encrypting = shift; } - return $server_ccs_seen; + return $server_encrypting; } -sub client_ccs_seen +sub client_encrypting { my $class = shift; if (@_) { - $client_ccs_seen = shift; + $client_encrypting= shift; } - return $client_ccs_seen; + return $client_encrypting; } #Enable/Disable Encrypt-then-MAC sub etm |