aboutsummaryrefslogtreecommitdiff
path: root/cmd/cashierd
diff options
context:
space:
mode:
authorNiall Sheridan <nsheridan@gmail.com>2017-01-06 21:00:21 +0000
committerNiall Sheridan <nsheridan@gmail.com>2017-01-06 21:00:21 +0000
commit9aeb1445549ec9a5b890f6df9bcf2952ef94ee03 (patch)
tree8459fc8e286428bbae1b622fbfe7532e944883c4 /cmd/cashierd
parent9e9a7d50970f1424245d88169de82988fd57e112 (diff)
Check that tls cert/key are set if use_tls is true
Diffstat (limited to 'cmd/cashierd')
-rw-r--r--cmd/cashierd/main.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd/cashierd/main.go b/cmd/cashierd/main.go
index 52b6a8b..fb67a36 100644
--- a/cmd/cashierd/main.go
+++ b/cmd/cashierd/main.go
@@ -357,6 +357,9 @@ func main() {
}
tlsConfig.GetCertificate = m.GetCertificate
} else {
+ if conf.Server.TLSCert == "" || conf.Server.TLSKey == "" {
+ log.Fatal("TLS cert or key not specified in config")
+ }
tlsConfig.Certificates = make([]tls.Certificate, 1)
tlsConfig.Certificates[0], err = loadCerts(conf.Server.TLSCert, conf.Server.TLSKey)
if err != nil {