Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce tlscommon.SetInsecureDefaults #260

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions transport/tlscommon/versions_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ const (
TLSVersion11 TLSVersion = tls.VersionTLS11
TLSVersion12 TLSVersion = tls.VersionTLS12
TLSVersion13 TLSVersion = tls.VersionTLS13
)

var (
// TLSVersionMin is the min TLS version supported.
TLSVersionMin = TLSVersion10

Expand Down Expand Up @@ -60,6 +62,20 @@ var tlsProtocolVersions = map[string]TLSVersion{
"TLSv1.3": TLSVersion13,
}

// SetInsecureDefaults is currently a nop as the default versions have not changed.
//
// This function is used to avoid a breaking change on previous releases.
// We plan on the default minimum versions list to exclude TLS1.1, and not allow TLS1.0 in a future library update.
func SetInsecureDefaults() {
TLSVersionMin = TLSVersion10
TLSVersionDefaultMin = TLSVersion11
TLSDefaultVersions = []TLSVersion{
TLSVersion11,
TLSVersion12,
TLSVersion13,
}
}

// Intended for ECS's tls.version_protocol_field, which does not include
// numeric version and should be lower case
type TLSVersionDetails struct {
Expand Down
Loading