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