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