我使用pysnmp
Python lib来发送陷阱,使用snmptrap
命令行工具来接收,但当我使用AES加密时,客户端无法解析。
有趣的是,如果我使用 DES 或关闭加密,那么它就可以工作。如果我使用命令行工具发送 AES 加密陷阱,那么它也可以工作
这是使用的库的版本:
dpkg -l | grep pysnmp
ii python-pysnmp-common 4.1.9a-2ubuntu1 Python SNMP library for agents and managers (version selection module)
ii python-pysnmp4 4.1.9a-2ubuntu1 Python SNMP library for agents and managers (unstable branch)
最佳答案
我找到了一个关于这个问题的邮件线程
http://sourceforge.net/p/pysnmp/mailman/message/27820538/
Your test case works for me with pysnmp release 4.1.16a. According to the pysnmp/CHANGES file, many AES-related fixes have been made at 4.1.14a.
Therefore please upgrade to the latest pysnmp release (4.1.16a) and try again.
-ilya
解决方案
将python-pysnmp4
包升级到4.1.16a+版本。 Ubuntu Precise 不包含固定版本,因此您有两个选择:
使用
pip
/easy_install
工具升级 lib从 Ubuntu Raring+ 版本安装 DEB,例如:
python-pysnmp4=4.2.2-1
仅供引用: Ubuntu 中 python-pysnmp4
DEB 的依赖是错误的,因此也必须更新 python-pyasn1
软件包! 例如:python-pyasn1=0.1.4-0ubuntu1
更新
以下是用于跟踪更改/检查错误修复的更改日志:http://pysnmp.sourceforge.net/changes.html
谢谢伊利亚!
关于python - PySNMP 无法在 Ubuntu Precise 上发送使用 AES 加密的陷阱,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26638591/