Author | Forum: PowerSNMP for .NET Topic: SNMPv3 Agent Authentication not working on CF |
AleSantaCruz From: Germany Posts: 2 Member Since: 02/23/15 |
posted February 18, 2016 12:36 PM Hello, I used your examples to create an SNMPv3 agent but apparently doesnt work. When I receive a set or get request with any invalid security parameters, my agent will still reply to the the request. When initializing the objects: agent.AuthoritativeEngine.Users.Add(user, new Passwords(auth_pass, auth_prot, priv, priv_prot)); selectedSecurity = new Security(); selectedSecurity.Username = user; selectedSecurity.AuthenticationPassword = auth_pass; selectedSecurity.AuthenticationProtocol = auth_prot; selectedSecurity.PrivacyPassword = priv; selectedSecurity.PrivacyProtocol = priv_prot; then on the request received function: (exactlty like in the examples) agent.Marshal(new RequestMessage[] { request }, null); ResponseMessage response = agent.CreateDefaultResponse(request); agent.Send(response, request.Origin); if (response.ErrorStatus != ErrorStatus.Success) return; when it didnt work, I tried to compare the received "security" manually, to create an error response myself, but it fails since the security object seems to come empty. if (!((snmpVersion == request.Version) &&(selectedSecurity.Username == request.Security.Username) &&(selectedSecurity.AuthenticationProtocol == request.Security.AuthenticationProtocol) &&(selectedSecurity.AuthenticationPassword==request.Security.AuthenticationPassword) &&(selectedSecurity.PrivacyProtocol==request.Security.PrivacyProtocol) &&(selectedSecurity.PrivacyPassword==request.Security.PrivacyPassword))) { agent.Marshal(new Exception("Auth error")); response = new ResponseMessage(); response.ErrorStatus = ErrorStatus.AuthorizationError; agent.Send(response, request.Origin); return; } Any Ideas? |
Jamie Powell (Admin) From: Rome, NY USA Posts: 448 Member Since: 03/13/07 Extra Support Options Custom Application Development |
posted February 22, 2016 5:25 PM Thank you for your post. A reply has been sent to you off-line, in response to your support email. Please let me know if you have not received this reply and I will be happy to resend. All the best, Jamie |
Reply | PowerSNMP for .NET Topics | Forums |
This site is powered by PowerTCP WebServer for ActiveX |