mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-07-01 04:54:49 +02:00
scripts: split setup-stack.sh
(#3115)
This commit is contained in:
parent
1592698637
commit
f35b60042f
18 changed files with 1205 additions and 1184 deletions
20
target/scripts/helpers/dhparams.sh
Normal file
20
target/scripts/helpers/dhparams.sh
Normal file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
|
||||
function _setup_dhparam
|
||||
{
|
||||
local DH_SERVICE=$1
|
||||
local DH_DEST=$2
|
||||
local DH_CUSTOM='/tmp/docker-mailserver/dhparams.pem'
|
||||
|
||||
_log 'debug' "Setting up ${DH_SERVICE} dhparam"
|
||||
|
||||
if [[ -f ${DH_CUSTOM} ]]
|
||||
then # use custom supplied dh params (assumes they're probably insecure)
|
||||
_log 'trace' "${DH_SERVICE} will use custom provided DH paramters"
|
||||
_log 'warn' "Using self-generated dhparams is considered insecure - unless you know what you are doing, please remove '${DH_CUSTOM}'"
|
||||
|
||||
cp -f "${DH_CUSTOM}" "${DH_DEST}"
|
||||
else # use official standardized dh params (provided via Dockerfile)
|
||||
_log 'trace' "${DH_SERVICE} will use official standardized DH parameters (ffdhe4096)."
|
||||
fi
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue