@@ -130,7 +130,7 @@ func TestNoRC4ByDefault(t *testing.T) {
130130 cipherSuites : []uint16 {TLS_RSA_WITH_RC4_128_SHA },
131131 compressionMethods : []uint8 {compressionNone },
132132 }
133- serverConfig := testConfig .clone ()
133+ serverConfig := testConfig .Clone ()
134134 // Reset the enabled cipher suites to nil in order to test the
135135 // defaults.
136136 serverConfig .CipherSuites = nil
@@ -147,7 +147,7 @@ func TestDontSelectECDSAWithRSAKey(t *testing.T) {
147147 supportedCurves : []CurveID {CurveP256 },
148148 supportedPoints : []uint8 {pointFormatUncompressed },
149149 }
150- serverConfig := testConfig .clone ()
150+ serverConfig := testConfig .Clone ()
151151 serverConfig .CipherSuites = clientHello .cipherSuites
152152 serverConfig .Certificates = make ([]Certificate , 1 )
153153 serverConfig .Certificates [0 ].Certificate = [][]byte {testECDSACertificate }
@@ -172,7 +172,7 @@ func TestDontSelectRSAWithECDSAKey(t *testing.T) {
172172 supportedCurves : []CurveID {CurveP256 },
173173 supportedPoints : []uint8 {pointFormatUncompressed },
174174 }
175- serverConfig := testConfig .clone ()
175+ serverConfig := testConfig .Clone ()
176176 serverConfig .CipherSuites = clientHello .cipherSuites
177177 // First test that it *does* work when the server's key is RSA.
178178 testClientHello (t , serverConfig , clientHello )
@@ -265,7 +265,7 @@ func TestTLS12OnlyCipherSuites(t *testing.T) {
265265 reply , clientErr = cli .readHandshake ()
266266 c .Close ()
267267 }()
268- config := testConfig .clone ()
268+ config := testConfig .Clone ()
269269 config .CipherSuites = clientHello .cipherSuites
270270 Server (s , config ).Handshake ()
271271 s .Close ()
@@ -732,7 +732,7 @@ func TestHandshakeServerAES256GCMSHA384(t *testing.T) {
732732}
733733
734734func TestHandshakeServerECDHEECDSAAES (t * testing.T ) {
735- config := testConfig .clone ()
735+ config := testConfig .Clone ()
736736 config .Certificates = make ([]Certificate , 1 )
737737 config .Certificates [0 ].Certificate = [][]byte {testECDSACertificate }
738738 config .Certificates [0 ].PrivateKey = testECDSAPrivateKey
@@ -748,7 +748,7 @@ func TestHandshakeServerECDHEECDSAAES(t *testing.T) {
748748}
749749
750750func TestHandshakeServerKeyLog (t * testing.T ) {
751- config := testConfig .clone ()
751+ config := testConfig .Clone ()
752752 buf := & bytes.Buffer {}
753753 config .KeyLogWriter = buf
754754
@@ -785,7 +785,7 @@ func TestHandshakeServerKeyLog(t *testing.T) {
785785}
786786
787787func TestHandshakeServerALPN (t * testing.T ) {
788- config := testConfig .clone ()
788+ config := testConfig .Clone ()
789789 config .NextProtos = []string {"proto1" , "proto2" }
790790
791791 test := & serverTest {
@@ -806,7 +806,7 @@ func TestHandshakeServerALPN(t *testing.T) {
806806}
807807
808808func TestHandshakeServerALPNNoMatch (t * testing.T ) {
809- config := testConfig .clone ()
809+ config := testConfig .Clone ()
810810 config .NextProtos = []string {"proto3" }
811811
812812 test := & serverTest {
@@ -841,7 +841,7 @@ func TestHandshakeServerSNI(t *testing.T) {
841841// TestHandshakeServerSNICertForName is similar to TestHandshakeServerSNI, but
842842// tests the dynamic GetCertificate method
843843func TestHandshakeServerSNIGetCertificate (t * testing.T ) {
844- config := testConfig .clone ()
844+ config := testConfig .Clone ()
845845
846846 // Replace the NameToCertificate map with a GetCertificate function
847847 nameToCert := config .NameToCertificate
@@ -863,7 +863,7 @@ func TestHandshakeServerSNIGetCertificate(t *testing.T) {
863863// GetCertificate method doesn't return a cert, we fall back to what's in
864864// the NameToCertificate map.
865865func TestHandshakeServerSNIGetCertificateNotFound (t * testing.T ) {
866- config := testConfig .clone ()
866+ config := testConfig .Clone ()
867867
868868 config .GetCertificate = func (clientHello * ClientHelloInfo ) (* Certificate , error ) {
869869 return nil , nil
@@ -881,7 +881,7 @@ func TestHandshakeServerSNIGetCertificateNotFound(t *testing.T) {
881881func TestHandshakeServerSNIGetCertificateError (t * testing.T ) {
882882 const errMsg = "TestHandshakeServerSNIGetCertificateError error"
883883
884- serverConfig := testConfig .clone ()
884+ serverConfig := testConfig .Clone ()
885885 serverConfig .GetCertificate = func (clientHello * ClientHelloInfo ) (* Certificate , error ) {
886886 return nil , errors .New (errMsg )
887887 }
@@ -900,7 +900,7 @@ func TestHandshakeServerSNIGetCertificateError(t *testing.T) {
900900func TestHandshakeServerEmptyCertificates (t * testing.T ) {
901901 const errMsg = "TestHandshakeServerEmptyCertificates error"
902902
903- serverConfig := testConfig .clone ()
903+ serverConfig := testConfig .Clone ()
904904 serverConfig .GetCertificate = func (clientHello * ClientHelloInfo ) (* Certificate , error ) {
905905 return nil , errors .New (errMsg )
906906 }
@@ -928,7 +928,7 @@ func TestHandshakeServerEmptyCertificates(t *testing.T) {
928928// TestCipherSuiteCertPreferance ensures that we select an RSA ciphersuite with
929929// an RSA certificate and an ECDSA ciphersuite with an ECDSA certificate.
930930func TestCipherSuiteCertPreferenceECDSA (t * testing.T ) {
931- config := testConfig .clone ()
931+ config := testConfig .Clone ()
932932 config .CipherSuites = []uint16 {TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA , TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA }
933933 config .PreferServerCipherSuites = true
934934
@@ -938,7 +938,7 @@ func TestCipherSuiteCertPreferenceECDSA(t *testing.T) {
938938 }
939939 runServerTestTLS12 (t , test )
940940
941- config = testConfig .clone ()
941+ config = testConfig .Clone ()
942942 config .CipherSuites = []uint16 {TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA , TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA }
943943 config .Certificates = []Certificate {
944944 {
@@ -977,7 +977,7 @@ func TestResumptionDisabled(t *testing.T) {
977977 sessionFilePath := tempFile ("" )
978978 defer os .Remove (sessionFilePath )
979979
980- config := testConfig .clone ()
980+ config := testConfig .Clone ()
981981
982982 test := & serverTest {
983983 name : "IssueTicketPreDisable" ,
@@ -1090,7 +1090,7 @@ func TestClientAuth(t *testing.T) {
10901090 defer os .Remove (ecdsaKeyPath )
10911091 }
10921092
1093- config := testConfig .clone ()
1093+ config := testConfig .Clone ()
10941094 config .ClientAuth = RequestClientCert
10951095
10961096 test := & serverTest {
@@ -1127,7 +1127,7 @@ func TestSNIGivenOnFailure(t *testing.T) {
11271127 serverName : expectedServerName ,
11281128 }
11291129
1130- serverConfig := testConfig .clone ()
1130+ serverConfig := testConfig .Clone ()
11311131 // Erase the server's cipher suites to ensure the handshake fails.
11321132 serverConfig .CipherSuites = nil
11331133
0 commit comments