peap: fix encode

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens Langhammer
2025-05-23 23:12:40 +02:00
parent e36373ceab
commit 2a567ccc85
2 changed files with 17 additions and 12 deletions

View File

@ -34,7 +34,7 @@ func (p *Packet) HandleRadiusPacket(w radius.ResponseWriter, r *radius.Request)
p.state = rst
rp := &Packet{r: r}
rep, err := p.handleInner()
rep, err := p.handleEAP(p.eap, p.stm)
rp.eap = rep
rres := r.Response(radius.CodeAccessReject)
@ -155,10 +155,6 @@ func (p *Packet) handleEAP(pp protocol.Payload, stm protocol.StateManager) (*eap
return res, nil
}
func (p *Packet) handleInner() (*eap.Payload, error) {
return p.handleEAP(p.eap, p.stm)
}
func (p *Packet) setMessageAuthenticator(rp *radius.Packet) error {
_ = rfc2869.MessageAuthenticator_Set(rp, make([]byte, 16))
hash := hmac.New(md5.New, rp.Secret)