summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add `SET|SEQUENCE OF ANY` encoding supportadd-set-of-any-supportIlya 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
* Switch Travis to xenial just for Py3.7Ilya Etingof2018-12-291-1/+1
|
* Switch Travis to trustyIlya Etingof2018-12-291-11/+11
| | | | | In hope to get more builds and because Trusty should be the way to go.
* Switch Travis to preciseIlya Etingof2018-12-291-11/+11
| | | | In hope to get more builds back to life.
* Fix defaulted constructed SEQUENCE component initialization (#146)Ilya Etingof2018-12-293-2/+21
| | | | | When SEQUENCE has defaulted component of constructed type, recursively instantiate defaulted component and assign instantiated asn1 object to SEQUENCE field.
* Fix encoder debugging under Py2Ilya Etingof2018-12-291-3/+4
|
* Fix the entrypoint of asn1ate (#145)nde2018-10-171-1/+1
| | | Use `asn1ate` entry point in the documentation.
* Fix typo in example-use-case.rstIlya Etingof2018-08-071-1/+1
|
* Add more debug logging to *ER codecs (#139)Ilya Etingof2018-08-043-44/+361
| | | | | | | | | | More debug logging added to BER family of codecs to ease encoding problems troubleshooting. Also: * code layout made a bit more sparse * potential bug in open type decoding in indefinite mode fixed
* Refactor debug logging (#138)Ilya Etingof2018-08-036-92/+97
| | | | | | | | Debug logging refactored for more efficiency when disabled and for more functionality when in use. Specifically, the global LOG object can easily be used from any function/method, not just from codec main loop as it used to be.
* Fix some typos and prepare for 0.4.5Ilya Etingof2018-07-2914-41/+49
|
* Fix package versionv0.4.4Ilya Etingof2018-07-261-1/+1
|
* Fix Travis build for Py3.7Ilya Etingof2018-07-262-2/+2
|
* Release 0.4.4Ilya Etingof2018-07-261-1/+1
|
* Fix Sequence/Set.prettyPrint crashIlya Etingof2018-07-242-1/+3
| | | | | | | When calling `.prettyPrint()` on Sequence/Set components, make sure the component is a value object (not schema) because calling `.prettyPrint` on a schema object is likely to fail.
* Switch back to offical Python 3.7 buildIlya Etingof2018-07-031-2/+2
| | | | | | It appears that Python 3.7 use in Travis-CI is finally fixed. However, it requires use of xenial distribution and sudo: true. Those have now been added to the matrix.
* Fix native encoder type map (#132)Ilya Etingof2018-06-302-2/+34
| | | | | | | | | The type map should include all ASN.1 types rather than just ambiguous ones for performance reasons. Incomplete type ID map triggers building a new TagSet out of the value being encoded. If that value does not have base tags set, that leads to a crash.
* switch back to 3.7-devIlya Etingof2018-06-291-12/+46
|
* Merge branch 'master' of github.com:etingof/pyasn1Ilya Etingof2018-06-290-0/+0
|\
| * bumped up to Python 3.7Ilya Etingof2018-06-284-2/+4
| |
* | bumped up to Python 3.7Ilya Etingof2018-06-294-2/+4
|/
* Enable pip cache in Travis CI (#130)Jon Dufresne2018-06-161-1/+1
| | | | | | | Slightly speed up builds and reduce load on PyPI servers. For more information, see: https://docs.travis-ci.com/user/caching/#pip-cache
* 0.4.3v0.4.3Ilya Etingof2018-05-231-1/+1
|
* fix GenerlizedTime.asDateTime() operationIlya Etingof2018-05-233-9/+11
|
* Migrate to new PyPI websiteIlya Etingof2018-04-213-5/+5
|
* copyright years extendedIlya Etingof2018-03-2963-62/+67
|
* use older Sphinx for older PythonIlya Etingof2018-03-211-1/+1
|
* Include license file in the generated wheel package (#120)Jon Dufresne2018-03-211-0/+3
| | | | | | | | | | | | | The wheel package format supports including the license file. This is done using the [metadata] section in the setup.cfg file. For additional information on this feature, see: https://wheel.readthedocs.io/en/stable/index.html#including-the-license-in-the-generated-wheel-file Helps the package comply with its own license: > Redistributions in binary form must reproduce the above copyright > notice, this list of conditions and the following disclaimer in the > documentation and/or other materials provided with the distribution.
* Prefer https:// URLs where available (#121)Jon Dufresne2018-03-216-7/+7
|
* sys.getsizeof() may raise TypeError (#117)Vincent Bernat2017-12-261-0/+4
| | | | | Not all implementations have to implement getsizeof() and may raise TypeError instead. Notably, Pypy will always raise TypeError (unless a default value is provided).
* NoValue.__repr__() should report object address in hexIlya Etingof2017-12-031-1/+1
|
* Fixed bad TagSet initializer at OctetString encoder (#107)v0.4.2Ilya Etingof2017-11-233-16/+49
| | | | | | localize explicit tag slitting to chunked mode at OctetString and BitString encoders The inner chunks tagging logic is to be researched -- I'm not certain it works as it supposed to
* fixed opentype reference in Sphinx docIlya Etingof2017-11-231-1/+1
|
* fix to invoke potentially overridden OctetString.prettyOut()v0.4.1Ilya Etingof2017-11-232-5/+32
|
* imports pep8'edIlya Etingof2017-11-2334-70/+144
|
* relax open type field type check on assignment (#105)Ilya Etingof2017-11-237-15/+328
|
* cosmetic changes to Sequence.setComponentByPosition()Ilya Etingof2017-11-211-6/+16
|
* Merge branch 'devel-0.4.1'Ilya Etingof2017-11-19150-3523/+4374
|\
| * Start `.prettyPrint` deprecation (#103)Ilya Etingof2017-11-1912-60/+70
| | | | | | | | | | | | | | * __str__() of ASN.1 types reworked to serve instead of .prettyPrint() Related changes: `str()` on enumerations and boolean will return a string label rather than a number.
| * __repr__() of ASN.1 types reworked for better readability (#102)Ilya Etingof2017-11-1811-161/+103
| | | | | | At the same time __repr__() stopped being eval()-compliant
| * Add default to .getComponentBy*() (#100)Ilya Etingof2017-11-163-18/+140
| | | | | | | | * `default` kwarg added to .getComponentBy*() methods