Remove proxy tests. Add verify callback tests.
[openssl.git] / test / recipes / 40-test_rehash.t
index 4f0d71fbd25decb4ea7afad4e2f26acdd6592cce..c5c90e0bd6c55daaa402165f291f52435b2c697e 100644 (file)
@@ -1,4 +1,11 @@
-#! /usr/bin/perl
+#! /usr/bin/env perl
+# Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved.
+#
+# Licensed under the OpenSSL license (the "License").  You may not use
+# this file except in compliance with the License.  You can obtain a copy
+# in the file LICENSE in the source distribution or at
+# https://www.openssl.org/source/license.html
+
 
 use strict;
 use warnings;
@@ -6,10 +13,15 @@ use warnings;
 use File::Spec::Functions;
 use File::Copy;
 use File::Basename;
-use OpenSSL::Test qw/:DEFAULT top_file/;
+use OpenSSL::Test qw/:DEFAULT bldtop_file/;
 
 setup("test_rehash");
 
+#If "openssl rehash -help" fails it's most likely because we're on a platform
+#that doesn't support the rehash command (e.g. Windows)
+plan skip_all => "test_rehash is not available on this platform"
+    unless run(app(["openssl", "rehash", "-help"]));
+
 plan tests => 5;
 
 indir "rehash.$$" => sub {
@@ -34,7 +46,7 @@ indir "rehash.$$" => sub {
     chmod 0500, curdir();
   SKIP: {
       if (!ok(!open(FOO, ">unwritable.txt"),
-              "Testing that we aren't running as a priviledged user, such as root")) {
+              "Testing that we aren't running as a privileged user, such as root")) {
           close FOO;
           skip "It's pointless to run the next test as root", 1;
       }
@@ -46,7 +58,7 @@ indir "rehash.$$" => sub {
 
 sub prepare {
     my @sourcefiles =
-        sort map { glob(top_file('certs', 'demo', "*.$_")) } ('pem',
+        sort map { glob(bldtop_file('certs', 'demo', "*.$_")) } ('pem',
                                                               'crt',
                                                               'cer',
                                                               'crl');