forked from TrueCloudLab/frostfs-node
[#1170] innerring: Support morph mTLS
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
a0e49fa5a5
commit
96fe271bab
1 changed files with 13 additions and 2 deletions
|
@ -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,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue