crypto/x509: add test for v1 intermediates.
crypto/x509: add test for v1 intermediates.

X.509v1 certificates are ancient and should be dead. (They are even
prohibited by the Baseline requirements, section 7.1.1.)

However, there are a number of v1 roots from the 1990's that are still
in operation. Thus crypto/x509.Certificate.CheckSignatureFrom allows
X.509v1 certificates to sign other certificates.

The chain building code, however, only allows v1 certificates to sign
others if they're a root. This change adds a test to check that.

Change-Id: Ib8d81e522f30d41932b89bdf3b19ef3782d8ec12
Reviewed-on: https://go-review.googlesource.com/34383
Run-TryBot: Brad Fitzpatrick <ae9783c0b0efc69cd85ab025ddd17aa44cdc4aa5@golang.org>
TryBot-Result: Gobot Gobot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: Brad Fitzpatrick <ae9783c0b0efc69cd85ab025ddd17aa44cdc4aa5@golang.org>

derekmarcotte/go,codestation/go,nawawi/go,vsekhar/elastic-go,codestation/go,akutz/go,Cofyc/go,vsekhar/elastic-go,ImJasonH/go,cloudflare/go,akutz/go,Cofyc/go,derekmarcotte/go,akutz/go,ImJasonH/go,nawawi/go,ImJasonH/go,josharian/go,linux-on-ibm-z/go,nawawi/go,Cofyc/go,josharian/go,ImJasonH/go,polyverse-security/go,cloudflare/go,josharian/go,polyverse-security/go,codestation/go,cloudflare/go,vsekhar/elastic-go,codestation/go,golang/go,CAFxX/go,linux-on-ibm-z/go,polyverse-security/go,codestation/go,codestation/go,Cofyc/go,derekmarcotte/go,cloudflare/go,codestation/go,akutz/go,josharian/go,derekmarcotte/go,CAFxX/go,nawawi/go,Cofyc/go,josharian/go,linux-on-ibm-z/go,vsekhar/elastic-go,polyverse-security/go,Cofyc/go,polyverse-security/go,ImJasonH/go,golang/go,christopher-henderson/Go,ImJasonH/go,vsekhar/elastic-go,CAFxX/go,cloudflare/go,derekmarcotte/go,golang/go,derekmarcotte/go,josharian/go,Cofyc/go,golang/go,nawawi/go,nawawi/go,vsekhar/elastic-go,polyverse-security/go,cloudflare/go,akutz/go,linux-on-ibm-z/go,derekmarcotte/go,golang/go,golang/go,Cofyc/go,akutz/go,linux-on-ibm-z/go,cloudflare/go,nawawi/go,cloudflare/go,polyverse-security/go,linux-on-ibm-z/go,CAFxX/go,linux-on-ibm-z/go,CAFxX/go,linux-on-ibm-z/go,nawawi/go,derekmarcotte/go,codestation/go,vsekhar/elastic-go,polyverse-security/go,akutz/go,josharian/go,ImJasonH/go,CAFxX/go,vsekhar/elastic-go,akutz/go,josharian/go,golang/go,golang/go,CAFxX/go,ImJasonH/go,CAFxX/go