]> Cypherpunks.ru repositories - pyderasn.git/blob - doc/news.rst
Up to date documentation
[pyderasn.git] / doc / news.rst
1 News
2 ====
3
4 .. _release7.0:
5
6 7.0
7 ---
8 * Fixed invalid behaviour where SET OF allowed multiple objects with the
9   same tag to be successfully decoded
10 * Fixed possibly invalid SET DER encoding where objects were not sorted
11   by tag, but by encoded representation
12 * ``Any`` does not allow empty data value now. Now it checks if it has
13   valid ASN.1 tag
14 * ``SetOf`` is not treated as ready, if no value was set and minimum
15   bounds are greater than zero
16 * ``Any`` allows an ordinary ``Obj`` storing, without its forceful
17   encoded representation storage. That is required for CER encoding
18   mode, where we do not know in advance what encoding will be used
19 * Initial support for so called ``evgen_mode``: event generation mode,
20   where no in-memory objects storing happens, giving ability to process
21   ASN.1 data without fully parsing it first. ``python -m pyderasn`` has
22   ``--evgen`` mode switcher
23 * Useful ``agg_octet_string`` that is able to streamingly decode string
24   from events of ``evgen_mode``, allowing strings retrieving without
25   copying them to memory first
26 * Initial experimental CER encoding mode, allowing streaming encoding of
27   the data directly to some writeable object
28 * Ability to use mmap-ed memoryviews to skip files loading to memory
29 * Ability to use memoryview as an input for \*Strings. If they are
30   mmap-ed, then you can encode any quantities of data streamingly
31   without copying to memory
32
33 .. _release6.3:
34
35 6.3
36 ---
37 * Fixed workability under Python 3.5. Previously only 2.7 and 3.6
38   versions were tested
39
40 .. _release6.2:
41
42 6.2
43 ---
44 * Python ``int()``'s accepts even more various non-decimal characters
45   than expected. Make validation fully strict in UTCTime and
46   GeneralizedTime, without relying on ``int()``
47
48 .. _release6.1:
49
50 6.1
51 ---
52 * UTCTime and GeneralizedTime allowed values to have plus sign in them,
53   passing int() check successfully. Prohibit that incorrect behaviour
54 * UTCTime and GeneralizedTime BER decoding support
55 * Faster UTCTime and GeneralizedTime decoding, and slightly better
56   overall performance
57 * Workability under Cython
58 * Explicitly Check that all ObjectIdentifier arcs are non-negative
59
60 .. _release6.0:
61
62 6.0
63 ---
64 * ``.copy()`` method removed: ``copy.copy()`` is preferred way to copy
65   objects now
66 * Copies made previously with ``.copy()`` lacked ``.defined`` field,
67   now they are not
68 * All objects are friendly to ``pickle`` libraries
69 * PrintableString has ``allow_asterisk`` and ``allow_ampersand``
70   properties
71 * ``.hexencode()``, ``.hexdecode()`` and ``.hexdecod()`` methods
72   appeared, working with hexadecimal encoded data
73
74 .. _release5.6:
75
76 5.6
77 ---
78 * Convenient ``.decod()`` method, that raises if tail is not empty
79 * Control characters (like newlines) of text fields in pprinted output
80   are escaped
81 * Ability to allow asterisk and ampersand characters
82   (``allow_asterisk``, ``allow_ampersand`` kwargs) in PrintableString,
83   that unfortunately could be met in X.509 certificates
84
85 .. _release5.5:
86
87 5.5
88 ---
89 * PEP-396 compatible module's ``__version__``
90
91 .. _release5.4:
92
93 5.4
94 ---
95 * Do not shadow underlying DecodeError during decoding of optional
96   sequence's field
97
98 .. _release5.3:
99
100 5.3
101 ---
102 * Forbid any later GNU GPL version autousage (project's licence now is
103   GNU LGPLv3 only)
104 * Fix ``defines_by_path`` context option usage example
105
106 .. _release5.2:
107
108 5.2
109 ---
110 * Fix fallbacked ``colored()`` function workability,
111   if no ``termcolor`` is installed
112
113 .. _release5.1:
114
115 5.1
116 ---
117 * Fix empty ``--oids`` workability
118
119 .. _release5.0:
120
121 5.0
122 ---
123 * Ability to specify multiple OID mappings for pprinted output
124   (``oids`` keyword argument is renamed to ``oid_maps``)
125
126 .. _release4.9:
127
128 4.9
129 ---
130 * Minor decode speed improvements
131 * Much faster UTCTime/GeneralizedTime decoders
132 * Stricter UTCTime/GeneralizedTime DER encoding check: trailing zeroes
133   are forbidden
134 * Valid DER encoding of GeneralizedTime with microseconds: no trailing
135   zeroes appended
136
137 .. _release4.7:
138
139 4.7
140 ---
141 * ObjectIdentifier has ``ber_encoded`` set to True, if non-normalized
142   arc encoding is met
143 * Preserve BER-related attributes during ``copy()``
144
145 .. _release4.6:
146
147 4.6
148 ---
149 * Added `COMPLI <https://github.com/YuryStrozhevsky/asn1-test-suite>`__
150   ASN.1:2008 test suite. PyDERASN passes it (except for REAL values),
151   but it is more strict sometimes and aimed to be compliant with X.690-201508
152 * Check for arc values normalization in ObjectIdentifier.
153   Forbid non-normalized in DER encoding
154
155 .. _release4.5:
156
157 4.5
158 ---
159 * ``ctx`` parameter can be safely used in .decode() and won't be muted
160 * PP nametuple contains reference to the ASN1Obj itself
161 * ``colonize_hex`` function useful for pretty printing
162 * Integer values are also pretty printed in hexadecimal form
163
164 .. _release4.4:
165
166 4.4
167 ---
168 * All errors are inherited from ASN1Error class
169 * NumericString/PrintableString has ``allowable_chars`` property holding
170   all allowed characters
171
172 .. _release4.3:
173
174 4.3
175 ---
176 * Fix NumericString: space is allowed character
177 * Strict PrintableString sanitizing
178
179 .. _release4.2:
180
181 4.2
182 ---
183 * Removed ``lenindef``, ``ber_encoded`` attributes from the Choice --
184   they must be taken from underlying value, as Choice does not have its
185   own encoding
186 * Do not yield extra EOC PP for Any, having indefinite length encoding
187   and containing autodecoded DEFINED BY value
188
189 .. _release4.1:
190
191 4.1
192 ---
193 * ``bered`` attribute, meaning if object has BER-specific encoding, is
194   renamed to ``ber_encoded``
195 * ``bered`` attribute is replace with property showing if any of
196   underlying values are BER-encoded. If value has length indefinite
197   encoded explicit tag, value, if value contains BER-related encoding,
198   or if it contains other objects that are ``bered``, then it is ``bered``
199
200 .. _release4.0:
201
202 4.0
203 ---
204 * Default value is checked also for Sets, not for Sequences only
205 * **Incompatible** change: defaulted values in Sequence/Set are always
206   strictly checked, unless ``allow_default_values`` context option is
207   set. ``strict_default_existence`` option disappeared
208 * Strict Set/Set Of's values ordering check
209
210 .. _release3.14:
211
212 3.14
213 ----
214 * Additional encoding validness check: explicit tag must contain exactly
215   one object inside. Throw DecodeError otherwise
216 * ``allow_expl_oob`` context and command-line options allow skipping of
217   that check
218
219 .. _release3.13:
220
221 3.13
222 ----
223 * DecodeError's decode paths are separated with ``:``, instead of ``.``,
224   because of colliding with dots in OIDs
225 * Ability to print element decode paths with ``--print-decode-path``
226   command line option (and corresponding keyword argument)
227 * Ability to print tree's branch specified with ``--decode-path-only``
228
229 .. _release3.12:
230
231 3.12
232 ----
233 * Fix possible uncaught TypeError in Py2 with zero bytes inside the value
234 * Fix SequenceOf/SetOf raising BoundsError instead of DecodeError
235
236 .. _release3.11:
237
238 3.11
239 ----
240 * Fix uncaught UTCTime/GeneralizedTime decode error when dealing with
241   non ASCII-encoded values
242
243 .. _release3.10:
244
245 3.10
246 ----
247 * Fix long-standing bug with explicitly tagged objects inside the
248   Choice. If Choice had explicitly tagged value, then its ``.tlvlen``
249   reports the size without taking value's explicit tag in advance
250 * Add ``.fulllen`` and ``.fulloffset`` properties for all objects
251
252 .. _release3.9:
253
254 3.9
255 ---
256 * SEQUENCE's values are printed with field's name. Previously there was
257   the following output::
258
259     AlgorithmIdentifier SEQUENCE[OBJECT IDENTIFIER 1.3.14.3.2.26, [UNIV 5] ANY 0500 OPTIONAL]
260
261   now it is::
262
263     AlgorithmIdentifier SEQUENCE[algorithm: OBJECT IDENTIFIER 1.3.14.3.2.26; parameters: [UNIV 5] ANY 0500 OPTIONAL]
264 * Fixed EOC (Unicode character) repr printing issues under Python2
265
266 .. _release3.8:
267
268 3.8
269 ---
270 BER's EOC is explicitly shown during pprinting. Following notation::
271
272       15-2 [0,0,1576]-4  . content: [0] EXPLICIT [UNIV 16] ANY
273
274 is replaced with::
275
276       15-2∞ [0,0,1576]∞  . content: [0] EXPLICIT [UNIV 16] ANY
277     [...]
278     1587    [1,1,   0]   . content:  BER EOC
279     1589    [1,1,   0]   . content: EXPLICIT BER EOC
280
281 .. _release3.7:
282
283 3.7
284 ---
285 * BER decoding support
286 * BitString's ''H notation support
287 * ``termcolor`` package is included in the tarball
288
289 .. _release3.6:
290
291 3.6
292 ---
293 * Ability to set values during Sequence initialization
294
295 .. _release3.5:
296
297 3.5
298 ---
299 * Fix TagMismatch exception completeness during Choice and Set decoding.
300   Previously we will loose offset and decode_path information about
301   concrete TagMismatched entity
302
303 .. _release3.4:
304
305 3.4
306 ---
307 * Strict NumericString's value sanitation
308 * Invalid encoding in string types will raise ``DecodeError`` exception,
309   instead of ``Unicode*Error``
310 * Fixed DecodePathDefBy workability with Python 2.x
311
312 .. _release3.3:
313
314 3.3
315 ---
316 * Fix nasty BitString decoding bug: it could fail when data follows
317   encoded BitString value. There weren't any problems when BitString is
318   at the end of Sequence
319
320 .. _release3.2:
321
322 3.2
323 ---
324 * Slightly corrected colours, now visible on white background
325
326 .. _release3.1:
327
328 3.1
329 ---
330 * Fix bug related to DecodeError showing with DecodePathDefBy entities
331 * Respect ``NO_COLOR`` environment variable
332
333 .. _release3.0:
334
335 3.0
336 ---
337 * :py:func:`pyderasn.decode_path_defby` is replaced with
338   :py:class:`pyderasn.DecodePathDefBy`
339 * Ability to turn colourized terminal output by calling
340   ``pprint(..., with_colours=True)``. You will need
341   `termcolor package <https://pypi.org/project/termcolor/>`__
342
343 .. _release2.1:
344
345 2.1
346 ---
347 * Fixed invalid offset calculation when dealing with DEFINED BY objects
348   having explicit tags
349
350 .. _release2.0:
351
352 2.0
353 ---
354 * BIT STRINGs can also be :ref:`DEFINED BY <definedby>`
355 * Decoding process can be governed with optional :ref:`ctx <ctx>`
356   keyword argument to ``decode()`` method
357 * :ref:`defines_by_path <defines_by_path_ctx>` option is now
358   :ref:`decode context <ctx>` option, not a keyword argument
359 * Ability to do ``strict validation``
360   of defaulted values met in sequence, raising an exception
361
362 .. _release1.6:
363
364 1.6
365 ---
366 Ability to skip specified number of bytes (``--skip``) in command line
367 utility.
368
369 .. _release1.5:
370
371 1.5
372 ---
373 * Generic decoder's schema and pretty printer
374   (:py:func:`pyderasn.generic_decoder`) can be used in libraries
375 * Ability to specify :ref:`defines_by_path <defines_by_path_ctx>`
376   during command line invocation
377
378 .. _release1.4:
379
380 1.4
381 ---
382 Ability to automatically decode :ref:`DEFINED BY <definedby>` fields
383 inside SEQUENCEs.
384
385 .. _release1.3:
386
387 1.3
388 ---
389 Removed ``__lt__``/``__eq__`` from base class, as pylint likes it.
390
391 .. _release1.2:
392
393 1.2
394 ---
395 Full rich comparison operators added.
396
397
398 .. _release1.1:
399
400 1.1
401 ---
402 Trivial README addition.
403
404 .. _release1.0:
405
406 1.0
407 ---
408 Initial release.