Tue Jun 23 14:08:03 2009 UTC ()
PR/41628: Jukka Salmi: OpenSSL's c_rehash can't find openssl binary


(christos)
diff -r1.1.1.13 -r1.2 src/crypto/dist/openssl/tools/c_rehash
diff -r1.1.1.4 -r1.2 src/crypto/dist/openssl/tools/c_rehash.in

cvs diff -r1.1.1.13 -r1.2 src/crypto/dist/openssl/tools/Attic/c_rehash (expand / switch to unified diff)

--- 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}
25my $path_delim = ($pwd =~ /^[a-z]\:/i) ? ';' : ':'; # DOS/Win32 or Unix delimiter? 25my $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
29if(! -x $openssl) { 29if(! -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
43if(@ARGV) { 44if(@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};

cvs diff -r1.1.1.4 -r1.2 src/crypto/dist/openssl/tools/Attic/c_rehash.in (expand / switch to unified diff)

--- 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}
25my $path_delim = ($pwd =~ /^[a-z]\:/i) ? ';' : ':'; # DOS/Win32 or Unix delimiter? 25my $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
29if(! -x $openssl) { 29if(! -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
43if(@ARGV) { 44if(@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};