ssl/statem: Replace size_t with int and add the checks
[openssl.git] / util / opensslwrap.sh
index 6f9f7ff5948db4bd0f6955d482408c0a530d399a..7a388302703e6f47577f82428d6bc7eaa593b095 100755 (executable)
@@ -3,9 +3,12 @@
 HERE="`echo $0 | sed -e 's|[^/]*$||'`"
 OPENSSL="${HERE}../apps/openssl"
 
-if [ -d "${HERE}../engines" ]; then
+if [ -d "${HERE}../engines" -a "x$OPENSSL_ENGINES" = "x" ]; then
        OPENSSL_ENGINES="${HERE}../engines"; export OPENSSL_ENGINES
 fi
+if [ -d "${HERE}../providers" -a "x$OPENSSL_MODULES" = "x" ]; then
+       OPENSSL_MODULES="${HERE}../providers"; export OPENSSL_MODULES
+fi
 
 if [ -x "${OPENSSL}.exe" ]; then
        # The original reason for this script existence is to work around