|
|
@@ -7,6 +7,7 @@
|
|
|
package http2
|
|
|
|
|
|
import (
|
|
|
+ "crypto/tls"
|
|
|
"net/http"
|
|
|
"testing"
|
|
|
"time"
|
|
|
@@ -64,3 +65,15 @@ func TestConfigureServerIdleTimeout_Go18(t *testing.T) {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+func TestCertClone(t *testing.T) {
|
|
|
+ c := &tls.Config{
|
|
|
+ GetClientCertificate: func(*tls.CertificateRequestInfo) (*tls.Certificate, error) {
|
|
|
+ panic("shouldn't be called")
|
|
|
+ },
|
|
|
+ }
|
|
|
+ c2 := cloneTLSConfig(c)
|
|
|
+ if c2.GetClientCertificate == nil {
|
|
|
+ t.Error("GetClientCertificate is nil")
|
|
|
+ }
|
|
|
+}
|