Merge pull request #2698 from aaly00/master

Add DOWNGRADE_OPENSSL_TLS_AND_SECLEVEL Option
This commit is contained in:
Shao Yu-Lung (Allen)
2020-09-21 21:54:28 +08:00
committed by GitHub
2 changed files with 13 additions and 0 deletions

View File

@ -921,6 +921,18 @@ RUN if [ ${INSTALL_XMLRPC} = true ]; then \
docker-php-ext-install xmlrpc \
;fi
###########################################################################
# Downgrade Openssl:
###########################################################################
ARG DOWNGRADE_OPENSSL_TLS_AND_SECLEVEL=false
RUN if [ ${DOWNGRADE_OPENSSL_TLS_AND_SECLEVEL} = true ]; then \
sed -i 's,^\(MinProtocol[ ]*=\).*,\1'TLSv1.2',g' /etc/ssl/openssl.cnf \
&& \
sed -i 's,^\(CipherString[ ]*=\).*,\1'DEFAULT@SECLEVEL=1',g' /etc/ssl/openssl.cnf\
;fi
###########################################################################
# Check PHP version:
###########################################################################