It was mistakenly re-enabled in CL 146217.
Updates #33837
Change-Id: I8c0e1787114c6232df5888e51e355906622295bc
Reviewed-on: https://go-review.googlesource.com/c/go/+/191877
Run-TryBot: Filippo Valsorda <filippo@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
(cherry picked from commit
2ebc3d8157fedba633ce90c5454827512734a793)
Reviewed-on: https://go-review.googlesource.com/c/go/+/191998
<dd>
<p>
Support for SSL version 3.0 (SSLv3) <a href="https://golang.org/issue/32716">
- is now deprecated and will be removed in Go 1.14</a>. Note that SSLv3
- <a href="https://tools.ietf.org/html/rfc7568">is cryptographically
- broken</a>, is already disabled by default in <code>crypto/tls</code>,
- and was never supported by Go clients.
+ is now deprecated and will be removed in Go 1.14</a>. Note that SSLv3 is the
+ <a href="https://tools.ietf.org/html/rfc7568">cryptographically broken</a>
+ protocol predating TLS.
+ </p>
+
+ <p>
+ SSLv3 was always disabled by default, other than in Go 1.12, when it was
+ mistakenly enabled by default server-side. It is now again disabled by
+ default. (SSLv3 was never supported client-side.)
</p>
<p><!-- CL 177698 -->
func (c *Config) supportedVersions(isClient bool) []uint16 {
versions := make([]uint16, 0, len(supportedVersions))
for _, v := range supportedVersions {
+ // TLS 1.0 is the default minimum version.
+ if (c == nil || c.MinVersion == 0) && v < VersionTLS10 {
+ continue
+ }
if c != nil && c.MinVersion != 0 && v < c.MinVersion {
continue
}
}, "unsupported versions")
}
+func TestSSLv3OptIn(t *testing.T) {
+ config := testConfig.Clone()
+ config.MinVersion = 0
+ testClientHelloFailure(t, config, &clientHelloMsg{
+ vers: VersionSSL30,
+ random: make([]byte, 32),
+ }, "unsupported versions")
+ testClientHelloFailure(t, config, &clientHelloMsg{
+ vers: VersionTLS12,
+ supportedVersions: []uint16{VersionSSL30},
+ random: make([]byte, 32),
+ }, "unsupported versions")
+}
+
func TestNoSuiteOverlap(t *testing.T) {
clientHello := &clientHelloMsg{
vers: VersionTLS10,