slight refactor

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens Langhammer
2025-05-16 13:17:51 +02:00
parent 5bc0ed6e11
commit 03075f1890
5 changed files with 99 additions and 95 deletions

View File

@ -92,7 +92,7 @@ func (p *Payload) Handle(stt any) (protocol.Payload, *State) {
log.Debug("TLS: no TLS connection in state yet, starting connection")
ctx, cancel := context.WithTimeout(context.Background(), staleConnectionTimeout*time.Second)
st.Context = ctx
st.Conn = NewTLSConnection(p.Data, st.Context)
st.Conn = NewBuffConn(p.Data, st.Context)
st.TLS = tls.Server(st.Conn, &tls.Config{
GetConfigForClient: func(ch *tls.ClientHelloInfo) (*tls.Config, error) {
log.Debugf("TLS: ClientHello: %+v\n", ch)