Skip to content

Commit 6159cb5

Browse files
committed
TUN-3546: Fix panic in tlsconfig.LoadOriginCA
1 parent ae4f687 commit 6159cb5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ingress/origin_service.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func (o *unixSocketPath) String() string {
4343
}
4444

4545
func (o *unixSocketPath) start(wg *sync.WaitGroup, log logger.Service, shutdownC <-chan struct{}, errC chan error, cfg OriginRequestConfig) error {
46-
transport, err := newHTTPTransport(o, cfg)
46+
transport, err := newHTTPTransport(o, cfg, log)
4747
if err != nil {
4848
return err
4949
}
@@ -89,7 +89,7 @@ func (o *localService) address() string {
8989
}
9090

9191
func (o *localService) start(wg *sync.WaitGroup, log logger.Service, shutdownC <-chan struct{}, errC chan error, cfg OriginRequestConfig) error {
92-
transport, err := newHTTPTransport(o, cfg)
92+
transport, err := newHTTPTransport(o, cfg, log)
9393
if err != nil {
9494
return err
9595
}
@@ -198,7 +198,7 @@ func (o *helloWorld) String() string {
198198

199199
// Start starts a HelloWorld server and stores its address in the Service receiver.
200200
func (o *helloWorld) start(wg *sync.WaitGroup, log logger.Service, shutdownC <-chan struct{}, errC chan error, cfg OriginRequestConfig) error {
201-
transport, err := newHTTPTransport(o, cfg)
201+
transport, err := newHTTPTransport(o, cfg, log)
202202
if err != nil {
203203
return err
204204
}
@@ -274,8 +274,8 @@ func (nrc *NopReadCloser) Close() error {
274274
return nil
275275
}
276276

277-
func newHTTPTransport(service OriginService, cfg OriginRequestConfig) (*http.Transport, error) {
278-
originCertPool, err := tlsconfig.LoadOriginCA(cfg.CAPool, nil)
277+
func newHTTPTransport(service OriginService, cfg OriginRequestConfig, log logger.Service) (*http.Transport, error) {
278+
originCertPool, err := tlsconfig.LoadOriginCA(cfg.CAPool, log)
279279
if err != nil {
280280
return nil, errors.Wrap(err, "Error loading cert pool")
281281
}

0 commit comments

Comments
 (0)