Fix TLSProxy end of test detection

Previously TLSProxy would detect a successful handshake once it saw the
server Finished message. This causes problems with abbreviated handshakes,
or if the client fails to process a message from the last server flight.

This change additionally sends some application data and finishes when the
client sends a CloseNotify.

Reviewed-by: Tim Hudson <tjh@openssl.org>
This commit is contained in:
Matt Caswell
2015-08-13 16:58:20 +01:00
parent ee4ffd6fcc
commit 8af538e5c5
2 changed files with 22 additions and 13 deletions

View File

@@ -130,7 +130,7 @@ sub start
open(STDOUT, ">", File::Spec->devnull())
or die "Failed to redirect stdout";
open(STDERR, ">&STDOUT");
my $execcmd = $self->execute." s_server -engine ossltest -accept "
my $execcmd = $self->execute." s_server -rev -engine ossltest -accept "
.($self->server_port)
." -cert ".$self->cert." -naccept 1";
if ($self->ciphers ne "") {
@@ -167,7 +167,7 @@ sub start
open(STDOUT, ">", File::Spec->devnull())
or die "Failed to redirect stdout";
open(STDERR, ">&STDOUT");
my $execcmd = $self->execute
my $execcmd = "echo test | ".$self->execute
." s_client -engine ossltest -connect "
.($self->proxy_addr).":".($self->proxy_port);
if ($self->cipherc ne "") {