Make SIZE OF constraint operational

Changes `ValueSizeConstraint` erroneously applied to `SequenceOf`
and `SetOf` objects via `subtypeConstraint` attribute to be applied
via `sizeSpec` attribute.

Although `sizeSpec` takes the same constraint objects as
`subtypeConstraint`, the former is only verified on de/serialization
i.e. when the [constructed] object at hand is fully populated, while
the latter is applied to [scalar] types at the moment of instantiation.

This change also bumps pyasn1 requirement to 0.4.6.
23 files changed
tree: 5385178e4699ee2fe1b1c4ce446564aefde5a1f2
  1. .gitignore
  2. .travis.yml
  3. CHANGES.txt
  4. LICENSE.txt
  7. pyasn1_modules/
  8. requirements.txt
  9. setup.cfg
  11. tests/
  12. tools/

ASN.1 modules for Python

PyPI Python Versions Build status Coverage Status GitHub license

This is a small but growing collection of ASN.1 data structures expressed in Python terms using pyasn1 data model.

If ASN.1 module you need is not present in this collection, try using Asn1ate tool that compiles ASN.1 documents into pyasn1 code.


If something does not work as expected, try browsing pyasn1 mailing list archives or post your question to Stack Overflow. If you want to contribute ASN.1 modules you have converted into pyasn1, please send me a pull request.

Copyright (c) 2005-2019, Ilya Etingof. All rights reserved.