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