Merge pull request #10457 from mkumatag/limit_ciphersuite

pkg/transport: Limit InvalidCipherSuites to TLS12
This commit is contained in:
Xiang Li 2019-02-07 13:15:32 -08:00 committed by GitHub
commit deff5588ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,9 +22,9 @@ import (
"time"
)
// TestNewTransportTLSInvalidCipherSuites expects a client with invalid
// TestNewTransportTLSInvalidCipherSuitesTLS12 expects a client with invalid
// cipher suites fail to handshake with the server.
func TestNewTransportTLSInvalidCipherSuites(t *testing.T) {
func TestNewTransportTLSInvalidCipherSuitesTLS12(t *testing.T) {
tlsInfo, del, err := createSelfCert()
if err != nil {
t.Fatalf("unable to create cert: %v", err)
@ -57,6 +57,7 @@ func TestNewTransportTLSInvalidCipherSuites(t *testing.T) {
}()
go func() {
tr, err := NewTransport(cliTLS, 3*time.Second)
tr.TLSClientConfig.MaxVersion = tls.VersionTLS12
if err != nil {
t.Fatalf("unexpected NewTransport error: %v", err)
}