PR/41628: Jukka Salmi: OpenSSL's c_rehash can't find openssl binarydiff -r1.1.1.13 -r1.2 src/crypto/dist/openssl/tools/c_rehash
(christos)
--- src/crypto/dist/openssl/tools/Attic/c_rehash 2008/05/09 21:34:47 1.1.1.13
+++ src/crypto/dist/openssl/tools/Attic/c_rehash 2009/06/23 14:08:02 1.2
@@ -21,26 +21,27 @@ if (defined(&Cwd::getcwd)) { | @@ -21,26 +21,27 @@ if (defined(&Cwd::getcwd)) { | |||
21 | $pwd=Cwd::getcwd(); | 21 | $pwd=Cwd::getcwd(); | |
22 | } else { | 22 | } else { | |
23 | $pwd=`pwd`; chomp($pwd); | 23 | $pwd=`pwd`; chomp($pwd); | |
24 | } | 24 | } | |
25 | my $path_delim = ($pwd =~ /^[a-z]\:/i) ? ';' : ':'; # DOS/Win32 or Unix delimiter? | 25 | my $path_delim = ($pwd =~ /^[a-z]\:/i) ? ';' : ':'; # DOS/Win32 or Unix delimiter? | |
26 | 26 | |||
27 | $ENV{PATH} .= "$path_delim$dir/bin"; | 27 | $ENV{PATH} .= "$path_delim$dir/bin"; | |
28 | 28 | |||
29 | if(! -x $openssl) { | 29 | if(! -x $openssl) { | |
30 | my $found = 0; | 30 | my $found = 0; | |
31 | foreach (split /$path_delim/, $ENV{PATH}) { | 31 | foreach (split /$path_delim/, $ENV{PATH}) { | |
32 | if(-x "$_/$openssl") { | 32 | if(-x "$_/$openssl") { | |
33 | $found = 1; | 33 | $found = 1; | |
34 | $openssl = "$_/$openssl"; | |||
34 | last; | 35 | last; | |
35 | } | 36 | } | |
36 | } | 37 | } | |
37 | if($found == 0) { | 38 | if($found == 0) { | |
38 | print STDERR "c_rehash: rehashing skipped ('openssl' program not available)\n"; | 39 | print STDERR "c_rehash: rehashing skipped ('openssl' program not available)\n"; | |
39 | exit 0; | 40 | exit 0; | |
40 | } | 41 | } | |
41 | } | 42 | } | |
42 | 43 | |||
43 | if(@ARGV) { | 44 | if(@ARGV) { | |
44 | @dirlist = @ARGV; | 45 | @dirlist = @ARGV; | |
45 | } elsif($ENV{SSL_CERT_DIR}) { | 46 | } elsif($ENV{SSL_CERT_DIR}) { | |
46 | @dirlist = split /$path_delim/, $ENV{SSL_CERT_DIR}; | 47 | @dirlist = split /$path_delim/, $ENV{SSL_CERT_DIR}; |
--- src/crypto/dist/openssl/tools/Attic/c_rehash.in 2008/05/09 21:34:47 1.1.1.4
+++ src/crypto/dist/openssl/tools/Attic/c_rehash.in 2009/06/23 14:08:02 1.2
@@ -21,26 +21,27 @@ if (defined(&Cwd::getcwd)) { | @@ -21,26 +21,27 @@ if (defined(&Cwd::getcwd)) { | |||
21 | $pwd=Cwd::getcwd(); | 21 | $pwd=Cwd::getcwd(); | |
22 | } else { | 22 | } else { | |
23 | $pwd=`pwd`; chomp($pwd); | 23 | $pwd=`pwd`; chomp($pwd); | |
24 | } | 24 | } | |
25 | my $path_delim = ($pwd =~ /^[a-z]\:/i) ? ';' : ':'; # DOS/Win32 or Unix delimiter? | 25 | my $path_delim = ($pwd =~ /^[a-z]\:/i) ? ';' : ':'; # DOS/Win32 or Unix delimiter? | |
26 | 26 | |||
27 | $ENV{PATH} .= "$path_delim$dir/bin"; | 27 | $ENV{PATH} .= "$path_delim$dir/bin"; | |
28 | 28 | |||
29 | if(! -x $openssl) { | 29 | if(! -x $openssl) { | |
30 | my $found = 0; | 30 | my $found = 0; | |
31 | foreach (split /$path_delim/, $ENV{PATH}) { | 31 | foreach (split /$path_delim/, $ENV{PATH}) { | |
32 | if(-x "$_/$openssl") { | 32 | if(-x "$_/$openssl") { | |
33 | $found = 1; | 33 | $found = 1; | |
34 | $openssl = "$_/$openssl"; | |||
34 | last; | 35 | last; | |
35 | } | 36 | } | |
36 | } | 37 | } | |
37 | if($found == 0) { | 38 | if($found == 0) { | |
38 | print STDERR "c_rehash: rehashing skipped ('openssl' program not available)\n"; | 39 | print STDERR "c_rehash: rehashing skipped ('openssl' program not available)\n"; | |
39 | exit 0; | 40 | exit 0; | |
40 | } | 41 | } | |
41 | } | 42 | } | |
42 | 43 | |||
43 | if(@ARGV) { | 44 | if(@ARGV) { | |
44 | @dirlist = @ARGV; | 45 | @dirlist = @ARGV; | |
45 | } elsif($ENV{SSL_CERT_DIR}) { | 46 | } elsif($ENV{SSL_CERT_DIR}) { | |
46 | @dirlist = split /$path_delim/, $ENV{SSL_CERT_DIR}; | 47 | @dirlist = split /$path_delim/, $ENV{SSL_CERT_DIR}; |