TLSConfig configures the options for TLS connections.
| 1324 | |
| 1325 | // TLSConfig configures the options for TLS connections. |
| 1326 | type TLSConfig struct { |
| 1327 | // Text of the CA cert to use for the targets. |
| 1328 | CA string `yaml:"ca,omitempty" json:"ca,omitempty"` |
| 1329 | // Text of the client cert file for the targets. |
| 1330 | Cert string `yaml:"cert,omitempty" json:"cert,omitempty"` |
| 1331 | // Text of the client key file for the targets. |
| 1332 | Key Secret `yaml:"key,omitempty" json:"key,omitempty"` |
| 1333 | // The CA cert to use for the targets. |
| 1334 | CAFile string `yaml:"ca_file,omitempty" json:"ca_file,omitempty"` |
| 1335 | // The client cert file for the targets. |
| 1336 | CertFile string `yaml:"cert_file,omitempty" json:"cert_file,omitempty"` |
| 1337 | // The client key file for the targets. |
| 1338 | KeyFile string `yaml:"key_file,omitempty" json:"key_file,omitempty"` |
| 1339 | // CARef is the name of the secret within the secret manager to use as the CA cert for the |
| 1340 | // targets. |
| 1341 | CARef string `yaml:"ca_ref,omitempty" json:"ca_ref,omitempty"` |
| 1342 | // CertRef is the name of the secret within the secret manager to use as the client cert for |
| 1343 | // the targets. |
| 1344 | CertRef string `yaml:"cert_ref,omitempty" json:"cert_ref,omitempty"` |
| 1345 | // KeyRef is the name of the secret within the secret manager to use as the client key for |
| 1346 | // the targets. |
| 1347 | KeyRef string `yaml:"key_ref,omitempty" json:"key_ref,omitempty"` |
| 1348 | // Used to verify the hostname for the targets. |
| 1349 | ServerName string `yaml:"server_name,omitempty" json:"server_name,omitempty"` |
| 1350 | // Disable target certificate validation. |
| 1351 | InsecureSkipVerify bool `yaml:"insecure_skip_verify" json:"insecure_skip_verify"` |
| 1352 | // Minimum TLS version. |
| 1353 | MinVersion TLSVersion `yaml:"min_version,omitempty" json:"min_version,omitempty"` |
| 1354 | // Maximum TLS version. |
| 1355 | MaxVersion TLSVersion `yaml:"max_version,omitempty" json:"max_version,omitempty"` |
| 1356 | } |
| 1357 | |
| 1358 | // SetDirectory joins any relative file paths with dir. |
| 1359 | func (c *TLSConfig) SetDirectory(dir string) { |
nothing calls this directly
no outgoing calls
no test coverage detected