|
@@ -268,6 +268,10 @@ SSH_CIPHERS="Ciphers aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,ae
|
268
|
268
|
SSH_MACS="MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,hmac-ripemd160"
|
269
|
269
|
SSH_KEX="KexAlgorithms diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1"
|
270
|
270
|
|
|
271
|
+# xmpp ciphers and curve
|
|
272
|
+XMPP_CIPHERS='"EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA256:EECDH:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!IDEA:!ECDSA:kEDH:CAMELLIA128-SHA:AES128-SHA"'
|
|
273
|
+XMPP_ECC_CURVE='"secp384r1"'
|
|
274
|
+
|
271
|
275
|
# the default email address
|
272
|
276
|
MY_EMAIL_ADDRESS=$MY_USERNAME@$DOMAIN_NAME
|
273
|
277
|
|
|
@@ -5255,8 +5259,21 @@ function install_xmpp {
|
5255
|
5259
|
sed -i 's|/etc/prosody/certs/example.com.key|/etc/ssl/private/xmpp.key|g' /etc/prosody/conf.avail/xmpp.cfg.lua
|
5256
|
5260
|
sed -i 's|/etc/prosody/certs/example.com.crt|/etc/ssl/certs/xmpp.crt|g' /etc/prosody/conf.avail/xmpp.cfg.lua
|
5257
|
5261
|
if ! grep -q "xmpp.dhparam" /etc/prosody/conf.avail/xmpp.cfg.lua; then
|
5258
|
|
- sed -i '/certificate =/a\ dhparam = "/etc/ssl/certs/xmpp.dhparam";' /etc/prosody/conf.avail/xmpp.cfg.lua
|
|
5262
|
+ sed -i '/certificate =/a\ dhparam = "/etc/ssl/certs/xmpp.dhparam";' /etc/prosody/conf.avail/xmpp.cfg.lua
|
|
5263
|
+ fi
|
|
5264
|
+ if ! grep -q 'options = {"no_sslv2", "no_sslv3" }' /etc/prosody/conf.avail/xmpp.cfg.lua; then
|
|
5265
|
+ sed -i '/certificate =/a\ options = {"no_sslv2", "no_sslv3" };' /etc/prosody/conf.avail/xmpp.cfg.lua
|
|
5266
|
+ fi
|
|
5267
|
+ if ! grep -q 'ciphers =' /etc/prosody/conf.avail/xmpp.cfg.lua; then
|
|
5268
|
+ sed -i "/certificate =/a\ ciphers = $XMPP_CIPHERS;" /etc/prosody/conf.avail/xmpp.cfg.lua
|
|
5269
|
+ fi
|
|
5270
|
+ if ! grep -q 'depth = "1";' /etc/prosody/conf.avail/xmpp.cfg.lua; then
|
|
5271
|
+ sed -i '/certificate =/a\ depth = "1";' /etc/prosody/conf.avail/xmpp.cfg.lua
|
|
5272
|
+ fi
|
|
5273
|
+ if ! grep -q 'curve =' /etc/prosody/conf.avail/xmpp.cfg.lua; then
|
|
5274
|
+ sed -i "/certificate =/a\ curve = $XMPP_ECC_CURVE;" /etc/prosody/conf.avail/xmpp.cfg.lua
|
5259
|
5275
|
fi
|
|
5276
|
+
|
5260
|
5277
|
sed -i "s/example.com/$DOMAIN_NAME/g" /etc/prosody/conf.avail/xmpp.cfg.lua
|
5261
|
5278
|
sed -i 's/enabled = false -- Remove this line to enable this host//g' /etc/prosody/conf.avail/xmpp.cfg.lua
|
5262
|
5279
|
|
|
@@ -5277,7 +5294,19 @@ function install_xmpp {
|
5277
|
5294
|
sed -i 's|/etc/prosody/certs/localhost.key|/etc/ssl/private/xmpp.key|g' /etc/prosody/prosody.cfg.lua
|
5278
|
5295
|
sed -i 's|/etc/prosody/certs/localhost.crt|/etc/ssl/certs/xmpp.crt|g' /etc/prosody/prosody.cfg.lua
|
5279
|
5296
|
if ! grep -q "xmpp.dhparam" /etc/prosody/prosody.cfg.lua; then
|
5280
|
|
- sed -i '/certificate =/a\ dhparam = "/etc/ssl/certs/xmpp.dhparam";' /etc/prosody/prosody.cfg.lua
|
|
5297
|
+ sed -i '/certificate =/a\ dhparam = "/etc/ssl/certs/xmpp.dhparam";' /etc/prosody/prosody.cfg.lua
|
|
5298
|
+ fi
|
|
5299
|
+ if ! grep -q 'options = {"no_sslv2", "no_sslv3" }' /etc/prosody/prosody.cfg.lua; then
|
|
5300
|
+ sed -i '/certificate =/a\ options = {"no_sslv2", "no_sslv3" };' /etc/prosody/prosody.cfg.lua
|
|
5301
|
+ fi
|
|
5302
|
+ if ! grep -q 'ciphers =' /etc/prosody/prosody.cfg.lua; then
|
|
5303
|
+ sed -i "/certificate =/a\ ciphers = $XMPP_CIPHERS;" /etc/prosody/prosody.cfg.lua
|
|
5304
|
+ fi
|
|
5305
|
+ if ! grep -q 'depth = "1";' /etc/prosody/prosody.cfg.lua; then
|
|
5306
|
+ sed -i '/certificate =/a\ depth = "1";' /etc/prosody/prosody.cfg.lua
|
|
5307
|
+ fi
|
|
5308
|
+ if ! grep -q 'curve =' /etc/prosody/prosody.cfg.lua; then
|
|
5309
|
+ sed -i "/certificate =/a\ curve = $XMPP_ECC_CURVE;" /etc/prosody/prosody.cfg.lua
|
5281
|
5310
|
fi
|
5282
|
5311
|
sed -i 's/c2s_require_encryption = false/c2s_require_encryption = true/g' /etc/prosody/prosody.cfg.lua
|
5283
|
5312
|
if ! grep -q "s2s_require_encryption" /etc/prosody/prosody.cfg.lua; then
|