summaryrefslogtreecommitdiff
path: root/pysnmp/proto
Commit message (Collapse)AuthorAgeFilesLines
* Fix broken SNMPv3 authoritative engine ID discoveryIlya Etingof2019-09-242-2/+2
| | | | | | | Fixed a regression in SNMPv3 `msgFlag` initialization on authoritative SNMP engine ID discovery. This bug causes secure communication with peer SNMP engines to stall at SNMP engine ID discovery procedure.
* Fix crash on AES key localizationIlya Etingof2019-08-111-1/+2
|
* Introduce "wildcard" SNMP engine ID (#297)Ilya Etingof2019-08-111-24/+59
| | | | | | | | | | | This change introduces "wildcard" SNMP engine ID (0x00000000). Right before deciding on firing up SNMP engine ID discovery and key localization procedure, originating SNMP engine will check for the presence of this magical engine ID (5 zeros), if it is present in LCD along with the user name being used, localized keys from that entry will be used. Does this have security implications?
* Move SNMP engine discovery code to security moduleIlya Etingof2019-08-102-31/+42
| | | | | | | | | | | | | This SNMP engine ID discovery procedure is spread across message processing and security modules. This is weird! Anyway, this change moves SNMP message rewriting, associated with starting out SNMP discovery sequence, to security module. The motivation is to let security module making the ultimate decision whether or not SNMP engine discovery is required. For example, if localized keys are committed directly to the DB, security module may just use them without engine discovery phase.
* Fix crashing VACM debuggingIlya Etingof2019-08-101-4/+4
|
* Do not store incomplete USM keys and improve debugIlya Etingof2019-08-052-15/+69
| | | | | | | | | | | | | This adds details debugging on USM initial configuration process and runtime USM user cloning. Besides that, this patch eliminates storing of incomplete USM keys (in case when master/localized keys are configured directly). On top of that, this commit fixes a bug in USM configuration which did not allow the same user names to be added under different security names.
* Fix wrong cherry-picked debug flagIlya Etingof2019-07-301-1/+1
|
* Rework VACM access control function (#287)Ilya Etingof2019-07-291-81/+319
| | | | | | | | | Most important changes include: * Added subtree match negation support (vacmViewTreeFamilyType) * Added subtree family mask support (vacmViewTreeFamilyMask) * Added prefix content name matching support (vacmAccessContextMatch) * Added key VACM tables caching for better lookup performance
* Fix TRAP PDU proxy translationIlya Etingof2019-07-261-14/+12
| | | | | Fixed crash on uninitialized component serialization left out in SNMP v1 TRAP PDU to SNMPv2/3 TRAP PDU translation routine.
* Fix `var-bindings` initializationIlya Etingof2019-06-232-3/+7
| | | | | | | Set `var-bindings` to an empty sequence by default. Otherwise it can remain a "pyasn1 schema object" failing to encode. This can happen with newer pyasn1 versions where `SequenceOf` type does not have default initializer.
* PEP-8 long lines and dunders (#245)Ilya Etingof2019-02-2631-1153/+1786
| | | | This patch massively reformats the whole codebase mainly wrapping long lines and eliminating dundered private attributes.
* Harden v2c->v1 TRAP PDU translation against incomplete var-bindsIlya Etingof2019-02-221-3/+26
|
* PEP8 optimize imports (#242)Ilya Etingof2019-02-1233-137/+176
| | | | To make them PEP8-compliant
* Fix Py2.6 incompatibilityIlya Etingof2019-02-121-41/+41
| | | | Specifically, set literals not yet supported.
* Officially remove Python < 2.6 support (#239)Ilya Etingof2019-02-102-7/+1
| | | | Perhaps previous commits have already broken older Python support. This commit mostly declares Python 2.6+ support.
* Uppercase global constants (#238)Ilya Etingof2019-02-1029-439/+502
| | | | | | | | | This is a massive patch essentially upper-casing global/class attributes that mean to be constants. Some previously exposed constants have been preserved for compatibility reasons (notably, in `hlapi`), though the rest might break user code relying on pysnmp 4.
* Drop Python < 2.6 except statement compatibility trickIlya Etingof2019-02-096-34/+37
|
* Drop Python < 2.6 kwargs expansion compatibility trickIlya Etingof2019-02-092-3/+3
|
* Add missing SNMP PDU error classesIlya Etingof2019-02-081-6/+7
| | | | | Added missing SNMP PDU error classes and their handling in Command Responder
* Extend copyright notice to year 2019Ilya Etingof2018-12-3038-38/+38
|
* Redesigned SMI objects management model (#214)Ilya Etingof2018-12-292-5/+10
| | | | | | | | | | | | | | The primary motivation behind this redesign is to allow asynchronous operations between SNMP responder and the data source feeding its MIB. This is achieved by redesigning all `read*`, `write*`, `create*` and `destroy*` methods of the `SNMPv2-SMI` MIB objects to return immediately and deliver their results via a call back. This modification brings significant and backward incompatible changes to the low-level MIB operations. The pysnmp MIB modules compiled for older pysnmp remain compatible.
* Expose ASN.1 `Null` type through `rfc1902` moduleIlya Etingof2018-10-261-1/+26
|
* Reformat `isAccessAllowed()` for clarityIlya Etingof2018-10-061-13/+30
|
* Release 4.4.6Ilya Etingof2018-09-131-1/+1
|
* Tolerate non-initialised entries in SNMP community table (#195)Ilya Etingof2018-09-131-25/+75
| | | | | | | | | | It can happen that SNMP community table contains uninitialized entries. These entries may stop internal SNMP community table indexing which is done in rfc2576 to speed up SNMP engine operations when SNMPv1/v2c is involved. Once a bad entry gets into SNMP community table, all the rest queries would start failing. This patch ignores incomplete SNMP community table entries in the course of building indices.
* Tolerate duplicate enumerationsIlya Etingof2018-09-091-4/+13
| | | | | | Possible duplicate enumerations in `Bits` and `Integer` SMI types causes pyasn1 exception. This fix reduces duplicates prior to passing them to pyasn1.
* Add `hlapi.v1arch` API (#186)Ilya Etingof2018-08-122-6/+38
| | | | | | | | | | | | | | | | | | | | * Add `hlapi.v1arch` API Introduce new sub-package `pysnmp.hlapi.v1arch` which wraps otherwise very detailed packet-level SNMP messaging into a handful of convenience functions. As a side effect, the `pysnmp.hlapi.*` sub-packages moved under `pysnmp.hlapi.v3arch` though `pysnmp.hlapi` still exposes `pysnmp.hlappi.v3arch.*` symbols to retain some degree of backward compatibility. The signature of the hlapi `.sendNotification()` call has changed to accept `*varBinds` instead of a sequence of `varBinds`. The rationale is to unify this method call with similar methods of CommandGenerator. * Add v1arch docs and reshuffle hlapi docs
* Fix crash on wrong SNMPv3 security modelIlya Etingof2018-08-062-2/+5
| | | | | Fixed crash caused by incoming SNMPv3 message requesting SNMPv1/v2c security model
* Fix `Bits` initialization with `namedValues`Ilya Etingof2018-07-201-4/+5
|
* Overhaul SMI/MIB instrumentation API (#161)Ilya Etingof2018-06-301-4/+5
| | | | | | | | | | | Overhaul SMI/MIB instrumentation API SMI/MIB managed objects API overhauled for simplicity and flexibility breaking backward compatibility. This change would allow way more control over custom MIB managed objects and also is the prerequisite for asynchronous MIB instrumentation.
* fixed zero boots/time values put into SNMPv3 TRAPIlya Etingof2018-04-211-24/+29
|
* many backward-compatibility aids droppedIlya Etingof2018-02-252-6/+1
|
* strong crypto moved to pysnmpcryptoIlya Etingof2018-02-194-36/+94
|
* adding docstrings, cleaning up generic_*crypt missing backend handling, and ↵mattsb42-aws2018-02-093-9/+9
| | | | fixing copy-pasted parameter names on decyrpt methods
* initial migration to backend-selecting cryptomattsb42-aws2018-02-093-60/+9
|
* copyright notice extendedv4.4.4Ilya Etingof2018-01-0339-39/+39
|
* fixed 3DES key localization bugIlya Etingof2017-12-301-0/+7
|
* cosmetic code fixesIlya Etingof2017-12-212-2/+12
|
* preserve SNMPv1 error-status when proxying to SNMPv2cIlya Etingof2017-12-171-7/+5
|
* fixed missing SmiError class at proto.frc1155Ilya Etingof2017-12-141-0/+1
|
* added missing SHA2 support for Blumenthal key localizationIlya Etingof2017-12-031-8/+14
|
* named bits fix at rfc1902.BitsIlya Etingof2017-12-031-29/+8
|
* migrated references from SourceForge (#110)Ilya Etingof2017-11-1740-40/+40
|
* make sure to pass an initializer to ASN.1 Null()-based objectsIlya Etingof2017-10-191-3/+3
|
* make sure to pass an initializer to ASN.1 Null()Ilya Etingof2017-10-183-6/+4
| | | | This is a prerequisite for pyasn1 0.4.x
* Let NetworkAddress be cloned from another NetworkAddress (#93)Eugene M. Kim2017-10-141-3/+5
| | | | | This is to meet the basic clone() contract and unbreak round-trip index conversions. Previously only IPAddress values were allowed as the clone source.
* Render NetworkAddress indices (#87)Eugene M. Kim2017-10-091-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add OID-index roundtrip methods to NetworkAddress This enables use of NetworkAddress as a table index. * Use NetworkAddress for RFC1213-MIB::atNetAddress Previously atNetAddress defined to be an IpAddress, whose table index mapping was different from that of NetworkAddress. This prevented proper use of RFC1213-MIB::atTable instances, because: - OID-to-symbol resolution was failing; - Symbol-to-OID mapping result was invalid. * Move clone() from Choice to NetworkAddress Previously it was implemented in pyasn1.type.univ.Choice in case there may be more Choice-based types—such as NetworkAddress—used as a table index. However, SMIv2 (RFC 2578) limits the SYNTAX of an OBJECT-TYPE to be only PyASN1 “simple” types, and NetworkAddress is the only known Choice-based type used as a table index in MIB-I, so there is little reason to clutter PyASN1 with the one-off logic in anticipation of something will probably never happen. Having NetworkAddress's own clone() method also allows use of string literals as the value, so the following invocations are all valid: na = NetworkAddress() na1234 = na.clone('1.2.3.4') na1234_2 = na1234.clone() na1234_3 = na.clone(na1234) na4321 = na.clone(IpAddress('4.3.2.1')) To elaborate on simple types, SMIv2 limits the object syntax to be: - a base type (or its refinement) - a textual convention (or its refinement); or - a BITS pseudo-type. All base types descend from ASN.1 integer, octet string, or OID, all of which are simple types. PySNMP defines SMIv2 BITS as a subclass of OctetString, which is again a simple type. Finally, a SMIv2 textual convention (RFC 2579) is simply a syntactic sugar applied on top of either a base type a BITS type, so it is a simple type.
* fixed Bits.clone()/subtype()Ilya Etingof2017-10-061-9/+11
|
* NotificationReceiver reports SNMPv1 TRAP community stringIlya Etingof2017-10-051-3/+3
|
* pycryptodome replaced with pycryptodomexIlya Etingof2017-10-053-3/+3
|