From 6159cb536f9622125baebaeff32b84c028717e67 Mon Sep 17 00:00:00 2001 From: Adam Chalmers Date: Sat, 14 Nov 2020 20:03:29 -0600 Subject: [PATCH] TUN-3546: Fix panic in tlsconfig.LoadOriginCA --- ingress/origin_service.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ingress/origin_service.go b/ingress/origin_service.go index f35e9bb1..0ee8ca87 100644 --- a/ingress/origin_service.go +++ b/ingress/origin_service.go @@ -43,7 +43,7 @@ func (o *unixSocketPath) String() string { } func (o *unixSocketPath) start(wg *sync.WaitGroup, log logger.Service, shutdownC <-chan struct{}, errC chan error, cfg OriginRequestConfig) error { - transport, err := newHTTPTransport(o, cfg) + transport, err := newHTTPTransport(o, cfg, log) if err != nil { return err } @@ -89,7 +89,7 @@ func (o *localService) address() string { } func (o *localService) start(wg *sync.WaitGroup, log logger.Service, shutdownC <-chan struct{}, errC chan error, cfg OriginRequestConfig) error { - transport, err := newHTTPTransport(o, cfg) + transport, err := newHTTPTransport(o, cfg, log) if err != nil { return err } @@ -198,7 +198,7 @@ func (o *helloWorld) String() string { // Start starts a HelloWorld server and stores its address in the Service receiver. func (o *helloWorld) start(wg *sync.WaitGroup, log logger.Service, shutdownC <-chan struct{}, errC chan error, cfg OriginRequestConfig) error { - transport, err := newHTTPTransport(o, cfg) + transport, err := newHTTPTransport(o, cfg, log) if err != nil { return err } @@ -274,8 +274,8 @@ func (nrc *NopReadCloser) Close() error { return nil } -func newHTTPTransport(service OriginService, cfg OriginRequestConfig) (*http.Transport, error) { - originCertPool, err := tlsconfig.LoadOriginCA(cfg.CAPool, nil) +func newHTTPTransport(service OriginService, cfg OriginRequestConfig, log logger.Service) (*http.Transport, error) { + originCertPool, err := tlsconfig.LoadOriginCA(cfg.CAPool, log) if err != nil { return nil, errors.Wrap(err, "Error loading cert pool") }