ClientCert will use a certificate for authentication
(certificate, key string)
| 78 | |
| 79 | // ClientCert will use a certificate for authentication |
| 80 | func ClientCert(certificate, key string) Option { |
| 81 | return func(c *CredHub) error { |
| 82 | cert, err := tls.LoadX509KeyPair(certificate, key) |
| 83 | if err != nil { |
| 84 | return err |
| 85 | } |
| 86 | c.clientCertificate = &cert |
| 87 | |
| 88 | return nil |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | // SetHttpTimeout will set the timeout for the CredHub client |
| 93 | func SetHttpTimeout(timeout *time.Duration) Option { |
no outgoing calls
no test coverage detected
searching dependent graphs…