don't use TLS 1.3, which isn't quite right yet in Go tip (#66)

This commit is contained in:
Joshua Humphries 2018-11-15 20:27:01 -05:00 committed by GitHub
parent 0dea37ee70
commit d86529bb4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -516,6 +516,9 @@ func ClientTransportCredentials(insecureSkipVerify bool, cacertFile, clientCertF
// client certs. The serverCertFile and serverKeyFile must both not be blank.
func ServerTransportCredentials(cacertFile, serverCertFile, serverKeyFile string, requireClientCerts bool) (credentials.TransportCredentials, error) {
var tlsConf tls.Config
// TODO(jh): Remove this line once https://github.com/golang/go/issues/28779 is fixed
// in Go tip. Until then, the recently merged TLS 1.3 support breaks the TLS tests.
tlsConf.MaxVersion = tls.VersionTLS12
// Load the server certificates from disk
certificate, err := tls.LoadX509KeyPair(serverCertFile, serverKeyFile)