mirror of
https://github.com/prometheus/node_exporter.git
synced 2025-01-03 09:57:47 -08:00
TLS: only support TLS 1.2
TLS 1.0 and 1.1 are deprecated by major vendors (e.g. browsers). Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
This commit is contained in:
parent
091bed01b0
commit
0ef1d4dc15
|
@ -50,7 +50,9 @@ func getTLSConfig(configPath string) (*tls.Config, error) {
|
||||||
|
|
||||||
// ConfigToTLSConfig generates the golang tls.Config from the TLSStruct config.
|
// ConfigToTLSConfig generates the golang tls.Config from the TLSStruct config.
|
||||||
func ConfigToTLSConfig(c *TLSStruct) (*tls.Config, error) {
|
func ConfigToTLSConfig(c *TLSStruct) (*tls.Config, error) {
|
||||||
cfg := &tls.Config{}
|
cfg := &tls.Config{
|
||||||
|
MinVersion: tls.VersionTLS12,
|
||||||
|
}
|
||||||
if len(c.TLSCertPath) == 0 {
|
if len(c.TLSCertPath) == 0 {
|
||||||
return nil, errors.New("missing TLSCertPath")
|
return nil, errors.New("missing TLSCertPath")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue