From ff8dd64c527b3afc98d9ebb81e8845b874dc6114 Mon Sep 17 00:00:00 2001 From: Theunis Botha Date: Mon, 17 May 2021 15:04:40 +0200 Subject: [PATCH] added support for aes192c and aes256c privacy protocol Signed-off-by: Theunis Botha --- config/config.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config/config.go b/config/config.go index 663c7bc0..c1472eee 100644 --- a/config/config.go +++ b/config/config.go @@ -95,7 +95,7 @@ func (c *Module) UnmarshalYAML(unmarshal func(interface{}) error) error { if wp.Auth.PrivPassword == "" { return fmt.Errorf("priv password is missing, required for SNMPv3 with priv") } - if wp.Auth.PrivProtocol != "DES" && wp.Auth.PrivProtocol != "AES" && wp.Auth.PrivProtocol != "AES192" && wp.Auth.PrivProtocol != "AES256" { + if wp.Auth.PrivProtocol != "DES" && wp.Auth.PrivProtocol != "AES" && wp.Auth.PrivProtocol != "AES192" && wp.Auth.PrivProtocol != "AES192C" && wp.Auth.PrivProtocol != "AES256" && wp.Auth.PrivProtocol != "AES256C" { return fmt.Errorf("priv protocol must be DES or AES") } fallthrough @@ -174,8 +174,12 @@ func (c WalkParams) ConfigureSNMP(g *gosnmp.GoSNMP) { usm.PrivacyProtocol = gosnmp.AES case "AES192": usm.PrivacyProtocol = gosnmp.AES192 + case "AES192C": + usm.PrivacyProtocol = gosnmp.AES192C case "AES256": usm.PrivacyProtocol = gosnmp.AES256 + case "AES256C": + usm.PrivacyProtocol = gosnmp.AES256C } } g.SecurityParameters = usm