Merge pull request #98 from fkautz/pr_out_certificate_and_key_must_both_be_specified_or_empty_together

master
Frederick F. Kautz IV 10 years ago
commit c3c5497d24
  1. 3
      main.go

@ -40,6 +40,9 @@ func main() {
log.Println(address) log.Println(address)
certFile := c.String("cert") certFile := c.String("cert")
keyFile := c.String("key") keyFile := c.String("key")
if (certFile != "" && keyFile == "") || (certFile == "" && keyFile != "") {
log.Fatal("Both certificate and key must be provided to enable https")
}
tls := (certFile != "" && keyFile != "") tls := (certFile != "" && keyFile != "")
storageType := getStorageType(storageTypeStr) storageType := getStorageType(storageTypeStr)
serverConfig := server.ServerConfig{ serverConfig := server.ServerConfig{

Loading…
Cancel
Save