What version of Go are you using (go version)?
$ go version
1.14.12
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 Output
$ go env
What 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())
}
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 envOutputWhat 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())
}