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