summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | CachingStreamWrapperTestCaseJan Pipek2019-11-152-1/+52
| | |
| * | Simplify _CachingStreamWrapperJan Pipek2019-11-151-8/+17
| | |
| * | Hide other auxiliary functions.Jan Pipek2019-11-151-4/+4
| | |
| * | Address several pull requests comments + hide asSeekableStreamJan Pipek2019-11-154-46/+44
| | |
| * | Additional test on ZIP filesJan Pipek2019-11-151-0/+14
| | |
| * | Implement _CachedStreamWrapperJan Pipek2019-11-152-13/+66
| | |
| * | Docstrings in requested format.Jan Pipek2019-11-151-8/+38
| | |
| * | Trivial changes from the MR.Jan Pipek2019-11-151-3/+3
| | |
| * | Update tests with more streams for ber.decoderJan Pipek2019-11-151-2/+53
| | |
| * | UnsupportedSubstrateErrorJan Pipek2019-11-152-5/+12
| | |
| * | Fail with unseekable streams.Jan Pipek2019-11-151-5/+5
| | |
| * | API that work with pyasn1-modulesJan Pipek2019-11-153-9/+9
| | |
| * | Prepare for streamsJan Pipek2019-11-154-261/+452
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewrite Decoder in terms of BytesIO BER Decoders implemented with BytesIO but for the most complex BER UniversalConstructedTypeDecoder in terms of BytesIO BER Decoder (stream-based) suggestion Fixed some of the failing tests Fixed several failed tests Fix all remaining tests but the non-implemented Any Implement untagged Any with back-seek Fix cer and der to work with streams Simplify unnecessary added complexity Make use of IOBase hierarchy (properly?) - in progress Tests failing Fixed most failing tests 1 remaining Severaů small optimizations Fix logging Note: As we do not want to read the whole stream, explicit output of remaining bytes is not used. Rename and document utility functions for BER decoder Fixed ínverted condition in BitStringDecoder.valueDecoder Fixed wrongly acquired fullPosition in AnyDecoder.indefLenValueDecoder Fixed logging None length endOfStream(BytesIO) working in 2.7 Microoptimizations for endOfStream (not using it) Test for checking binary files as substrate Python 2.7 BytesIO wrapper for `file`s Refactor keep API compatibility with original version
* | Allow combining constraints operating on sets (#181)Ilya Etingof2019-11-043-33/+117
| | | | | | | | | | Added ability of combining `SingleValueConstraint` and `PermittedAlphabetConstraint` objects into one for proper modeling `FROM ... EXCEPT ...` ASN.1 clause.
* | Fix failing `OctetString` to unicode conversion tests on Py2Ilya Etingof2019-09-101-2/+14
| |
* | Improve open maps debugging in decoderIlya Etingof2019-09-071-2/+30
|/
* Prepare for 0.4.8Ilya Etingof2019-09-012-1/+6
|
* Release 0.4.7v0.4.7Ilya Etingof2019-09-012-3/+5
|
* Add an afterthought on WITH COMPONENTS constraintIlya Etingof2019-08-281-2/+12
|
* Add `SET ... WITH COMPONENTS ...` ASN.1 construct support (#171)Ilya Etingof2019-08-279-19/+393
| | | | | | Added `WithComponentsConstraint` along with related `ComponentPresentConstraint` and `ComponentAbsentConstraint` classes to be used with `Sequence`/`Set` types representing `SET ... WITH COMPONENTS ...` like ASN.1 constructs.
* Fix for Python 4 (#173)Hugo van Kemenade2019-08-272-9/+9
|
* Deprecate `sizeSpec` in favor of `subtypeSpec` (#172)Ilya Etingof2019-08-2511-94/+101
| | | | | | | | | | | | | | This commit deprecates `subtypeSpec` attributes and keyword argument. It is now recommended to pass `ValueSizeConstraint`, as well as all other constraints, to `subtypeSpec`. By way of the change mentioned above, this commit fixes a design bug in a way of how the items assigned to constructed types are verified. Now if `Asn1Type`-based object is assigned, its compatibility is verified based on having all tags and constraint objects as the type in field definition. When a bare Python value is assigned, then field type object is cloned and initialized with the bare value (constraints verificaton would run at this moment).
* Add `isInconsistent` property hook to all constructed types (#170)Ilya Etingof2019-08-2514-28/+57
| | | | | | | Added `isInconsistent` property to all constructed types. This property conceptually replaces `verifySizeSpec` method to serve a more general purpose e.g. ensuring all required fields are in a good shape. By default this check invokes subtype constraints verification and is run by codecs on value de/serialisation.
* Fix ConstraintsUnion docstringIlya Etingof2019-08-131-3/+3
|
* Prepare 0.4.7Ilya Etingof2019-08-132-1/+6
|
* Release 0.4.6v0.4.6Ilya Etingof2019-07-312-2/+2
|
* Fix failing unit tests on Py25Ilya Etingof2019-07-312-4/+16
|
* Remove a couple of `except as` statements to benefit old PythonsIlya Etingof2019-07-312-3/+15
|
* Document base ASN.1 typesIlya Etingof2019-07-1312-97/+231
| | | | Also many fixes here and there to docs and docstrings.
* Fix Python builtins ReST references in docstringsIlya Etingof2019-07-134-65/+72
|
* Fix Travis docs build on Python 3.4+Ilya Etingof2019-07-132-1/+9
|
* Remove Python `id` from `repr`Ilya Etingof2019-07-136-23/+28
| | | | | It seems to clutter representation printout, especially in the rendered docs.
* Enable docs build in TravisIlya Etingof2019-07-131-0/+1
|
* Add exception classes documentationIlya Etingof2019-07-1314-33/+122
| | | | Also fix references to exception objects in other docstrings.
* Add docstring for `.reset()` and `.clear()` methodsIlya Etingof2019-07-135-4/+31
|
* Fix to pass decoder `options` to open type decoderIlya Etingof2019-07-121-5/+6
| | | | | Prior to this fix, recursively encoded open types won't get fully decoded all the way.
* Fix CER/DER encoders to respect open types (#167)Ilya Etingof2019-07-128-124/+1165
| | | | | | * Fix CER/DER encoders to respect open types Added a bunch of unit tests to CER/DER codecs covering open types.
* Add `SequenceOf`/`SetOf` list-like slicing support (#168)Ilya Etingof2019-07-123-4/+44
|
* Add more docs on `OpenType` (#166)Ilya Etingof2019-07-098-42/+139
| | | | This change adds more explanations and examples on ASN.1 ANY DEFINED BY syntax (OpenType).
* Update FUNDING.ymlIlya Etingof2019-07-071-1/+1
|
* Add `SET|SEQUENCE OF ANY` encoding support (#165)Ilya Etingof2019-07-066-46/+410
| | | | | | | | | | | | | | | | | | | | | | | | | For example: AttributeTypeAndValues ::= SEQUENCE { type OBJECT IDENTIFIER, values SET OF ANY DEFINED BY type } This patch adds support of the above ASN.1 syntax to BER/DER/CER codecs. It appears that to implement this feature properly, `SetOf`/`SequenceOf` pyasn1 types need to have `.componentType` wrapped into something similar to `NamedType` that `Set`/`Sequence` have. That additional layer would then carry the open type meta information. Without it, `Sequence`/`Set` codec needs to signal `SetOf`/`SequenceOf` codec of the open type being processed, which is a slight hack. A other inconvenience is that when `SetOf`/`SequenceOf` deal with an open type component, they should not verify types on component assignment. Without open type property in `SetOf`/`SequenceOf`, the code checks for `Any` component type which is another hack. The above shortcomings should be addressed in the follow up patch.
* Add GitHub funding buttonIlya Etingof2019-07-041-0/+1
|
* Improve CER/DER encoding of GeneralizedTime (#164)Ilya Etingof2019-06-303-23/+76
| | | | | | - Added support for subseconds CER/DER encoding edge cases in `GeneralizedTime` codec - Fixed 3-digit fractional seconds value CER/DER encoding of `GeneralizedTime`
* Rename pyasn1 unicode exceptionsIlya Etingof2019-06-295-42/+89
| | | | | | | The new exception classes names are `PyAsn1UnicodeDecodeError` and `PyAsn1UnicodeEncodeError`. Also, unit tests added.
* Add specific exceptions for String issues (#155)Alex Shafer2019-06-293-24/+52
| | | This change helps telling unicode-related exceptions from other PyAsn1Error exceptions.
* Fix `AnyDecoder` to accept `TagMap` as `asn1Spec` (#152)Ilya Etingof2019-06-283-4/+58
| | | | | | Fixes `AnyDecoder` to accept `TagMap` as `asn1Spec`. The use-case is to make `AnyDecoder` operational when dumping raw value on error condition is enabled
* SequenceOf/SetOf to remain a schema objects (#162)Ilya Etingof2019-06-238-86/+346
| | | | | | | | | | | | | | | | | | | | | | | | * Add `omitEmptyOptionals` encoder option Added `omitEmptyOptionals` option which is respected by `Sequence` and `Set` encoders. When `omitEmptyOptionals` is set to `True`, empty initialized optional components are not encoded. Default is `False`. * Change `SequenceOf`/`SetOf` behaviour - New elements to `SequenceOf`/`SetOf` objects can now be added at any position - the requirement for the new elements to reside at the end of the existing ones (i.e. s[len(s)] = 123) is removed. - Removed default initializer from `SequenceOf`/`SetOf` types to ensure consistent behaviour with the rest of ASN.1 types. Before this change, `SequenceOf`/`SetOf` instances immediately become value objects behaving like an empty list. With this change, `SequenceOf`/`SetOf` objects remain schema objects unless a component is added or `.clear()` is called. - Added `.reset()` method to all constructed types to turn value object into a schema object.
* Remove invalid escape sequences to get rid of DeprecationWarning in Python3. ↵Harrison2019-06-202-6/+6
| | | | (#161)
* Prepare for 0.4.6Ilya Etingof2018-12-293-11/+6
|
* Release 0.4.5v0.4.5Ilya Etingof2018-12-2962-62/+63
| | | | Also extend copyright to the year 2019