]> Cypherpunks repositories - gostls13.git/commit
crypto/tls: add server side SNI support.
authorAdam Langley <agl@golang.org>
Sat, 8 Oct 2011 14:06:53 +0000 (10:06 -0400)
committerAdam Langley <agl@golang.org>
Sat, 8 Oct 2011 14:06:53 +0000 (10:06 -0400)
commit7e48cb5ffe8add9cab09155511bab063f6f1314c
treec5e020c16ff286f6848c7026cda1de89061faf0c
parent060ffabd18a6ab629aba4e2f4fb5d36b8a9ac61e
crypto/tls: add server side SNI support.

With this in place, a TLS server is capable of selecting the correct
certificate based on the client's ServerNameIndication extension.

The need to call Config.BuildNameToCertificate is unfortunate, but
adding a sync.Once to the Config structure made it uncopyable and I
felt that was too high a price to pay. Parsing the leaf certificates
in each handshake was too inefficient to consider.

R=bradfitz, rsc
CC=golang-dev
https://golang.org/cl/5151048
src/pkg/crypto/tls/common.go
src/pkg/crypto/tls/conn_test.go
src/pkg/crypto/tls/handshake_server.go