Skip to content

Commit

Permalink
82-test_ocsp_cert_chain.t: kill -HUP the server after client quits
Browse files Browse the repository at this point in the history
This ensures even if the connection for some reason
fails, the server will terminate and the test won't get
stuck.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from #23857)
  • Loading branch information
t8m committed Apr 29, 2024
1 parent 7054412 commit f4fcc21
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/recipes/82-test_ocsp_cert_chain.t
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ sub run_test {
my @s_client_cmd = ("s_client", "-connect", "localhost:$server_port", "-status", "-verify_return_error");
my $s_client_pid = open3(my $s_client_i, my $s_client_o, my $s_client_e = gensym, $shlib_wrap, $apps_openssl, @s_client_cmd);

waitpid($s_client_pid, 0);
kill 'HUP', $s_server_pid, $ocsp_pid;

### the output from s_server that we want to check is written to its stderr
### cert_status: ocsp response sent:

Expand All @@ -133,9 +136,6 @@ sub run_test {
}
}
ok($resp == 1, "check s_server sent ocsp response");

waitpid($s_client_pid, 0);
kill 'HUP', $s_server_pid, $ocsp_pid;
}

run_test();

0 comments on commit f4fcc21

Please sign in to comment.