Better lookup for openssl executable
Fixes #27891 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/27895)
This commit is contained in:
parent
7bdc0d13d2
commit
fa0c67a28a
@ -63,10 +63,10 @@ if (defined(&Cwd::getcwd)) {
|
||||
my $path_delim = ($pwd =~ /^[a-z]\:/i) ? ';' : ':';
|
||||
$ENV{PATH} = "$prefix/bin" . ($ENV{PATH} ? $path_delim . $ENV{PATH} : "");
|
||||
|
||||
if (! -x $openssl) {
|
||||
if (!(-f $openssl && -x $openssl)) {
|
||||
my $found = 0;
|
||||
foreach (split /$path_delim/, $ENV{PATH}) {
|
||||
if (-x "$_/$openssl") {
|
||||
if (-f "$_/$openssl" && -x "$_/$openssl") {
|
||||
$found = 1;
|
||||
$openssl = "$_/$openssl";
|
||||
last;
|
||||
@ -88,7 +88,7 @@ if (@ARGV) {
|
||||
|
||||
if (-d $dirlist[0]) {
|
||||
chdir $dirlist[0];
|
||||
$openssl="$pwd/$openssl" if (!-x $openssl);
|
||||
$openssl="$pwd/$openssl" if (!(-f $openssl && -x $openssl));
|
||||
chdir $pwd;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user