Add named security profiles to tls.Config
tls.Config has many separate knobs (cipher suites, versions, curves), and choosing them well is hard. Code that pins values today, such as CurvePreferences, also misses future improvements like post-quantum key exchange. Old algorithms are re-enabled through a growing list of separate GODEBUG settings.
The proposal adds a Profile field to tls.Config and introduces two named profiles in addition to the default one:
ProfileModern— stronger than the default, works with modern browsers and TLS stacks.ProfileCompatibleButLessSecure— supports older peers, with weaker guarantees.
cfg := &tls.Config{
Profile: tls.ProfileModern,
}
A profile controls all negotiated algorithms and X.509 certificate validation. An empty Profile keeps safe, broadly compatible defaults.
Profiles change over time to follow best practices. Their behavior follows the go version in the main module's go.mod. A single tls GODEBUG setting, such as GODEBUG=tls=go1.28, restores the behavior of up to four earlier versions.
The contents of each named profile will be decided in a separate proposal.
- Proposal
- #79043 by thatnealpatel
- Status
- Likely accept on Nov 18, 2026
- Impact
- medium
- Area
- crypto/tls