From 8c406427af6d2445969b2263c051159d75cd461e Mon Sep 17 00:00:00 2001 From: Eugene Bujak Date: Tue, 19 Feb 2019 17:52:27 +0300 Subject: [PATCH] /tls/configure -- accept empty certificates for saving --- control.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/control.go b/control.go index 564c735e..a8081e5b 100644 --- a/control.go +++ b/control.go @@ -1088,13 +1088,11 @@ func handleTLSConfigure(w http.ResponseWriter, r *http.Request) { restartHTTPS := false data = validateCertificates(data) - if data.usable { - if !reflect.DeepEqual(config.TLS.tlsConfigSettings, data.tlsConfigSettings) { - log.Printf("tls config settings have changed, will restart HTTPS server") - restartHTTPS = true - } - config.TLS = data + if !reflect.DeepEqual(config.TLS.tlsConfigSettings, data.tlsConfigSettings) { + log.Printf("tls config settings have changed, will restart HTTPS server") + restartHTTPS = true } + config.TLS = data err = writeAllConfigsAndReloadDNS() if err != nil { httpError(w, http.StatusInternalServerError, "Couldn't write config file: %s", err)