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")])));