TLS support

This commit is contained in:
Jeremy Latt 2014-02-09 19:41:00 -08:00
parent e625f62baa
commit db0f494604
4 changed files with 38 additions and 9 deletions

View file

@ -7,7 +7,7 @@ import (
type Config struct {
Name string
Listen string
Listeners []ListenerConfig
Password string
Operators []OperatorConfig
Debug map[string]bool
@ -18,6 +18,16 @@ type OperatorConfig struct {
Password string
}
type ListenerConfig struct {
Address string
Key string
Certificate string
}
func (config *ListenerConfig) IsTLS() bool {
return (config.Key != "") && (config.Certificate != "")
}
func LoadConfig() (config *Config, err error) {
config = &Config{}