From 12138b182c82981c5268a18b15178ed564be874f Mon Sep 17 00:00:00 2001 From: Ilya Etingof Date: Sat, 6 Oct 2018 20:00:41 +0200 Subject: Fix Sphinx markup for USM crypto algorithm IDs --- pysnmp/entity/config.py | 2 ++ pysnmp/hlapi/v3arch/__init__.py | 47 ++++++++++++++++++++++++++++++++++++++++- pysnmp/hlapi/v3arch/auth.py | 41 +++++++++++++++++++++++------------ 3 files changed, 76 insertions(+), 14 deletions(-) (limited to 'pysnmp') diff --git a/pysnmp/entity/config.py b/pysnmp/entity/config.py index 835ecac9..63bed7c6 100644 --- a/pysnmp/entity/config.py +++ b/pysnmp/entity/config.py @@ -27,7 +27,9 @@ usmHMAC128SHA224AuthProtocol = hmacsha2.HmacSha2.sha224ServiceID usmHMAC192SHA256AuthProtocol = hmacsha2.HmacSha2.sha256ServiceID usmHMAC256SHA384AuthProtocol = hmacsha2.HmacSha2.sha384ServiceID usmHMAC384SHA512AuthProtocol = hmacsha2.HmacSha2.sha512ServiceID + usmNoAuthProtocol = noauth.NoAuth.serviceID +"""No authentication service""" # Privacy protocol usmDESPrivProtocol = des.Des.serviceID diff --git a/pysnmp/hlapi/v3arch/__init__.py b/pysnmp/hlapi/v3arch/__init__.py index 8f36181c..9e5f7779 100644 --- a/pysnmp/hlapi/v3arch/__init__.py +++ b/pysnmp/hlapi/v3arch/__init__.py @@ -7,9 +7,54 @@ from pysnmp.proto.rfc1902 import * from pysnmp.proto.rfc1905 import NoSuchInstance, NoSuchObject, EndOfMibView from pysnmp.smi.rfc1902 import * -from pysnmp.hlapi.v3arch.auth import * +from pysnmp.hlapi.v3arch import auth from pysnmp.hlapi.v3arch.context import * from pysnmp.entity.engine import * # default is synchronous asyncore-based API from pysnmp.hlapi.v3arch.asyncore.sync import * + +usmNoAuthProtocol = auth.usmNoAuthProtocol +"""No Authentication Protocol""" + +usmHMACMD5AuthProtocol = auth.usmHMACMD5AuthProtocol +"""The HMAC-MD5-96 Digest Authentication Protocol (:RFC:`3414#section-6`)""" + +usmHMACSHAAuthProtocol = auth.usmHMACSHAAuthProtocol +"""The HMAC-SHA-96 Digest Authentication Protocol AKA SHA-1 (:RFC:`3414#section-7`)""" + +usmHMAC128SHA224AuthProtocol = auth.usmHMAC128SHA224AuthProtocol +"""The HMAC-SHA-2 Digest Authentication Protocols (:RFC:`7860`)""" + +usmHMAC192SHA256AuthProtocol = auth.usmHMAC192SHA256AuthProtocol +"""The HMAC-SHA-2 Digest Authentication Protocols (:RFC:`7860`)""" + +usmHMAC256SHA384AuthProtocol = auth.usmHMAC256SHA384AuthProtocol +"""The HMAC-SHA-2 Digest Authentication Protocols (:RFC:`7860`)""" + +usmHMAC384SHA512AuthProtocol = auth.usmHMAC384SHA512AuthProtocol +"""The HMAC-SHA-2 Digest Authentication Protocols (:RFC:`7860`)""" + +usmNoPrivProtocol = auth.usmNoPrivProtocol +"""No Privacy Protocol""" + +usmDESPrivProtocol = auth.usmDESPrivProtocol +"""The CBC-DES Symmetric Encryption Protocol (:RFC:`3414#section-8`)""" + +usm3DESEDEPrivProtocol = auth.usm3DESEDEPrivProtocol +"""The 3DES-EDE Symmetric Encryption Protocol (`draft-reeder-snmpv3-usm-3desede-00 `_)""" + +usmAesCfb128Protocol = auth.usmAesCfb128Protocol +"""The CFB128-AES-128 Symmetric Encryption Protocol (:RFC:`3826#section-3`)""" + +usmAesCfb192Protocol = auth.usmAesCfb192Protocol +"""The CFB128-AES-192 Symmetric Encryption Protocol (`draft-blumenthal-aes-usm-04 `_) with Reeder key localization""" + +usmAesCfb256Protocol = auth.usmAesCfb256Protocol +"""The CFB128-AES-256 Symmetric Encryption Protocol (`draft-blumenthal-aes-usm-04 `_) with Reeder key localization""" + +usmAesBlumenthalCfb192Protocol = auth.usmAesBlumenthalCfb192Protocol +"""The CFB128-AES-192 Symmetric Encryption Protocol (`draft-blumenthal-aes-usm-04 `_)""" + +usmAesBlumenthalCfb256Protocol = auth.usmAesBlumenthalCfb256Protocol +"""The CFB128-AES-256 Symmetric Encryption Protocol (`draft-blumenthal-aes-usm-04 `_)""" diff --git a/pysnmp/hlapi/v3arch/auth.py b/pysnmp/hlapi/v3arch/auth.py index e4650f4b..20db368f 100644 --- a/pysnmp/hlapi/v3arch/auth.py +++ b/pysnmp/hlapi/v3arch/auth.py @@ -151,35 +151,50 @@ class CommunityData(object): securityName is None and self.securityName or securityName ) - -#: No Authentication Protocol. usmNoAuthProtocol = config.usmNoAuthProtocol -#: The HMAC-MD5-96 Digest Authentication Protocol (:RFC:`3414#section-6`) +"""No Authentication Protocol""" + usmHMACMD5AuthProtocol = config.usmHMACMD5AuthProtocol -#: The HMAC-SHA-96 Digest Authentication Protocol (:RFC:`3414#section-7`) +"""The HMAC-MD5-96 Digest Authentication Protocol (:RFC:`3414#section-6`)""" + usmHMACSHAAuthProtocol = config.usmHMACSHAAuthProtocol -#: The HMAC-SHA-2 Digest Authentication Protocols (:RFC:`7860`) +"""The HMAC-SHA-96 Digest Authentication Protocol AKA SHA-1 (:RFC:`3414#section-7`)""" + usmHMAC128SHA224AuthProtocol = config.usmHMAC128SHA224AuthProtocol +"""The HMAC-SHA-2 Digest Authentication Protocols (:RFC:`7860`)""" + usmHMAC192SHA256AuthProtocol = config.usmHMAC192SHA256AuthProtocol +"""The HMAC-SHA-2 Digest Authentication Protocols (:RFC:`7860`)""" + usmHMAC256SHA384AuthProtocol = config.usmHMAC256SHA384AuthProtocol +"""The HMAC-SHA-2 Digest Authentication Protocols (:RFC:`7860`)""" + usmHMAC384SHA512AuthProtocol = config.usmHMAC384SHA512AuthProtocol +"""The HMAC-SHA-2 Digest Authentication Protocols (:RFC:`7860`)""" -#: No Privacy Protocol. usmNoPrivProtocol = config.usmNoPrivProtocol -#: The CBC-DES Symmetric Encryption Protocol (:RFC:`3414#section-8`) +"""No Privacy Protocol""" + usmDESPrivProtocol = config.usmDESPrivProtocol -#: The 3DES-EDE Symmetric Encryption Protocol (`draft-reeder-snmpv3-usm-3desede-00 `_) +"""The CBC-DES Symmetric Encryption Protocol (:RFC:`3414#section-8`)""" + usm3DESEDEPrivProtocol = config.usm3DESEDEPrivProtocol -#: The CFB128-AES-128 Symmetric Encryption Protocol (:RFC:`3826#section-3`) +"""The 3DES-EDE Symmetric Encryption Protocol (`draft-reeder-snmpv3-usm-3desede-00 `_)""" + usmAesCfb128Protocol = config.usmAesCfb128Protocol -#: The CFB128-AES-192 Symmetric Encryption Protocol (`draft-blumenthal-aes-usm-04 `_) with Reeder key localization +"""The CFB128-AES-128 Symmetric Encryption Protocol (:RFC:`3826#section-3`)""" + usmAesCfb192Protocol = config.usmAesCfb192Protocol -#: The CFB128-AES-256 Symmetric Encryption Protocol (`draft-blumenthal-aes-usm-04 `_) with Reeder key localization +"""The CFB128-AES-192 Symmetric Encryption Protocol (`draft-blumenthal-aes-usm-04 `_) with Reeder key localization""" + usmAesCfb256Protocol = config.usmAesCfb256Protocol -#: The CFB128-AES-192 Symmetric Encryption Protocol (`draft-blumenthal-aes-usm-04 `_) +"""The CFB128-AES-256 Symmetric Encryption Protocol (`draft-blumenthal-aes-usm-04 `_) with Reeder key localization""" + usmAesBlumenthalCfb192Protocol = config.usmAesBlumenthalCfb192Protocol -#: The CFB128-AES-256 Symmetric Encryption Protocol (`draft-blumenthal-aes-usm-04 `_) +"""The CFB128-AES-192 Symmetric Encryption Protocol (`draft-blumenthal-aes-usm-04 `_)""" + usmAesBlumenthalCfb256Protocol = config.usmAesBlumenthalCfb256Protocol +"""The CFB128-AES-256 Symmetric Encryption Protocol (`draft-blumenthal-aes-usm-04 `_)""" class UsmUserData(object): -- cgit v1.2.1