diff options
author | François Andriot <francois.andriot@free.fr> | 2021-10-03 11:03:10 +0200 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2021-10-04 00:38:15 +0900 |
commit | 346b514ebcc408372ca70e605a0930426169818e (patch) | |
tree | 81305659a2e0fe5e8b564584bdfb364c220bb93e /ksim | |
parent | 3a2e5f08d6723290bd1ae9db58431cbdda5a0bb4 (diff) | |
download | tdeutils-346b514ebcc408372ca70e605a0930426169818e.tar.gz tdeutils-346b514ebcc408372ca70e605a0930426169818e.zip |
ksim/monitors/snmp: add AES privacy protocol, conditional build of DES privacy protocolr14.0.11
Signed-off-by: François Andriot <francois.andriot@free.fr>
(cherry picked from commit 2742adaad38201278eebb61f94bb961e023b5fee)
Diffstat (limited to 'ksim')
-rw-r--r-- | ksim/monitors/snmp/session.cpp | 7 | ||||
-rw-r--r-- | ksim/monitors/snmp/snmp.cpp | 3 | ||||
-rw-r--r-- | ksim/monitors/snmp/snmp.h | 5 |
3 files changed, 13 insertions, 2 deletions
diff --git a/ksim/monitors/snmp/session.cpp b/ksim/monitors/snmp/session.cpp index 6839283..b52fe5c 100644 --- a/ksim/monitors/snmp/session.cpp +++ b/ksim/monitors/snmp/session.cpp @@ -186,9 +186,16 @@ bool Session::initialize( ErrorInfo *error ) } switch ( source.privacy.protocol ) { + case AESPrivacy: { + d->defaultSession.securityPrivProto = usmAESPrivProtocol; + d->defaultSession.securityPrivProtoLen = USM_PRIV_PROTO_AES_LEN; + break; + } case DESPrivacy: { +#ifndef NETSNMP_DISABLE_DES d->defaultSession.securityPrivProto = usmDESPrivProtocol; d->defaultSession.securityPrivProtoLen = USM_PRIV_PROTO_DES_LEN; +#endif break; } default: assert( false ); diff --git a/ksim/monitors/snmp/snmp.cpp b/ksim/monitors/snmp/snmp.cpp index 333f0d2..1256228 100644 --- a/ksim/monitors/snmp/snmp.cpp +++ b/ksim/monitors/snmp/snmp.cpp @@ -48,7 +48,8 @@ static const struct EnumStringMapInfo { MD5Auth, "MD5", 0 }, { SHA1Auth, "SHA1", 0 }, { 0, 0, 0 } -}, privacyProtocolStrings[ 2 ] = { +}, privacyProtocolStrings[ 3 ] = { + { AESPrivacy, "AES", 0 }, { DESPrivacy, "DES", 0 }, { 0, 0, 0 } }; diff --git a/ksim/monitors/snmp/snmp.h b/ksim/monitors/snmp/snmp.h index c00e110..4b1e4fb 100644 --- a/ksim/monitors/snmp/snmp.h +++ b/ksim/monitors/snmp/snmp.h @@ -46,7 +46,10 @@ TQStringList allAuthenticationProtocols(); TQString authenticationProtocolToString( AuthenticationProtocol proto ); AuthenticationProtocol stringToAuthenticationProtocol( TQString string, bool *ok = 0 ); -enum PrivacyProtocol { DESPrivacy }; +enum PrivacyProtocol { + AESPrivacy, + DESPrivacy +}; TQStringList allPrivacyProtocols(); TQString privacyProtocolToString( PrivacyProtocol proto ); PrivacyProtocol stringToPrivacyProtocol( TQString string, bool *ok = 0 ); |