Skip to content

Commit 700ea21

Browse files
Merge pull request #1978 from tesshuflower/prevent-stunnel-dh-param-regen
rsync-tls use TLSv1.3 as min, reduce 1.2 ciphers (for stunnel at startup to reduce CPU load)
2 parents f114119 + b4f04c3 commit 700ea21

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

mover-rsync-tls/server.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,19 @@ if [[ ! -d $TARGET ]] && ! test -b $BLOCK_TARGET; then
7272
exit 1
7373
fi
7474

75+
SSLVERSIONMIN="sslVersionMin = TLSv1.3"
7576
if [[ -n ${SSL_VERSION_MIN} ]]; then
7677
# Append sslVersionMin to stunnel conf
7778
SSLVERSIONMIN="sslVersionMin = ${SSL_VERSION_MIN}"
7879
fi
7980

81+
# Notes:
82+
# Below we are setting ciphers = kPSK in stunnel.conf as we're already going
83+
# to default to TLSv1.3 as the minimum. The ciphers setting only applies to
84+
# TLSv1.2 and below, but with ciphers = PSK startup will still run a "per-day"
85+
# regeneration job that will regenerate DH parameters - we can bypass this
86+
# by setting ciphers = kPSK to avoid any Kx=DH ciphers.
87+
8088
if [[ -d $TARGET ]]; then
8189
##############################
8290
## Filesystem volume, use rsync
@@ -134,7 +142,7 @@ socket = r:TCP_KEEPIDLE=180
134142
syslog = no
135143
136144
[rsync]
137-
ciphers = PSK
145+
ciphers = kPSK
138146
PSKsecrets = $PSK_FILE
139147
$SSLVERSIONMIN
140148
; Port to listen for incoming connections from remote
@@ -180,7 +188,7 @@ socket = r:TCP_KEEPIDLE=180
180188
syslog = no
181189
182190
[diskrsync]
183-
ciphers = PSK
191+
ciphers = kPSK
184192
PSKsecrets = $PSK_FILE
185193
$SSLVERSIONMIN
186194
; Port to listen for incoming connections from remote

0 commit comments

Comments
 (0)