]> Cypherpunks repositories - gostls13.git/commit
crypto/tls: call GetCertificate if Certificates is empty.
authorAdam Langley <agl@golang.org>
Sun, 12 Apr 2015 23:41:31 +0000 (16:41 -0700)
committerAdam Langley <agl@golang.org>
Sun, 26 Apr 2015 22:00:35 +0000 (22:00 +0000)
commitcba882ea9ba9ccfc718d995a0d787280c4009668
tree6b0cb1b18e98743e529910bf905aa988d5acd736
parentac2bf8ad06e435f1cfdcd1acc87f7e9f51794a79
crypto/tls: call GetCertificate if Certificates is empty.

This change causes the GetCertificate callback to be called if
Certificates is empty. Previously this configuration would result in an
error.

This allows people to have servers that depend entirely on dynamic
certificate selection, even when the client doesn't send SNI.

Fixes #9208.

Change-Id: I2f5a5551215958b88b154c64a114590300dfc461
Reviewed-on: https://go-review.googlesource.com/8792
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Adam Langley <agl@golang.org>
src/crypto/tls/common.go
src/crypto/tls/handshake_server.go
src/crypto/tls/handshake_server_test.go