From ac5a86b14e1966545ef1c48133f856b275b538f1 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 21 Nov 2022 09:49:52 +0800 Subject: [PATCH] Update openssl.sh --- plugins/php/versions/common/openssl.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/php/versions/common/openssl.sh b/plugins/php/versions/common/openssl.sh index ea36ced7a..8aad5692f 100755 --- a/plugins/php/versions/common/openssl.sh +++ b/plugins/php/versions/common/openssl.sh @@ -83,6 +83,12 @@ Install_lib() echo "" >> $serverPath/php/$version/etc/php.ini echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini + if [ -f "/etc/ssl/certs/ca-certificates.crt" ];then + echo "openssl.cafile=/etc/ssl/certs/ca-certificates.crt" >> $serverPath/php/$version/etc/php.ini + elif [ -f "/etc/pki/tls/certs/ca-bundle.crt" ]; + echo "openssl.cafile=/etc/pki/tls/certs/ca-bundle.crt" >> $serverPath/php/$version/etc/php.ini + fi + echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini bash ${rootPath}/plugins/php/versions/lib.sh $version restart echo '==========================================================='