]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
80-test_http.t: Rename to 79-test_http.t, add basic HTTP server ACCEPT test
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>
Wed, 2 Jun 2021 14:47:58 +0000 (16:47 +0200)
committerDr. David von Oheimb <dev@ddvo.net>
Fri, 4 Jun 2021 05:07:32 +0000 (07:07 +0200)
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15592)

test/recipes/79-test_http.t [moved from test/recipes/80-test_http.t with 56% similarity]

similarity index 56%
rename from test/recipes/80-test_http.t
rename to test/recipes/79-test_http.t
index 2297c5a537b642ada7d1257b20d4af8322f80782..b5bb74393aa6d0996cfb338e8321da418964c7d5 100644 (file)
@@ -12,10 +12,15 @@ use OpenSSL::Test::Utils;
 
 setup("test_http");
 
-plan tests => 1;
+plan tests => 2;
 
 SKIP: {
     skip "sockets disabled", 1 if disabled("sock");
-    ok(run(test(["http_test",
-                 srctop_file("test", "certs", "ca-cert.pem")])));
+    skip "OCSP disabled", 1 if disabled("ocsp");
+    my $cmd = [qw{openssl ocsp -index any -port 0}];
+    my @output = run(app($cmd), capture => 1);
+    ok($output[0] =~ /^ACCEPT (0.0.0.0|\[::\]):(\d+?)$/ && $2 >= 1024,
+       "HTTP server auto-selects and reports local port >= 1024");
 }
+
+ok(run(test(["http_test", srctop_file("test", "certs", "ca-cert.pem")])));