diff options
author | verrio <verri@x25.pm> | 2017-08-02 23:38:14 +0000 |
---|---|---|
committer | Ilya Etingof <etingof@gmail.com> | 2017-08-03 01:38:14 +0200 |
commit | 130bdaa6e218c95806bd571b326a5d3e2ddcb1ef (patch) | |
tree | a379ae562ecd5ee4b9cc998ae666f9f8d247db73 /pysnmp/hlapi | |
parent | 801d47b63222f46dd403e145f9dcff6a03dd3337 (diff) | |
download | pysnmp-git-130bdaa6e218c95806bd571b326a5d3e2ddcb1ef.tar.gz |
add support for USM SHA-2 algorithms (RFC 7860) (#71)
Diffstat (limited to 'pysnmp/hlapi')
-rw-r--r-- | pysnmp/hlapi/auth.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/pysnmp/hlapi/auth.py b/pysnmp/hlapi/auth.py index 0a871431..20541f7c 100644 --- a/pysnmp/hlapi/auth.py +++ b/pysnmp/hlapi/auth.py @@ -13,7 +13,9 @@ __all__ = ['CommunityData', 'UsmUserData', 'usmAesCfb192Protocol', 'usmAesCfb256Protocol', 'usmAesBlumenthalCfb192Protocol', 'usmAesBlumenthalCfb256Protocol', 'usmDESPrivProtocol', 'usmHMACMD5AuthProtocol', - 'usmHMACSHAAuthProtocol', 'usmNoAuthProtocol', + 'usmHMACSHAAuthProtocol', 'usmHMAC128SHA224AuthProtocol', + 'usmHMAC192SHA256AuthProtocol', 'usmHMAC256SHA384AuthProtocol', + 'usmHMAC384SHA512AuthProtocol', 'usmNoAuthProtocol', 'usmNoPrivProtocol'] @@ -156,6 +158,11 @@ usmNoAuthProtocol = config.usmNoAuthProtocol usmHMACMD5AuthProtocol = config.usmHMACMD5AuthProtocol #: The HMAC-SHA-96 Digest Authentication Protocol (:RFC:`3414#section-7`) usmHMACSHAAuthProtocol = config.usmHMACSHAAuthProtocol +#: The HMAC-SHA-2 Digest Authentication Protocols (:RFC:`7860`) +usmHMAC128SHA224AuthProtocol = config.usmHMAC128SHA224AuthProtocol +usmHMAC192SHA256AuthProtocol = config.usmHMAC192SHA256AuthProtocol +usmHMAC256SHA384AuthProtocol = config.usmHMAC256SHA384AuthProtocol +usmHMAC384SHA512AuthProtocol = config.usmHMAC384SHA512AuthProtocol #: No Privacy Protocol. usmNoPrivProtocol = config.usmNoPrivProtocol @@ -214,6 +221,10 @@ class UsmUserData(object): * :py:class:`~pysnmp.hlapi.usmNoAuthProtocol` (default is *authKey* not given) * :py:class:`~pysnmp.hlapi.usmHMACMD5AuthProtocol` (default if *authKey* is given) * :py:class:`~pysnmp.hlapi.usmHMACSHAAuthProtocol` + * :py:class:`~pysnmp.hlapi.usmHMAC128SHA224AuthProtocol` + * :py:class:`~pysnmp.hlapi.usmHMAC192SHA256AuthProtocol` + * :py:class:`~pysnmp.hlapi.usmHMAC256SHA384AuthProtocol` + * :py:class:`~pysnmp.hlapi.usmHMAC384SHA512AuthProtocol` privProtocol: py:class:`tuple` An indication of whether messages sent on behalf of this USM user be encrypted, and if so, the type of encryption protocol which is used. |