summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/util/opensslwrap.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/util/opensslwrap.sh')
-rwxr-xr-xsrc/lib/libcrypto/util/opensslwrap.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/lib/libcrypto/util/opensslwrap.sh b/src/lib/libcrypto/util/opensslwrap.sh
new file mode 100755
index 0000000000..b27cbb897f
--- /dev/null
+++ b/src/lib/libcrypto/util/opensslwrap.sh
@@ -0,0 +1,26 @@
1#!/bin/sh
2
3HERE="`echo $0 | sed -e 's|[^/]*$||'`"
4OPENSSL="${HERE}../apps/openssl"
5
6if [ -d "${HERE}../engines" -a "x$OPENSSL_ENGINES" = "x" ]; then
7 OPENSSL_ENGINES="${HERE}../engines"; export OPENSSL_ENGINES
8fi
9
10if [ -x "${OPENSSL}.exe" ]; then
11 # The original reason for this script existence is to work around
12 # certain caveats in run-time linker behaviour. On Windows platforms
13 # adjusting $PATH used to be sufficient, but with introduction of
14 # SafeDllSearchMode in XP/2003 the only way to get it right in
15 # *all* possible situations is to copy newly built .DLLs to apps/
16 # and test/, which is now done elsewhere... The $PATH is adjusted
17 # for backward compatibility (and nostagical reasons:-).
18 if [ "$OSTYPE" != msdosdjgpp ]; then
19 PATH="${HERE}..:$PATH"; export PATH
20 fi
21 exec "${OPENSSL}.exe" "$@"
22elif [ -x "${OPENSSL}" -a -x "${HERE}shlib_wrap.sh" ]; then
23 exec "${HERE}shlib_wrap.sh" "${OPENSSL}" "$@"
24else
25 exec "${OPENSSL}" "$@" # hope for the best...
26fi