diff options
author | Niall Sheridan <nsheridan@gmail.com> | 2017-01-09 10:07:56 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-09 10:07:56 +0000 |
commit | fc190076448ebf1710910a89b584857cbc89d159 (patch) | |
tree | b82061b8a2af25fbc13f6f9792d42ed7a2ed9d54 /cmd/cashierd/main.go | |
parent | a4b5776500b1250b61c3dafd17e464fdf3f3aae8 (diff) | |
parent | 6dfe350cb5eefde3a99374d14c083d1906717ddd (diff) |
Merge branch 'master' into opts2
Diffstat (limited to 'cmd/cashierd/main.go')
-rw-r--r-- | cmd/cashierd/main.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd/cashierd/main.go b/cmd/cashierd/main.go index 31ee240..fb67a36 100644 --- a/cmd/cashierd/main.go +++ b/cmd/cashierd/main.go @@ -34,7 +34,6 @@ import ( "github.com/nsheridan/cashier/server/static" "github.com/nsheridan/cashier/server/store" "github.com/nsheridan/cashier/server/templates" - "github.com/nsheridan/cashier/server/util" "github.com/nsheridan/cashier/server/wkfs/vaultfs" "github.com/nsheridan/wkfs/s3" "github.com/sid77/drop" @@ -169,7 +168,7 @@ func signHandler(a *appContext, w http.ResponseWriter, r *http.Request) (int, er } json.NewEncoder(w).Encode(&lib.SignResponse{ Status: "ok", - Response: util.GetPublicKey(cert), + Response: lib.GetPublicKey(cert), }) return http.StatusOK, nil } @@ -358,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 { |