From fb2bf698ca28d5e92fddddd91241d6fad242e53b Mon Sep 17 00:00:00 2001 From: sneak Date: Sun, 22 Mar 2020 05:43:16 -0700 Subject: [PATCH] enables TLS by default * update to config file to use TLS * generates self-signed certs if none exist and saves them in config dir --- root/etc/service/adchpp/run | 8 +++++++- src/etc/adchpp.xml | 17 ++++++++++++----- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/root/etc/service/adchpp/run b/root/etc/service/adchpp/run index 086ec40..857aa09 100644 --- a/root/etc/service/adchpp/run +++ b/root/etc/service/adchpp/run @@ -9,5 +9,11 @@ if [[ ! -d /config/scripts ]]; then cp /usr/local/src/adchpp/plugins/Script/examples/*.lua /config/scripts fi -cd /tmp +if [[ ! -d /config/certs ]]; then + mkdir -p /config/certs + cd /config/certs + bash /usr/local/src/adchpp/linux/generate_certs.sh +fi + +cd /config exec /usr/local/bin/adchppd -c /config diff --git a/src/etc/adchpp.xml b/src/etc/adchpp.xml index e5e92ee..368812d 100644 --- a/src/etc/adchpp.xml +++ b/src/etc/adchpp.xml @@ -1,7 +1,7 @@ - @@ -59,7 +59,6 @@ To create secure connections, set TLS="1" and define the following (preferably absolute) paths: Certificate, PrivateKey, TrustedPath, DHParams. An example secure server setting: - Simple OpenSSL commands to generate files used for secure connections: openssl genrsa -out privkey.pem 2048 @@ -69,8 +68,16 @@ Alternatively, you can use the cert generator contributed on . - --> + --> + - + - + Script