Alternative TLS implementation in Go
Go to file
Adam Langley 93eb884c98 crypto/tls: use pool building for certificate checking
Previously we checked the certificate chain from the leaf
upwards and expected to jump from the last cert in the chain to
a root certificate.

Although technically correct, there are a number of sites with
problems including out-of-order certs, superfluous certs and
missing certs.

The last of these requires AIA chasing, which is a lot of
complexity. However, we can address the more common cases by
using a pool building algorithm, as browsers do.

We build a pool of root certificates and a pool from the
server's chain. We then try to build a path to a root
certificate, using either of these pools.

This differs from the behaviour of, say, Firefox in that Firefox
will accumulate intermedite certificate in a persistent pool in
the hope that it can use them to fill in gaps in future chains.

We don't do that because it leads to confusing errors which only
occur based on the order to sites visited.

This change also enabled SNI for tls.Dial so that sites will return
the correct certificate chain.

R=rsc
CC=golang-dev
https://golang.org/cl/2916041
2010-11-05 09:54:56 -04:00
alert.go crypto/tls: simpler implementation of record layer 2010-04-26 22:19:04 -07:00
ca_set.go crypto/tls: use pool building for certificate checking 2010-11-05 09:54:56 -04:00
common.go crypto/tls: client certificate support. 2010-08-16 11:22:22 -04:00
conn.go crypto/tls: make SetReadTimeout work. 2010-10-11 10:41:01 -04:00
generate_cert.go log: new interface 2010-10-12 12:59:18 -07:00
handshake_client.go crypto/tls: use pool building for certificate checking 2010-11-05 09:54:56 -04:00
handshake_messages_test.go crypto/tls: client certificate support. 2010-08-16 11:22:22 -04:00
handshake_messages.go use append 2010-10-27 19:47:23 -07:00
handshake_server_test.go gofmt -s -w src misc 2010-10-22 10:06:33 -07:00
handshake_server.go gofmt -s -w src misc 2010-10-22 10:06:33 -07:00
Makefile build: no required environment variables 2010-08-18 10:08:49 -04:00
prf_test.go gofmt -s -w src misc 2010-10-22 10:06:33 -07:00
prf.go crypto/hmac: make Sum idempotent 2010-08-26 13:32:29 -04:00
tls.go crypto/tls: use pool building for certificate checking 2010-11-05 09:54:56 -04:00