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