Expose some tls functions from the proxy for use elsewhere.
This commit is contained in:
1 parent
827bcd898e
commit
5b8ce8ebae
2 files changed
+7
-5
No files matched your search
+2
-2
@@ -76,7 +76,7 @@ type Proxy struct {
|
||||
func NewProxy(c Config) (*Proxy, error) {
|
||||
p := &Proxy{Config: c, waiters: make(map[*http.Request]*wait)}
|
||||
|
||||
if err := p.TLSConfig.loadCerts(); err != nil {
|
||||
if err := p.TLSConfig.LoadCerts(); err != nil {
|
||||
Log.Fatalf("Could not configure tls for proxy: %s", err)
|
||||
}
|
||||
|
||||
@@ -262,7 +262,7 @@ func (proxy *Proxy) listen(protoAndAddr string) (net.Listener, string, error) {
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
if proxy.TLSConfig.enabled() {
|
||||
if proxy.TLSConfig.IsEnabled() {
|
||||
listener = tls.NewListener(listener, proxy.TLSConfig.Config)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user