What version of Go are you using (go version)?
$ go version
1.19.6 darwin/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
What did you do?
https://go.dev/play/p/tE0FcCY4HfS
In short, the leaf certificate is self-signed. There is an intermediate certificate that has the same subject/key as the leaf that was signed by the root.
We encountered this issue while attempting to upgrade from 1.18 to 1.19. The linked code works correctly in 1.18, but gets rejected with "x509: certificate signed by unknown authority" in 1.19+.
What did you expect to see?
Certificate.Verify should succeed with a chain from leaf to intermediate to root.
What did you see instead?
It rejects the self-signed leaf.
What version of Go are you using (
go version)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env)?go envOutputWhat did you do?
https://go.dev/play/p/tE0FcCY4HfS
In short, the leaf certificate is self-signed. There is an intermediate certificate that has the same subject/key as the leaf that was signed by the root.
We encountered this issue while attempting to upgrade from 1.18 to 1.19. The linked code works correctly in 1.18, but gets rejected with "x509: certificate signed by unknown authority" in 1.19+.
What did you expect to see?
Certificate.Verifyshould succeed with a chain from leaf to intermediate to root.What did you see instead?
It rejects the self-signed leaf.