Skip to content

Commit

Permalink
Fix supported tls versions for go 1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
Stan Putrya committed Aug 12, 2019
1 parent 016b5db commit 52e64cc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion internal/tls/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ func ParseTLSVersion(version string) (uint16, error) {
"TLS10": tls.VersionTLS10,
"TLS11": tls.VersionTLS11,
"TLS12": tls.VersionTLS12,
"TLS13": tls.VersionTLS13,
// for go >= 1.12
//"TLS13": tls.VersionTLS13,
}
if v, ok := versionMap[version]; ok {
return v, nil
Expand Down
4 changes: 2 additions & 2 deletions plugins/outputs/prometheus_client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ This plugin starts a [Prometheus](https://prometheus.io/) Client, it exposes all

## contains the maximum SSL/TLS version that is acceptable.
## If not set, then the maximum version supported by this package is used,
## which is currently TLS 1.3.
# tls_max_version = "TLS13"
## which is currently TLS 1.2 (for go < 1.12) or TLS 1.3 (for go >= 1.12).
# tls_max_version = "TLS12"

## Export metric collection time.
# export_timestamp = false
Expand Down
4 changes: 2 additions & 2 deletions testutil/tls.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ func (p *pki) CipherSuite() string {
}

func (p *pki) TLSMinVersion() string {
return "TLS12"
return "TLS11"
}

func (p *pki) TLSMaxVersion() string {
return "TLS13"
return "TLS12"
}

func (p *pki) ReadClientCert() string {
Expand Down

0 comments on commit 52e64cc

Please sign in to comment.