diff --git a/security/advancedtls/advancedtls_test.go b/security/advancedtls/advancedtls_test.go index a7ecf276..67c0b9db 100644 --- a/security/advancedtls/advancedtls_test.go +++ b/security/advancedtls/advancedtls_test.go @@ -867,8 +867,8 @@ func (s) TestGetCertificatesSNI(t *testing.T) { if err != nil { t.Fatalf("serverConfig.GetCertificate(clientHello) failed: %v", err) } - if !cmp.Equal(*gotCertificate, test.wantCert, cmp.AllowUnexported(big.Int{})) { - t.Errorf("GetCertificates() = %v, want %v", *gotCertificate, test.wantCert) + if !gotCertificate.Leaf.Equal(test.wantCert.Leaf) { + t.Errorf("GetCertificates() returned leaf certificate does not match expected (-want +got):\n%s", cmp.Diff(test.wantCert, *gotCertificate, cmp.AllowUnexported(big.Int{}))) } }) }