Skip to content

Commit

Permalink
appservice: remove TLS support
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Sep 30, 2024
1 parent f48a66c commit cc179f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
3 changes: 0 additions & 3 deletions appservice/appservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,6 @@ type HostConfig struct {
Hostname string `yaml:"hostname"`
// Port is required when Hostname is an IP address, optional for unix sockets
Port uint16 `yaml:"port"`

TLSKey string `yaml:"tls_key,omitempty"`
TLSCert string `yaml:"tls_cert,omitempty"`
}

// Address gets the whole address of the Appservice.
Expand Down
9 changes: 2 additions & 7 deletions appservice/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,8 @@ func (as *AppService) listenUnix() error {
}

func (as *AppService) listenTCP() error {
if len(as.Host.TLSCert) == 0 || len(as.Host.TLSKey) == 0 {
as.Log.Info().Str("address", as.server.Addr).Msg("Starting HTTP listener")
return as.server.ListenAndServe()
} else {
as.Log.Info().Str("address", as.server.Addr).Msg("Starting HTTP listener with TLS")
return as.server.ListenAndServeTLS(as.Host.TLSCert, as.Host.TLSKey)
}
as.Log.Info().Str("address", as.server.Addr).Msg("Starting HTTP listener")
return as.server.ListenAndServe()
}

func (as *AppService) Stop() {
Expand Down

0 comments on commit cc179f8

Please sign in to comment.