Adapt some test recipes to the newer cmdstr()
[openssl.git] / test / recipes / 70-test_sslcertstatus.t
index 65a5ec1f22d999997f78284ea4bc7d5d1e8cddcb..d2bc280770fe624fe25bb1e9bb9335a8633d2b8f 100755 (executable)
@@ -53,7 +53,7 @@
 # Hudson (tjh@cryptsoft.com).
 
 use strict;
-use OpenSSL::Test qw/:DEFAULT cmdstr top_file top_dir/;
+use OpenSSL::Test qw/:DEFAULT cmdstr srctop_file bldtop_dir/;
 use OpenSSL::Test::Utils;
 use TLSProxy::Proxy;
 
@@ -61,22 +61,20 @@ my $test_name = "test_sslcertstatus";
 setup($test_name);
 
 plan skip_all => "TLSProxy isn't usable on $^O"
-    if $^O =~ /^VMS$/;
+    if $^O =~ /^(VMS|MSWin32)$/;
 
-plan skip_all => "$test_name needs the engine feature enabled"
-    if disabled("engine");
+plan skip_all => "$test_name needs the dynamic engine feature enabled"
+    if disabled("engine") || disabled("dynamic-engine");
 
-plan skip_all => "$test_name can only be performed with OpenSSL configured shared"
-    unless (map { s/\R//; s/^SHARED_LIBS=\s*//; $_ }
-        grep { /^SHARED_LIBS=/ }
-        do { local @ARGV = ( top_file("Makefile") ); <> })[0] ne "";
+plan skip_all => "$test_name needs the sock feature enabled"
+    if disabled("sock");
 
-$ENV{OPENSSL_ENGINES} = top_dir("engines");
 $ENV{OPENSSL_ia32cap} = '~0x200000200000000';
 my $proxy = TLSProxy::Proxy->new(
     \&certstatus_filter,
-    cmdstr(app(["openssl"])),
-    top_file("apps", "server.pem")
+    cmdstr(app(["openssl"]), display => 1),
+    srctop_file("apps", "server.pem"),
+    (!$ENV{HARNESS_ACTIVE} || $ENV{HARNESS_VERBOSE})
 );
 
 plan tests => 1;
@@ -100,7 +98,7 @@ sub certstatus_filter
         if ($message->mt == TLSProxy::Message::MT_SERVER_HELLO) {
             #Add the status_request to the ServerHello even though we are not
             #going to send a CertificateStatus message
-            $message->set_extension(TLSProxy::ClientHello::EXT_STATUS_REQUEST,
+            $message->set_extension(TLSProxy::Message::EXT_STATUS_REQUEST,
                                     "");
 
             $message->repack();