SetClientCertKeyPairFromFile updates the properties to set client certificates for mutual authenticated TLS remote requests
(certFile string, keyFile string)
| 399 | // SetClientCertKeyPairFromFile updates the properties to set client certificates for mutual |
| 400 | // authenticated TLS remote requests |
| 401 | func (p *Signing) SetClientCertKeyPairFromFile(certFile string, keyFile string) error { |
| 402 | if certFile != "" && keyFile != "" { |
| 403 | cert, err := helpers.LoadClientCertificate(certFile, keyFile) |
| 404 | if err != nil { |
| 405 | return err |
| 406 | } |
| 407 | for _, profile := range p.Profiles { |
| 408 | profile.ClientCert = cert |
| 409 | } |
| 410 | p.Default.ClientCert = cert |
| 411 | } |
| 412 | return nil |
| 413 | } |
| 414 | |
| 415 | // SetRemoteCAsFromFile reads root CAs from file and updates the properties to set remote CAs for TLS |
| 416 | // remote requests |