mirror of
https://github.com/yrutschle/sslh.git
synced 2026-10-22 18:12:10 +03:00
test to drop connection before writing anything (fix #285)
This commit is contained in:
1 parent
a704c7f7f5
commit
3013658b20
1 file changed
+14
@@ -26,6 +26,7 @@ my $PROBES_NOFRAG = 1;
|
|||||||
my $PROBES_AGAIN = 1;
|
my $PROBES_AGAIN = 1;
|
||||||
my $SSL_MIX_SSH = 1;
|
my $SSL_MIX_SSH = 1;
|
||||||
my $SSH_MIX_SSL = 1;
|
my $SSH_MIX_SSL = 1;
|
||||||
|
my $DROP_CNX = 1;
|
||||||
|
|
||||||
# Robustness tests. These are mostly to achieve full test
|
# Robustness tests. These are mostly to achieve full test
|
||||||
# coverage, but do not necessarily result in an actual test
|
# coverage, but do not necessarily result in an actual test
|
||||||
@@ -285,6 +286,19 @@ for my $binary (@binaries) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Test: Drop connection without writing anything
|
||||||
|
if ($DROP_CNX) {
|
||||||
|
print "***Test: Connect but don't write anything\n";
|
||||||
|
my $cnx_h = new IO::Socket::INET(PeerHost => "localhost:$sslh_port");
|
||||||
|
warn "$!\n" unless $cnx_h;
|
||||||
|
if ($cnx_h) {
|
||||||
|
close $cnx_h;
|
||||||
|
my_is(1, "$binary: Connect and write nothing");
|
||||||
|
# The goal of the test is to check sslh doesn't
|
||||||
|
# crash
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($PROBES_NOFRAG) {
|
if ($PROBES_NOFRAG) {
|
||||||
test_probes(no_frag => 1, binary => $binary);
|
test_probes(no_frag => 1, binary => $binary);
|
||||||
|
|||||||
Reference in new issue
Block a user