MCPcopy Create free account
hub / github.com/cloudflare/cfssl / SetClientCertKeyPairFromFile

Method SetClientCertKeyPairFromFile

config/config.go:401–413  ·  view source on GitHub ↗

SetClientCertKeyPairFromFile updates the properties to set client certificates for mutual authenticated TLS remote requests

(certFile string, keyFile string)

Source from the content-addressed store, hash-verified

399// SetClientCertKeyPairFromFile updates the properties to set client certificates for mutual
400// authenticated TLS remote requests
401func (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

Callers 3

SignerFromConfigAndDBFunction · 0.95
remoteTLSInfoFunction · 0.80
remoteTLSSignFunction · 0.80

Calls 1

LoadClientCertificateFunction · 0.92

Tested by 2

remoteTLSInfoFunction · 0.64
remoteTLSSignFunction · 0.64