summaryrefslogtreecommitdiffstats
path: root/util/TLSProxy/Message.pm
diff options
context:
space:
mode:
Diffstat (limited to 'util/TLSProxy/Message.pm')
-rw-r--r--util/TLSProxy/Message.pm17
1 files changed, 16 insertions, 1 deletions
diff --git a/util/TLSProxy/Message.pm b/util/TLSProxy/Message.pm
index 99c3689ca2..ab90586952 100644
--- a/util/TLSProxy/Message.pm
+++ b/util/TLSProxy/Message.pm
@@ -74,6 +74,7 @@ use constant {
EXT_EXTENDED_MASTER_SECRET => 23,
EXT_SESSION_TICKET => 35,
EXT_KEY_SHARE => 40,
+ EXT_PSK => 41,
EXT_SUPPORTED_VERSIONS => 43,
EXT_PSK_KEX_MODES => 45,
EXT_RENEGOTIATE => 65281,
@@ -99,6 +100,7 @@ my $end = 0;
my @message_rec_list = ();
my @message_frag_lens = ();
my $ciphersuite = 0;
+my $successondata = 0;
sub clear
{
@@ -108,6 +110,7 @@ sub clear
$server = 0;
$success = 0;
$end = 0;
+ $successondata = 0;
@message_rec_list = ();
@message_frag_lens = ();
}
@@ -219,6 +222,11 @@ sub get_messages
} elsif ($record->content_type == TLSProxy::Record::RT_APPLICATION_DATA) {
print " [ENCRYPTED APPLICATION DATA]\n";
print " [".$record->decrypt_data."]\n";
+
+ if ($successondata) {
+ $success = 1;
+ $end = 1;
+ }
} elsif ($record->content_type == TLSProxy::Record::RT_ALERT) {
my ($alertlev, $alertdesc) = unpack('CC', $record->decrypt_data);
#A CloseNotify from the client indicates we have finished successfully
@@ -507,5 +515,12 @@ sub encoded_length
my $self = shift;
return TLS_MESSAGE_HEADER_LENGTH + length($self->data);
}
-
+sub successondata
+{
+ my $class = shift;
+ if (@_) {
+ $successondata = shift;
+ }
+ return $successondata;
+}
1;