diff options
author | Andy Polyakov <appro@openssl.org> | 2018-04-16 14:10:39 +0200 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2018-04-18 19:56:12 +0200 |
commit | 3f473b936a292262a020353e99f896cabfedc947 (patch) | |
tree | 07895e1bd645efebf4468ef5da48e5cd1a7fc691 /util | |
parent | poly1305/asm/poly1305-armv4.pl: remove unintentional relocation. (diff) | |
download | openssl-3f473b936a292262a020353e99f896cabfedc947.tar.xz openssl-3f473b936a292262a020353e99f896cabfedc947.zip |
TLSProxy/Message.pm: refine end-of-conversation detection logic.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5975)
Diffstat (limited to 'util')
-rw-r--r-- | util/perl/TLSProxy/Message.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/util/perl/TLSProxy/Message.pm b/util/perl/TLSProxy/Message.pm index 68179d914d..4a60ba0157 100644 --- a/util/perl/TLSProxy/Message.pm +++ b/util/perl/TLSProxy/Message.pm @@ -267,14 +267,17 @@ sub get_messages } } elsif ($record->content_type == TLSProxy::Record::RT_ALERT) { my ($alertlev, $alertdesc) = unpack('CC', $record->decrypt_data); + print " [$alertlev, $alertdesc]\n"; #A CloseNotify from the client indicates we have finished successfully #(we assume) if (!$end && !$server && $alertlev == AL_LEVEL_WARN && $alertdesc == AL_DESC_CLOSE_NOTIFY) { $success = 1; } - #All alerts end the test - $end = 1; + #Fatal or close notify alerts end the test + if ($alertlev == AL_LEVEL_FATAL || $alertdesc == AL_DESC_CLOSE_NOTIFY) { + $end = 1; + } } return @messages; |