diff options
author | Andy Polyakov <appro@openssl.org> | 2005-02-02 00:48:37 +0100 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2005-02-02 00:48:37 +0100 |
commit | 62d27939c2f103654b52a83b17febe968a67ec73 (patch) | |
tree | e6be6a7d5bdb754d840776066d28d8a98154c316 /util/opensslwrap.sh | |
parent | The first argument to load_iv should really be a char ** instead of an (diff) | |
download | openssl-62d27939c2f103654b52a83b17febe968a67ec73.tar.xz openssl-62d27939c2f103654b52a83b17febe968a67ec73.zip |
Address run-time linker problems: LD_PRELOAD issue on multi-ABI platforms
and SafeDllSearchMode in Windows.
Submitted by: Richard Levitte
Diffstat (limited to 'util/opensslwrap.sh')
-rwxr-xr-x | util/opensslwrap.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/util/opensslwrap.sh b/util/opensslwrap.sh new file mode 100755 index 0000000000..91d29e2b87 --- /dev/null +++ b/util/opensslwrap.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +HERE="`echo $0 | sed -e 's|[^/]*$||'`" +OPENSSL="${HERE}../apps/openssl" + +if [ -x "${OPENSSL}.exe" ]; then + # The original reason for this script existence is to work around + # certain caveats in run-time linker behaviour. On Windows platforms + # adjusting $PATH used to be sufficient, but with introduction of + # SafeDllSearchMode in XP/2003 the only way to get it right in + # *all* possible situations is to copy newly built .DLLs to apps/ + # and test/, which is now done elsewhere... The $PATH is adjusted + # for backward compatibility (and nostagical reasons:-). + if [ "$OSTYPE" != msdosdjgpp ]; then + PATH="${HERE}..:$PATH"; export PATH + fi + exec "${OPENSSL}.exe" "$@" +elif [ -x "${OPENSSL}" -a -x "${HERE}shlib_wrap.sh" ]; then + exec "${HERE}shlib_wrap.sh" "${OPENSSL}" "$@" +else + exec "${OPENSSL}" "$@" # hope for the best... +fi |