Skip to content

crypto/tls: GetClientCertificate is not preserved by Clone #19264

Description

@bhiggins

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

1.8 (this feature was introduced in 1.8)

What operating system and processor architecture are you using (go env)?

Linux (but it doesn't matter here)

What did you do?

Used tls.Dial (or tls.DialWithDialer) without setting ServerName in Config.

What did you expect to see?

A successful connection.

What did you see instead?

"remote error: tls: bad certificate" on the client and "tls: client didn't provide a certificate" on the server.

Workaround: set ServerName so that the config isn't cloned by tls.DialWithDialer.

(BTW, maybe it would be useful in unit tests to clone configs immediately before use.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeWaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions