summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/templates/accel-ppp/sstp.config.tmpl2
-rwxr-xr-xsrc/conf_mode/vpn_sstp.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/data/templates/accel-ppp/sstp.config.tmpl b/data/templates/accel-ppp/sstp.config.tmpl
index 7ca7b1c1e..d48e9ab0d 100644
--- a/data/templates/accel-ppp/sstp.config.tmpl
+++ b/data/templates/accel-ppp/sstp.config.tmpl
@@ -29,7 +29,9 @@ disable
verbose=1
ifname=sstp%d
accept=ssl
+{% if ssl.ca_cert_file is defined and ssl.ca_cert_file is not none %}
ssl-ca-file={{ ssl.ca_cert_file }}
+{% endif %}
ssl-pemfile={{ ssl.cert_file }}
ssl-keyfile={{ ssl.key_file }}
diff --git a/src/conf_mode/vpn_sstp.py b/src/conf_mode/vpn_sstp.py
index 47367f125..11925dfa4 100755
--- a/src/conf_mode/vpn_sstp.py
+++ b/src/conf_mode/vpn_sstp.py
@@ -57,9 +57,7 @@ def verify(sstp):
# SSL certificate checks
#
tmp = dict_search('ssl.ca_cert_file', sstp)
- if not tmp:
- raise ConfigError(f'SSL CA certificate file required!')
- else:
+ if tmp:
if not os.path.isfile(tmp):
raise ConfigError(f'SSL CA certificate "{tmp}" does not exist!')