@@ -19635,11 +19635,9 @@ func addMultipleCertSlotTests() {
1963519635 ed25519CertSlot := []string{
1963619636 multipleCertsFlag, path.Join(*resourceDir, getShimCertificate(testCertEd25519)) + "," + path.Join(*resourceDir, getShimKey(testCertEd25519)),
1963719637 }
19638- certificateSlotFlags := []string{
19639- rsaCertSlot[0], rsaCertSlot[1],
19640- ecdsaCertSlot[0], ecdsaCertSlot[1],
19641- ed25519CertSlot[0], ed25519CertSlot[1],
19642- }
19638+ certificateSlotFlags := append([]string{}, rsaCertSlot...)
19639+ certificateSlotFlags = append(certificateSlotFlags, ecdsaCertSlot...)
19640+ certificateSlotFlags = append(certificateSlotFlags, ed25519CertSlot...)
1964319641
1964419642 signError := ":NO_COMMON_SIGNATURE_ALGORITHMS:"
1964519643 signLocalError := "remote error: handshake failure"
@@ -19686,10 +19684,11 @@ func addMultipleCertSlotTests() {
1968619684 MaxVersion: ver.version,
1968719685 VerifySignatureAlgorithms: allAlgorithms,
1968819686 },
19689- flags: append(
19690- certificateSlotFlags,
19691- curveFlags...,
19692- ),
19687+ flags: func() []string {
19688+ flags := append([]string{}, certificateSlotFlags...)
19689+ flags = append(flags, curveFlags...)
19690+ return flags
19691+ }(),
1969319692 expectations: connectionExpectations{
1969419693 peerSignatureAlgorithm: alg.id,
1969519694 },
@@ -19722,10 +19721,11 @@ func addMultipleCertSlotTests() {
1972219721 ClientAuth: RequireAnyClientCert,
1972319722 Certificates: []Certificate{rsaCertificate, ecdsaP256Certificate, ed25519Certificate},
1972419723 },
19725- flags: append(
19726- certificateSlotFlags,
19727- curveFlags...,
19728- ),
19724+ flags: func() []string {
19725+ flags := append([]string{}, certificateSlotFlags...)
19726+ flags = append(flags, curveFlags...)
19727+ return flags
19728+ }(),
1972919729 }
1973019730 if alg.id != signatureEd25519 {
1973119731 // ED25519 is the last certificate set in |certificateSlotFlags|. We don't support multiple certificate
0 commit comments