summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-11-22 13:43:50 +0000
committerMatt Caswell <matt@openssl.org>2016-12-08 17:19:22 +0000
commitefab1586e041f4d4dde86cd786630e0d6af285a2 (patch)
tree568d2326b145a08cdecae5caa355a11d3f2e8a3f /util
parent9ce3ed2a586032690bef6a1c4e58df8d1c18f344 (diff)
Support renegotiation in TLSProxy
Perl changes reviewed by Richard Levitte. Non-perl changes reviewed by Rich Salz Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'util')
-rw-r--r--util/TLSProxy/Proxy.pm21
1 files changed, 20 insertions, 1 deletions
diff --git a/util/TLSProxy/Proxy.pm b/util/TLSProxy/Proxy.pm
index 95599e50eb..37abfb03e9 100644
--- a/util/TLSProxy/Proxy.pm
+++ b/util/TLSProxy/Proxy.pm
@@ -45,6 +45,7 @@ sub new
clientflags => "",
serverconnects => 1,
serverpid => 0,
+ reneg => 0,
#Public read
execute => $execute,
@@ -121,6 +122,7 @@ sub clear
$self->{serverflags} = "";
$self->{serverconnects} = 1;
$self->{serverpid} = 0;
+ $self->{reneg} = 0;
}
sub restart
@@ -205,7 +207,13 @@ sub clientstart
or die "Failed to redirect stdout: $!";
open(STDERR, ">&STDOUT");
}
- my $execcmd = "echo test | ".$self->execute
+ my $echostr;
+ if ($self->reneg()) {
+ $echostr = "R";
+ } else {
+ $echostr = "test";
+ }
+ my $execcmd = "echo ".$echostr." | ".$self->execute
." s_client -engine ossltest -connect "
.($self->proxy_addr).":".($self->proxy_port);
if ($self->cipherc ne "") {
@@ -508,6 +516,7 @@ sub fill_known_data
}
return $ret;
}
+
sub is_tls13
{
my $class = shift;
@@ -516,4 +525,14 @@ sub is_tls13
}
return $is_tls13;
}
+
+sub reneg
+{
+ my $self = shift;
+ if (@_) {
+ $self->{reneg} = shift;
+ }
+ return $self->{reneg};
+}
+
1;