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.sh22
1 files changed, 22 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..91d29e2b87
--- /dev/null
+++ b/src/lib/libcrypto/util/opensslwrap.sh
@@ -0,0 +1,22 @@
1#!/bin/sh
2
3HERE="`echo $0 | sed -e 's|[^/]*$||'`"
4OPENSSL="${HERE}../apps/openssl"
5
6if [ -x "${OPENSSL}.exe" ]; then
7 # The original reason for this script existence is to work around
8 # certain caveats in run-time linker behaviour. On Windows platforms
9 # adjusting $PATH used to be sufficient, but with introduction of
10 # SafeDllSearchMode in XP/2003 the only way to get it right in
11 # *all* possible situations is to copy newly built .DLLs to apps/
12 # and test/, which is now done elsewhere... The $PATH is adjusted
13 # for backward compatibility (and nostagical reasons:-).
14 if [ "$OSTYPE" != msdosdjgpp ]; then
15 PATH="${HERE}..:$PATH"; export PATH
16 fi
17 exec "${OPENSSL}.exe" "$@"
18elif [ -x "${OPENSSL}" -a -x "${HERE}shlib_wrap.sh" ]; then
19 exec "${HERE}shlib_wrap.sh" "${OPENSSL}" "$@"
20else
21 exec "${OPENSSL}" "$@" # hope for the best...
22fi