diff --git a/handshake_server.go b/handshake_server.go index 0d90765..8f0ed1f 100644 --- a/handshake_server.go +++ b/handshake_server.go @@ -228,7 +228,7 @@ Curves: for _, id := range hs.clientHello.cipherSuites { if id == TLS_FALLBACK_SCSV { // The client is doing a fallback connection. - if hs.clientHello.vers < c.config.MaxVersion { + if hs.clientHello.vers < c.config.maxVersion() { c.sendAlert(alertInappropriateFallback) return false, errors.New("tls: client using inppropriate protocol fallback") } diff --git a/handshake_server_test.go b/handshake_server_test.go index 0338af4..f954546 100644 --- a/handshake_server_test.go +++ b/handshake_server_test.go @@ -716,8 +716,12 @@ func TestResumptionDisabled(t *testing.T) { } func TestFallbackSCSV(t *testing.T) { + serverConfig := &Config{ + Certificates: testConfig.Certificates, + } test := &serverTest{ - name: "FallbackSCSV", + name: "FallbackSCSV", + config: serverConfig, // OpenSSL 1.0.1j is needed for the -fallback_scsv option. command: []string{"openssl", "s_client", "-fallback_scsv"}, expectHandshakeErrorIncluding: "inppropriate protocol fallback",