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