1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-10 16:39:04 +00:00

Must connect to "localhost" to match server cert.

This commit is contained in:
david
2013-08-16 08:03:18 +00:00
parent 91cce4c3d2
commit e373fd5a5c

View File

@@ -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";