opensslwrap.sh 977 B

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