From af3999835f33943c7d63aa1cfc70e64e94319eca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Werner?= Date: Mon, 16 Oct 2023 10:35:42 +0200 Subject: [PATCH] Add more description to GetClientInfo --- ctx.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ctx.go b/ctx.go index a5ba85f947..34d49a9b11 100644 --- a/ctx.go +++ b/ctx.go @@ -104,8 +104,9 @@ type TLSHandler struct { clientHelloInfo *tls.ClientHelloInfo } -// GetClientInfo Callback function to set CHI -// TODO: Why is this a getter which sets stuff? +// GetClientInfo Callback function to set ClientHelloInfo +// Must comply with the method structure of https://cs.opensource.google/go/go/+/refs/tags/go1.20:src/crypto/tls/common.go;l=554-563 +// Since we overlay the method of the tls config in the listener method func (t *TLSHandler) GetClientInfo(info *tls.ClientHelloInfo) (*tls.Certificate, error) { t.clientHelloInfo = info return nil, nil //nolint:nilnil // Not returning anything useful here is probably fine