Check openssl_bin path is executable before using.

This commit is contained in:
Darren Tucker 2023-01-07 10:34:18 +11:00
parent 5d7b16cff4
commit 5532e010a0
No known key found for this signature in database
1 changed files with 5 additions and 3 deletions

View File

@ -2696,14 +2696,11 @@ AC_ARG_WITH([ssl-dir],
esac
if test -d "$withval/lib"; then
libcrypto_path="${withval}/lib"
openssl_bin="${withval}/bin/openssl"
elif test -d "$withval/lib64"; then
libcrypto_path="$withval/lib64"
openssl_bin="${withval}/bin/openssl"
else
# Built but not installed
libcrypto_path="${withval}"
openssl_bin="${withval}/apps/openssl"
fi
if test -n "${rpath_opt}"; then
LDFLAGS="-L${libcrypto_path} ${rpath_opt}${libcrypto_path} ${LDFLAGS}"
@ -2715,6 +2712,11 @@ AC_ARG_WITH([ssl-dir],
else
CPPFLAGS="-I${withval} ${CPPFLAGS}"
fi
if test -x "${withval}/bin/openssl"; then
openssl_bin="${withval}/bin/openssl"
elif test -x "${withval}/apps/openssl"; then
openssl_bin="${withval}/apps/openssl"
fi
fi
]
)