From e373fd5a5c8ebe0203b020708ea83e93dd2d70a3 Mon Sep 17 00:00:00 2001 From: david Date: Fri, 16 Aug 2013 08:03:18 +0000 Subject: [PATCH] Must connect to "localhost" to match server cert. --- ncat/test/ncat-test.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ncat/test/ncat-test.pl b/ncat/test/ncat-test.pl index b984c80f9..58fa4ce4e 100755 --- a/ncat/test/ncat-test.pl +++ b/ncat/test/ncat-test.pl @@ -2641,7 +2641,7 @@ test "SSL verification, correct domain name", sub { my $resp; - ($c_pid, $c_out, $c_in) = ncat($HOST, $PORT, "--ssl-verify", "--ssl-trustfile", "test-cert.pem"); + ($c_pid, $c_out, $c_in) = ncat("localhost", $PORT, "--ssl-verify", "--ssl-trustfile", "test-cert.pem"); syswrite($c_in, "abc\n"); $resp = timeout_read($s_out); $resp or die "Read timeout"; @@ -2668,7 +2668,7 @@ test "SSL verification, no server cert", sub { my $resp; - ($c_pid, $c_out, $c_in) = ncat($HOST, $PORT, "--ssl-verify", "--ssl-trustfile", "test-cert.pem"); + ($c_pid, $c_out, $c_in) = ncat("localhost", $PORT, "--ssl-verify", "--ssl-trustfile", "test-cert.pem"); syswrite($c_in, "abc\n"); $resp = timeout_read($s_out); !$resp or die "Server got \"$resp\" when verification should have failed";