提交 efab1586 编写于 作者: M Matt Caswell

Support renegotiation in TLSProxy

Perl changes reviewed by Richard Levitte. Non-perl changes reviewed by Rich
Salz
Reviewed-by: NRich Salz <rsalz@openssl.org>
Reviewed-by: NRichard Levitte <levitte@openssl.org>
上级 9ce3ed2a
...@@ -45,6 +45,7 @@ sub new ...@@ -45,6 +45,7 @@ sub new
clientflags => "", clientflags => "",
serverconnects => 1, serverconnects => 1,
serverpid => 0, serverpid => 0,
reneg => 0,
#Public read #Public read
execute => $execute, execute => $execute,
...@@ -121,6 +122,7 @@ sub clear ...@@ -121,6 +122,7 @@ sub clear
$self->{serverflags} = ""; $self->{serverflags} = "";
$self->{serverconnects} = 1; $self->{serverconnects} = 1;
$self->{serverpid} = 0; $self->{serverpid} = 0;
$self->{reneg} = 0;
} }
sub restart sub restart
...@@ -205,7 +207,13 @@ sub clientstart ...@@ -205,7 +207,13 @@ sub clientstart
or die "Failed to redirect stdout: $!"; or die "Failed to redirect stdout: $!";
open(STDERR, ">&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 " ." s_client -engine ossltest -connect "
.($self->proxy_addr).":".($self->proxy_port); .($self->proxy_addr).":".($self->proxy_port);
if ($self->cipherc ne "") { if ($self->cipherc ne "") {
...@@ -508,6 +516,7 @@ sub fill_known_data ...@@ -508,6 +516,7 @@ sub fill_known_data
} }
return $ret; return $ret;
} }
sub is_tls13 sub is_tls13
{ {
my $class = shift; my $class = shift;
...@@ -516,4 +525,14 @@ sub is_tls13 ...@@ -516,4 +525,14 @@ sub is_tls13
} }
return $is_tls13; return $is_tls13;
} }
sub reneg
{
my $self = shift;
if (@_) {
$self->{reneg} = shift;
}
return $self->{reneg};
}
1; 1;
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册