crypto/x509: abstract SAN parsing function
crypto/x509: abstract SAN parsing function

We'll need this for handling name constraints during verification.

Change-Id: I4ef19d9489fb2a9ae9a62699d81cef92a21fda28
Reviewed-on: https://go-review.googlesource.com/62692
Run-TryBot: Adam Langley <db68fba232b2c49ed3e9d3081df349dde7b61dfd@golang.org>
TryBot-Result: Gobot Gobot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>
Reviewed-by: David Crawshaw <a2f0bf29257797dd66800b4fbb9945c3e216c004@golang.org>

golang/go,josharian/go,cloudflare/go,codestation/go,codestation/go,CAFxX/go,CAFxX/go,Cofyc/go,polyverse-security/go,golang/go,golang/go,cloudflare/go,christopher-henderson/Go,CAFxX/go,cloudflare/go,polyverse-security/go,josharian/go,CAFxX/go,josharian/go,nawawi/go,akutz/go,josharian/go,codestation/go,Cofyc/go,polyverse-security/go,Cofyc/go,akutz/go,polyverse-security/go,nawawi/go,golang/go,codestation/go,polyverse-security/go,nawawi/go,akutz/go,akutz/go,codestation/go,cloudflare/go,codestation/go,Cofyc/go,josharian/go,Cofyc/go,cloudflare/go,Cofyc/go,golang/go,CAFxX/go,josharian/go,polyverse-security/go,Cofyc/go,akutz/go,CAFxX/go,akutz/go,Cofyc/go,josharian/go,nawawi/go,golang/go,nawawi/go,golang/go,cloudflare/go,akutz/go,cloudflare/go,nawawi/go,cloudflare/go,nawawi/go,codestation/go,CAFxX/go,CAFxX/go,polyverse-security/go,golang/go,josharian/go,nawawi/go,codestation/go,polyverse-security/go,akutz/go