diff --git a/pkg/innerring/innerring.go b/pkg/innerring/innerring.go index 5dea18f9d..86424abef 100644 --- a/pkg/innerring/innerring.go +++ b/pkg/innerring/innerring.go @@ -463,9 +463,20 @@ func createClient(ctx context.Context, p *chainParams, errChan chan<- error) (*c priority = defaultPriority } + var mtlsConfig *client.MTLSConfig + rootCAs := p.cfg.GetStringSlice(fmt.Sprintf("%s.%d.trusted_ca_list", section, i)) + if len(rootCAs) != 0 { + mtlsConfig = &client.MTLSConfig{ + TrustedCAList: rootCAs, + KeyFile: p.cfg.GetString(fmt.Sprintf("%s.%d.key", section, i)), + CertFile: p.cfg.GetString(fmt.Sprintf("%s.%d.certificate", section, i)), + } + } + endpoints = append(endpoints, client.Endpoint{ - Address: addr, - Priority: priority, + Address: addr, + Priority: priority, + MTLSConfig: mtlsConfig, }) }