]> Cypherpunks repositories - gostls13.git/commit
crypto/x509, crypto/tls: improve root matching and observe CA flag.
authorAdam Langley <agl@golang.org>
Mon, 20 Sep 2010 16:17:31 +0000 (12:17 -0400)
committerAdam Langley <agl@golang.org>
Mon, 20 Sep 2010 16:17:31 +0000 (12:17 -0400)
commit8e5f673dacdaefc4646e54445b92b85f07f4d045
tree5250175bd6712b5b0937ecbcaf4a2453cb08369c
parent6989f6e312d52b9f4a200cb4691206b654669b36
crypto/x509, crypto/tls: improve root matching and observe CA flag.

The key/value format of X.500 names means that it's possible to encode
a name with multiple values for, say, organisation. RFC5280
doesn't seem to consider this, but there are Verisign root
certificates which do this and, in order to find the correct
root certificate in some cases, we need to handle it.

Also, CA certificates should set the CA flag and we now check
this. After looking at the other X.509 extensions it appears
that they are universally ignored/bit rotted away so we ignore
them.

R=rsc
CC=golang-dev
https://golang.org/cl/2249042
src/pkg/crypto/tls/ca_set.go
src/pkg/crypto/tls/handshake_client.go
src/pkg/crypto/x509/x509.go
src/pkg/crypto/x509/x509_test.go