]> Cypherpunks repositories - gostls13.git/commit
crypto/x509: prevent chain cycles in Verify
authorAdam Langley <agl@golang.org>
Thu, 7 Jul 2011 22:06:50 +0000 (18:06 -0400)
committerAdam Langley <agl@golang.org>
Thu, 7 Jul 2011 22:06:50 +0000 (18:06 -0400)
commitd1d466f6207ff0c90e3ae079578399e86328c631
treef57f6e43f84c5eb120ae2be8d2f2546c084f81db
parent141f676bab9100cb9323297f839ef8d11b0c3e4d
crypto/x509: prevent chain cycles in Verify

It's possible to include a self-signed root certificate as an
intermediate and push Verify into a loop.

I already had a test for this so I thought that it was ok, but it
turns out that the test was void because the Verisign root certificate
doesn't contain the "IsCA" flag and so it wasn't an acceptable
intermediate certificate for that reason.

R=bradfitz
CC=golang-dev
https://golang.org/cl/4657080
src/pkg/crypto/x509/verify.go
src/pkg/crypto/x509/verify_test.go