-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Status-server request and Message-Authenticator #47
Comments
What specifically are you having trouble with? I don't see any Go code in your question. |
i am having trouble with creating a packet. i understand that i need to:
i found that
packet := radius.New(radius.CodeStatusServer, []byte(`adminsecret`))
// VALUE FreeRADIUS-Statistics-Type Authentication 1
packet.Set(radius.Type(127), radius.NewInteger(1)) i don;t know how to correctly add |
The library does not automatically populate Message-Authenticator with the packet's HMAC. See #43 (comment). |
Nice! It works. btw why all imports i can't use the library with go mod. what i did:
But since rfc2865 uses
|
if someone will be looking for the wroking code (no error handling because of example) packet := radius.New(radius.CodeStatusServer, []byte(secret))
_ = PacketType_Set(packet, PacketType_Value_AccessAccept)
_ = FreeRADIUSStatisticsType_Set(packet, FreeRADIUSStatisticsType_Value_Authentication)
_ = rfc2869.MessageAuthenticator_Set(packet, make([]byte, 16))
hash := hmac.New(md5.New, packet.Secret)
encode, _ := packet.Encode()
hash.Write(encode)
_ = rfc2869.MessageAuthenticator_Set(packet, hash.Sum(nil)) |
All of your references, including the ones in go.mod and go.sum, file should be to layeh.com/radius, not github.com/layeh/radius. |
Oh, i got it, |
this is the problem i guess |
Hi. I need to send
status-server
req to freeradius server.via
radclient
I feel like i am missing something, but I can't figure out how to do this using this library and whether it can be done at all.
Please help 🙏
The text was updated successfully, but these errors were encountered: