Files
authentik/internal/outpost/radius/eap/protocol/tls/inner.go
Jens Langhammer 82c177b7eb try to make this work
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
2025-07-01 22:43:00 +02:00

30 lines
753 B
Go

package tls
import (
"goauthentik.io/internal/outpost/radius/eap/protocol"
)
func (p *Payload) innerHandler(ctx protocol.Context) {
// p.st.TLS.read
// d, _ := io.ReadAll(p.st.TLS)
err := p.Inner.Decode([]byte{})
if err != nil {
ctx.Log().WithError(err).Warning("TLS: failed to decode inner protocol")
ctx.EndInnerProtocol(protocol.StatusError, nil)
return
}
pl := p.Inner.Handle(ctx.ForInnerProtocol(p.Inner.Type()))
enc, err := pl.Encode()
if err != nil {
ctx.Log().WithError(err).Warning("failed to encode inner protocol")
}
// p.st.Conn.expectedWriterByteCount = len(enc)
_, err = p.st.TLS.Write(enc)
if err != nil {
ctx.Log().WithError(err).Warning("failed to write to TLS")
}
// return &Payload{
// Data: enc,
// }
}