crypto/tls: wrap handshake errors #48151
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Not sure
What operating system and processor architecture are you using (
go env
)?Busybox OS, ARM architecture
go env
OutputWhat did you do?
We are trying to print the certs in the event when the cert based handshake fails.
What did you expect to see?
In the event of invalid certs being provided to establish a connection the tls handshake should fail, and trying to print the bad certificate using errors.As should log the certificate.
What did you see instead?
From the code it looks like its done wrong for client certs.
chains, err := certs[0].Verify(opts)
if err != nil {
c.sendAlert(alertBadCertificate)
return errors.New("tls: failed to verify client certificate: " + err.Error())
}
The text was updated successfully, but these errors were encountered: