Skip to content

Commit ef48e17

Browse files
committed
caddytls: Fix tests
1 parent fe03c1a commit ef48e17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

caddytls/handshake.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func (cg configGroup) GetConfigForClient(clientHello *tls.ClientHelloInfo) (*tls
9999
//
100100
// This method is safe for use as a tls.Config.GetCertificate callback.
101101
func (cfg *Config) GetCertificate(clientHello *tls.ClientHelloInfo) (*tls.Certificate, error) {
102-
if ClientHelloTelemetry {
102+
if ClientHelloTelemetry && len(clientHello.SupportedVersions) > 0 {
103103
// If no other plugin (such as the HTTP server type) is implementing ClientHello telemetry, we do it.
104104
// NOTE: The values in the Go standard lib's ClientHelloInfo aren't guaranteed to be in order.
105105
info := ClientHelloInfo{

0 commit comments

Comments
 (0)