@@ -130,7 +130,7 @@ func TestNoRC4ByDefault(t *testing.T) {
130
130
cipherSuites : []uint16 {TLS_RSA_WITH_RC4_128_SHA },
131
131
compressionMethods : []uint8 {compressionNone },
132
132
}
133
- serverConfig := testConfig .clone ()
133
+ serverConfig := testConfig .Clone ()
134
134
// Reset the enabled cipher suites to nil in order to test the
135
135
// defaults.
136
136
serverConfig .CipherSuites = nil
@@ -147,7 +147,7 @@ func TestDontSelectECDSAWithRSAKey(t *testing.T) {
147
147
supportedCurves : []CurveID {CurveP256 },
148
148
supportedPoints : []uint8 {pointFormatUncompressed },
149
149
}
150
- serverConfig := testConfig .clone ()
150
+ serverConfig := testConfig .Clone ()
151
151
serverConfig .CipherSuites = clientHello .cipherSuites
152
152
serverConfig .Certificates = make ([]Certificate , 1 )
153
153
serverConfig .Certificates [0 ].Certificate = [][]byte {testECDSACertificate }
@@ -172,7 +172,7 @@ func TestDontSelectRSAWithECDSAKey(t *testing.T) {
172
172
supportedCurves : []CurveID {CurveP256 },
173
173
supportedPoints : []uint8 {pointFormatUncompressed },
174
174
}
175
- serverConfig := testConfig .clone ()
175
+ serverConfig := testConfig .Clone ()
176
176
serverConfig .CipherSuites = clientHello .cipherSuites
177
177
// First test that it *does* work when the server's key is RSA.
178
178
testClientHello (t , serverConfig , clientHello )
@@ -265,7 +265,7 @@ func TestTLS12OnlyCipherSuites(t *testing.T) {
265
265
reply , clientErr = cli .readHandshake ()
266
266
c .Close ()
267
267
}()
268
- config := testConfig .clone ()
268
+ config := testConfig .Clone ()
269
269
config .CipherSuites = clientHello .cipherSuites
270
270
Server (s , config ).Handshake ()
271
271
s .Close ()
@@ -732,7 +732,7 @@ func TestHandshakeServerAES256GCMSHA384(t *testing.T) {
732
732
}
733
733
734
734
func TestHandshakeServerECDHEECDSAAES (t * testing.T ) {
735
- config := testConfig .clone ()
735
+ config := testConfig .Clone ()
736
736
config .Certificates = make ([]Certificate , 1 )
737
737
config .Certificates [0 ].Certificate = [][]byte {testECDSACertificate }
738
738
config .Certificates [0 ].PrivateKey = testECDSAPrivateKey
@@ -748,7 +748,7 @@ func TestHandshakeServerECDHEECDSAAES(t *testing.T) {
748
748
}
749
749
750
750
func TestHandshakeServerKeyLog (t * testing.T ) {
751
- config := testConfig .clone ()
751
+ config := testConfig .Clone ()
752
752
buf := & bytes.Buffer {}
753
753
config .KeyLogWriter = buf
754
754
@@ -785,7 +785,7 @@ func TestHandshakeServerKeyLog(t *testing.T) {
785
785
}
786
786
787
787
func TestHandshakeServerALPN (t * testing.T ) {
788
- config := testConfig .clone ()
788
+ config := testConfig .Clone ()
789
789
config .NextProtos = []string {"proto1" , "proto2" }
790
790
791
791
test := & serverTest {
@@ -806,7 +806,7 @@ func TestHandshakeServerALPN(t *testing.T) {
806
806
}
807
807
808
808
func TestHandshakeServerALPNNoMatch (t * testing.T ) {
809
- config := testConfig .clone ()
809
+ config := testConfig .Clone ()
810
810
config .NextProtos = []string {"proto3" }
811
811
812
812
test := & serverTest {
@@ -841,7 +841,7 @@ func TestHandshakeServerSNI(t *testing.T) {
841
841
// TestHandshakeServerSNICertForName is similar to TestHandshakeServerSNI, but
842
842
// tests the dynamic GetCertificate method
843
843
func TestHandshakeServerSNIGetCertificate (t * testing.T ) {
844
- config := testConfig .clone ()
844
+ config := testConfig .Clone ()
845
845
846
846
// Replace the NameToCertificate map with a GetCertificate function
847
847
nameToCert := config .NameToCertificate
@@ -863,7 +863,7 @@ func TestHandshakeServerSNIGetCertificate(t *testing.T) {
863
863
// GetCertificate method doesn't return a cert, we fall back to what's in
864
864
// the NameToCertificate map.
865
865
func TestHandshakeServerSNIGetCertificateNotFound (t * testing.T ) {
866
- config := testConfig .clone ()
866
+ config := testConfig .Clone ()
867
867
868
868
config .GetCertificate = func (clientHello * ClientHelloInfo ) (* Certificate , error ) {
869
869
return nil , nil
@@ -881,7 +881,7 @@ func TestHandshakeServerSNIGetCertificateNotFound(t *testing.T) {
881
881
func TestHandshakeServerSNIGetCertificateError (t * testing.T ) {
882
882
const errMsg = "TestHandshakeServerSNIGetCertificateError error"
883
883
884
- serverConfig := testConfig .clone ()
884
+ serverConfig := testConfig .Clone ()
885
885
serverConfig .GetCertificate = func (clientHello * ClientHelloInfo ) (* Certificate , error ) {
886
886
return nil , errors .New (errMsg )
887
887
}
@@ -900,7 +900,7 @@ func TestHandshakeServerSNIGetCertificateError(t *testing.T) {
900
900
func TestHandshakeServerEmptyCertificates (t * testing.T ) {
901
901
const errMsg = "TestHandshakeServerEmptyCertificates error"
902
902
903
- serverConfig := testConfig .clone ()
903
+ serverConfig := testConfig .Clone ()
904
904
serverConfig .GetCertificate = func (clientHello * ClientHelloInfo ) (* Certificate , error ) {
905
905
return nil , errors .New (errMsg )
906
906
}
@@ -928,7 +928,7 @@ func TestHandshakeServerEmptyCertificates(t *testing.T) {
928
928
// TestCipherSuiteCertPreferance ensures that we select an RSA ciphersuite with
929
929
// an RSA certificate and an ECDSA ciphersuite with an ECDSA certificate.
930
930
func TestCipherSuiteCertPreferenceECDSA (t * testing.T ) {
931
- config := testConfig .clone ()
931
+ config := testConfig .Clone ()
932
932
config .CipherSuites = []uint16 {TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA , TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA }
933
933
config .PreferServerCipherSuites = true
934
934
@@ -938,7 +938,7 @@ func TestCipherSuiteCertPreferenceECDSA(t *testing.T) {
938
938
}
939
939
runServerTestTLS12 (t , test )
940
940
941
- config = testConfig .clone ()
941
+ config = testConfig .Clone ()
942
942
config .CipherSuites = []uint16 {TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA , TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA }
943
943
config .Certificates = []Certificate {
944
944
{
@@ -977,7 +977,7 @@ func TestResumptionDisabled(t *testing.T) {
977
977
sessionFilePath := tempFile ("" )
978
978
defer os .Remove (sessionFilePath )
979
979
980
- config := testConfig .clone ()
980
+ config := testConfig .Clone ()
981
981
982
982
test := & serverTest {
983
983
name : "IssueTicketPreDisable" ,
@@ -1090,7 +1090,7 @@ func TestClientAuth(t *testing.T) {
1090
1090
defer os .Remove (ecdsaKeyPath )
1091
1091
}
1092
1092
1093
- config := testConfig .clone ()
1093
+ config := testConfig .Clone ()
1094
1094
config .ClientAuth = RequestClientCert
1095
1095
1096
1096
test := & serverTest {
@@ -1127,7 +1127,7 @@ func TestSNIGivenOnFailure(t *testing.T) {
1127
1127
serverName : expectedServerName ,
1128
1128
}
1129
1129
1130
- serverConfig := testConfig .clone ()
1130
+ serverConfig := testConfig .Clone ()
1131
1131
// Erase the server's cipher suites to ensure the handshake fails.
1132
1132
serverConfig .CipherSuites = nil
1133
1133
0 commit comments