CHANGES.rst 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687
  1. Revision 0.4.6, released 31-07-2019
  2. -----------------------------------
  3. - Added previously missing `SET OF ANY` construct encoding/decoding support.
  4. - Added `omitEmptyOptionals` option which is respected by `Sequence`
  5. and `Set` encoders. When `omitEmptyOptionals` is set to `True`, empty
  6. initialized optional components are not encoded. Default is `False`.
  7. - New elements to `SequenceOf`/`SetOf` objects can now be added at any
  8. position - the requirement for the new elements to reside at the end
  9. of the existing ones (i.e. s[len(s)] = 123) is removed.
  10. - List-like slicing support added to `SequenceOf`/`SetOf` objects.
  11. - Removed default initializer from `SequenceOf`/`SetOf` types to ensure
  12. consistent behaviour with the rest of ASN.1 types. Before this change,
  13. `SequenceOf`/`SetOf` instances immediately become value objects behaving
  14. like an empty list. With this change, `SequenceOf`/`SetOf` objects
  15. remain schema objects unless a component is added or `.clear()` is
  16. called.
  17. This change can potentially cause incompatibilities with existing
  18. pyasn1 objects which assume `SequenceOf`/`SetOf` instances are value
  19. objects right upon instantiation.
  20. The behaviour of `Sequence`/`Set` types depends on the `componentType`
  21. initializer: if on `componentType` is given, the behaviour is the
  22. same as `SequenceOf`/`SetOf` have. IF `componentType` is given, but
  23. neither optional nor defaulted components are present, the created
  24. instance remains schema object, If, however, either optional or
  25. defaulted component isi present, the created instance immediately
  26. becomes a value object.
  27. - Added `.reset()` method to all constructed types to turn value object
  28. into a schema object.
  29. - Added `PyAsn1UnicodeDecodeError`/`PyAsn1UnicodeDecodeError` exceptions
  30. to help the caller treating unicode errors happening internally
  31. to pyasn1 at the upper layers.
  32. - Added support for subseconds CER/DER encoding edge cases in
  33. `GeneralizedTime` codec.
  34. - Fixed 3-digit fractional seconds value CER/DER encoding of
  35. `GeneralizedTime`.
  36. - Fixed `AnyDecoder` to accept possible `TagMap` as `asn1Spec`
  37. to make dumping raw value operational
  38. Revision 0.4.5, released 29-12-2018
  39. -----------------------------------
  40. - Debug logging refactored for more efficiency when disabled and
  41. for more functionality when in use. Specifically, the global
  42. LOG object can easily be used from any function/method, not just
  43. from codec main loop as it used to be.
  44. - More debug logging added to BER family of codecs to ease encoding
  45. problems troubleshooting.
  46. - Copyright notice extended to the year 2019
  47. - Fixed defaulted constructed SEQUENCE component initialization.
  48. Revision 0.4.4, released 26-07-2018
  49. -----------------------------------
  50. - Fixed native encoder type map to include all ASN.1 types
  51. rather than just ambiguous ones
  52. - Fixed crash in `.prettyPrint` of `Sequence` and `Set` occurring
  53. at OPTIONAL components
  54. Revision 0.4.3, released 23-05-2018
  55. -----------------------------------
  56. - Copyright notice extended to the year 2018
  57. - Fixed GeneralizedTime.asDateTime to perform milliseconds conversion
  58. correctly
  59. Revision 0.4.2, released 23-11-2017
  60. -----------------------------------
  61. - Fixed explicit tag splitting in chunked encoding mode at
  62. OctetString and BitString encoders
  63. Revision 0.4.1, released 23-11-2017
  64. -----------------------------------
  65. - ANY DEFINED BY clause support implemented
  66. - Encoders refactored to take either a value (as ASN.1 object)
  67. or a Python value plus ASN.1 schema
  68. - BitString decoder optimised for better performance when running on
  69. constructed encoding
  70. - Constructed types' .getComponentBy*() methods accept the `default`
  71. parameter to return instead if schema object is to be returned
  72. - Constructed types' .getComponentBy*() methods accept the `instantiate`
  73. parameter to disable automatic inner component instantiation
  74. - The ASN.1 types' `__repr__` implementation reworked for better readability
  75. at the cost of not being `eval`-compliant
  76. - Most ASN.1 types' `__str__` magic methods (except for OctetString and
  77. character types) reworked to call `.prettyPrint()` rather than
  78. `.prettyPrint` calling `__str__` as it was before. The intention is
  79. to eventually deprecate `.prettyPrint()` in favor of `str()`.
  80. The other related change is that `str()` of enumerations and boolean
  81. types will return string label instead of number.
  82. - Fixed Choice.clear() to fully reset internal state of the object
  83. - Sphinx documentation rearranged, simplified and reworded
  84. - The `isValue` singleton is now the only way to indicate ASN.1 schema
  85. as opposed to ASN.1 schema instance. The legacy `None` initializer
  86. support has been removed.
  87. - Changed `Null` object initialization behaviour: previous default
  88. value (`''`) is not set anymore. Thus `Null()` call produces a
  89. ASN.1 schema object, while `Null('')` - value object.
  90. - Migrated all docs and references from SourceForge
  91. - Imports PEP8'ed
  92. - Fixed ASN.1 encoder not to omit empty substrate produced for inner
  93. component if the inner component belongs to the simple class (as
  94. opposed to constructed class)
  95. - Fixed CER/DER encoders to respect tagged CHOICE when ordering
  96. SET components
  97. - Fixed ASN.1 types not to interfere with the Pickle protocol
  98. - Fixed Sequence/SequenceOf types decoding heuristics in schema-less
  99. decoding mode
  100. Revision 0.3.7, released 04-10-2017
  101. -----------------------------------
  102. - Fixed ASN.1 time types pickling/deepcopy'ing
  103. Revision 0.3.6, released 21-09-2017
  104. -----------------------------------
  105. - End-of-octets encoding optimized at ASN.1 encoders
  106. - The __getitem__/__setitem__ behavior of Set/Sequence and SetOf/SequenceOf
  107. objects aligned with the canonical Mapping and Sequence protocols in part
  108. - Fixed crash in ASN.1 encoder when encoding an explicitly tagged
  109. component of a Sequence
  110. Revision 0.3.5, released 16-09-2017
  111. -----------------------------------
  112. - Codecs signatures unified and pass the options kwargs through the
  113. call chain
  114. - Explicit tag encoding optimized to avoid unnecessary copying
  115. - End-of-octets sentinel encoding optimized
  116. - Refactored ASN.1 codecs properties to silently enforce proper
  117. length and chunk size encoding modes
  118. - Fixed DER encoder to always produce primitive encoding
  119. - Fixed crash at SequenceOf native decoder
  120. - Fixed Real.prettyPrint() to fail gracefully on overflow
  121. - Fixed a couple of crashes when debug mode is enabled
  122. Revision 0.3.4, released 07-09-2017
  123. -----------------------------------
  124. - Fixed Native encoder to handle SEQUENCE/SET objects without
  125. the componentType property
  126. - Added missing component-less SEQUENCE/SET objects dict duck-typing support
  127. - Fixed unnecessary duplicate tags detection at NamesType.tagMap
  128. - Fixed crash at SEQUENCE and SEQUENCE OF CER encoder when running
  129. in schemaless mode
  130. - Fixed Character types instantiation from OctetString type -- double
  131. unicode decoding may have scrambled the data
  132. Revision 0.3.3, released 27-08-2017
  133. -----------------------------------
  134. - Improved ASN.1 types instantiation performance
  135. - Improved BER/CER/DER decoder performance by not unconditionally casting
  136. substrate into str/bytes.
  137. - Fixed exponential index size growth bug when building ambiguous
  138. NamedTypes tree
  139. - Fixed constructed types decoding failure at BER codec if running
  140. in schema-less mode
  141. - Fixed crash on prettyPrint'ing a SEQUENCE with no defined components
  142. - Fixed SetOf ordering at CER/DER encoder
  143. - Fixed crash on conditional binascii module import
  144. - Fix to TagSet hash value build
  145. Revision 0.3.2, released 04-08-2017
  146. -----------------------------------
  147. - Fixed SequenceOf/SetOf types initialization syntax to remain
  148. backward compatible with pyasn1 0.2.*
  149. - Rectified thread safety issues by moving lazy, run-time computation
  150. into object initializer.
  151. - Fixed .isValue property to return True for empty SetOf/SequenceOf
  152. objects
  153. - Fixed GeneralizedTime/UTCTime CER/DER codecs to actually get invoked
  154. - Fixed DER/CER encoders handling optional SEQUENCE/SET fields containing
  155. nested SEQUENCE/SET with optional fields.
  156. - Fixed crash in SequenceOf/SetOf pretty printing and decoding (in some
  157. cases)
  158. - Fixed documentation markup issues.
  159. Revision 0.3.1, released 26-07-2017
  160. -----------------------------------
  161. - ASN.1 types __init__(), .clone() and .subtype() signatures
  162. refactored into keyword arguments to simplify their signatures.
  163. - ASN.1 types initialization refactored to minimize the use of
  164. relatively expensive isNoValue() call
  165. - Lazily pre-populate list of values of Sequence/Set/Choice types
  166. - NamedTypes comparison made more efficient
  167. - More efficient constraints computation and code clean up
  168. - The __getitem__() implementation of some ASN.1 types & tag object
  169. refactored for better performance
  170. - BER/CER/DER value encoders refactored to produce either tuple of
  171. bytes or octet-stream depending on what is more optimal
  172. - Reduced the frequency of expensive isinstance() calls
  173. - Tag-related classes optimized, refactored into properties and
  174. documented.
  175. - The NamedValues implementation refactored to mimic Python dict, its use
  176. in ASN.1 types refactored into properties and better documented.
  177. WARNING: this change introduces a deviation from original API.
  178. - NamedType family of classes overhauled, optimized and documented.
  179. - The `componentType` attribute of constructed ASN.1 types turned
  180. read-only on instances.
  181. - Sequence/Set DER/CER/DER decoder optimized to skip the case of
  182. reordered components handling when not necessary.
  183. - Tags and constraints-related getter methods refactored into read-only
  184. instance attributes.
  185. - The .hasValue() method refactored into .isValue property. All ASN.1
  186. objects now support them, not just scalars.
  187. - The Real.{isInfinity, isPlusInfinity, isMinusInfinity} methods
  188. refactored into properties and renamed into IsInf, IsPlusInf and isMinusInf
  189. - The end-of-octets type refactored to ensure it is a singleton. Codecs
  190. changed to rely on that for better performance.
  191. - Codecs lookup made more efficient at BER/CER/DER decoder main loop by
  192. assigning `typeId` to every ASN.1 type, not just ambiguous ones.
  193. - The .getComponent*() methods of constructed ASN.1 types changed
  194. to lazily instantiate underlying type rather than return `None`.
  195. This should simplify its API as initialization like `X[0][1] = 2` becomes
  196. possible.
  197. WARNING: this change introduces a deviation from the original API.
  198. - The .setComponent*() methods of SetOf/SequenceOf types changed not
  199. to allow uninitialized "holes" inside the sequences of their components.
  200. They now behave similarly to Python lists.
  201. WARNING: this change introduces a deviation from the original API.
  202. - Default and optional components en/decoding of Constructed type
  203. refactored towards better efficiency and more control.
  204. - OctetsString and Any decoder optimized to avoid creating ASN.1
  205. objects for chunks of substrate. Instead they now join substrate
  206. chunks together and create ASN.1 object from it just once.
  207. - The GeneralizedTime and UTCTime types now support to/from Python
  208. datetime object conversion.
  209. - Unit tests added for the `compat` sub-package.
  210. - Fixed BitString named bits initialization bug.
  211. - Fixed non-functional tag cache (when running Python 2) at DER decoder.
  212. - Fixed chunked encoding restriction on DER encoder.
  213. - Fixed SET components ordering at DER encoder.
  214. - Fixed BIT STRING & OCTET STRING encoding to be always non-chunked (e.g.
  215. primitive) at DER encoder
  216. - Fixed `compat.integer.from_bytes()` behaviour on empty input.
  217. Revision 0.2.3, released 25-02-2017
  218. -----------------------------------
  219. - Improved SEQUENCE/SET/CHOICE decoding performance by maintaining a single shared
  220. NamedType object for all instances of SEQUENCE/SET object.
  221. - Improved INTEGER encoding/decoding by switching to Python's built-in
  222. integer serialisation functions.
  223. - Improved BitString performance by rebasing it onto Python int type and leveraging
  224. fast Integer serialisation functions.
  225. - BitString type usability improved in many ways: for example bitshifting and
  226. numeric operation on BitString is now possible.
  227. - Minor ObjectIdentifier type performance optimization.
  228. - ASN.1 character types refactored to keep unicode contents internally
  229. (rather than serialised octet stream) and duck-type it directly.
  230. - ASN.1 OctetString initialized from a Python object performs bytes()
  231. on it when running on Python 3 (used to do str() which is probably
  232. less logical).
  233. - Missing support for NoValue.__sizeof__ added.
  234. - Added checks to make sure SEQUENCE/SET components being assigned
  235. match the prototypes.
  236. - Setter methods for constructed types consistently accept matchTags
  237. and matchConstraints flags to control the strictness of inner
  238. components compatibility verification. Previously, these checks
  239. were tied to verifyConstraints flag, now they are all independent.
  240. - General documentation improvements here and there.
  241. - Fix to __reversed__() magic to make it returning an iterator.
  242. - Test suite simplified and unified.
  243. - The __all__ variable added to most of the Python modules.
  244. - The "test" directory renamed into "tests" not to collide with
  245. the "test" module.
  246. Revision 0.2.2, released 07-02-2017
  247. -----------------------------------
  248. - FIX TO A SECURITY WEAKNESS: define length only decoders could have successfully
  249. processed indefinite length serialisation.
  250. - FIX TO A SECURITY WEAKNESS: canonical decoders (CER/DER) may have successfully
  251. consumed non-canonical variations of (otherwise valid) serialisation.
  252. - Broken Enumerated subtyping fixed.
  253. Revision 0.2.1, released 05-02-2017
  254. -----------------------------------
  255. - FIX TO A SECURITY WEAKNESS: BER decoder improperly cached long tags.
  256. - New "native" codec implemented to transform pyasn1 types to Python built-in types and back.
  257. - Switched to new-style classes.
  258. - Sphinx documentation added.
  259. - BitString improvements:
  260. * simple string of binary digits is now supported as initializer
  261. * default str() yields string of binary digits (used to yield str(tuple())
  262. * binValue and hexValue initializers added
  263. * .asNumbers(), .asOctets() and asInteger() representation added
  264. - Components of constructed ASN.1 types can now be populated with
  265. uninitialized ASN.1 objects by assigning either noValue sentinel or
  266. setupComponent() function return in addition to now-legacy None sentinel.
  267. This should improve code readability.
  268. - NoValue class improved to become a singleton and catch more kinds
  269. of access to it.
  270. - Compatibility wrappers str2octs() and oct2strs() fixed to run over
  271. iso-8859-1 encoding.
  272. - Integer changed to emit Real instance if division produces a float.
  273. - True division operation now supported by Integer type.
  274. - The __contains__(), __reverse__() methods implemented for container types
  275. - Iterator protocol support implemented for all container types.
  276. Warning, warning, warning: this change may potentially affect backward
  277. compatibility when:
  278. * user class overrides __getitem__() without overriding __iter__()
  279. * when user code iterates over SEQUENCE object to get its components (now keys will be yielded)
  280. - Almost complete Python list and dict protocols added to SequenceOf/SetOf and
  281. Sequence/Set respectively
  282. - Fix to divmod operation implementation in Integer type.
  283. - Fix to IntegerDecoder's precomputed value map on Python 3.
  284. - Fix to base ASN.1 types to run in "unicode_literals" mode.
  285. - Fix to composite constraints "+" operands ordering (AbstractConstraintSet.__radd__)
  286. - Fix to constraints merge in .subtype() -- on merge existing constraints are
  287. expanded to accommodate new constraints, not the other way round. When existing
  288. constraints are wrapped in ConstraintsIntersection composite, additional
  289. constraints being added on subtyping effectively further narrow the set of
  290. allowed values, which aligns well with the notion of subtyping.
  291. - Fix to NamedTypes methods to handle .getTagMap() returning None
  292. - Fix to Set/Sequence.setDefaultComponents() to return self
  293. - Copyright notice added to non-trivial source code files.
  294. - Author's email changed, copyright extended to 2017
  295. Revision 0.1.9, released 28-09-2015
  296. -----------------------------------
  297. - Wheel distribution format now supported.
  298. - Extensions added to text files, CVS attic flushed.
  299. - Fix to make uninitialized pyasn1 objects failing properly on hash().
  300. - Fix to ObjectIdentifier initialization from unicode string.
  301. - Fix to CER/DER Boolean decoder - fail on non single-octet payload.
  302. Revision 0.1.8, released 22-06-2015
  303. -----------------------------------
  304. - ObjectIdentifier codec fixed to work properly with arc 0 and arc 2 values.
  305. - Explicit limit on ObjectIdentifier arc value size removed.
  306. - Unicode initializer support added to OctetString type and derivatives.
  307. - New prettyPrintType() abstract method implemented to base pyasn1 types
  308. to facilitate encoding errors analysis.
  309. - The __str__() method implemented to Tag, TagSet and TagMap classes to
  310. ease encoding errors troubleshooting.
  311. easing encoding errors
  312. - Fix to SEQUENCE and SET types to give them their private componentTypes
  313. collection (which is a NamedTypes object) so that they won't collide in
  314. a MT execution environment.
  315. - Missing T61String,ISO646String character types and ObjectDescriptor useful
  316. type added.
  317. - Distribute is gone, switched to setuptools completely.
  318. - Missing NamedValues.__repr__() added.
  319. - The base.NoValue() class, that indicates uninitialized ASN.1 object,
  320. made public.
  321. - The base.NoValue() class instances now support __repr__() what makes
  322. possible to perform repr() on uninitialized pyasn1 types objects.
  323. - When comparing ASN.1 types, by-tag and/or by-constraints matching
  324. can now be performed with the isSuperTypeOf()/isSameTypeWith() optional
  325. flags.
  326. - Constructed types now verify their consistency by invoking
  327. isSameTypeWith(matchTags=True, matchConstraints=False) and
  328. isSuperTypeOf(matchTags=False, matchConstraints=True) for each of their
  329. components rather than isSuperTypeOf() as it used to be. Constriants check
  330. could be enforced to isSameTypeWith() with the strictConstraints=True
  331. constructed classes attribute.
  332. - Constructed types can now be initialized with new .setComponents() method
  333. which accepts both var-args and keyword-args. Default repr() modified to
  334. reflect this change.
  335. - NamedTypes() and NamedValues() made comparable.
  336. - Test coverage extended to cover pyasn1 types __repr__() function.
  337. - The abs(Integer()) & abs(Real()) operation now returns respective pyasn1
  338. type, not a Python type.
  339. - More Python magic methods implementations added to Integer & Real classes
  340. (e.g. __pos__, __neg__, __round__, __floor__, __ceil__, __trunc__)
  341. - The Integer.__invert__ Python magic method implemented.
  342. - The OctetString.__int__() and .__float__() magic methods implemented.
  343. - Handle the case of null writer at Debug printer.
  344. - BitString encoder/decoder performance improved.
  345. - Built-in debugging is now based on Python logging module.
  346. - Fix to NamedType.__repr__() to work properly.
  347. - Fixes to __repr__() implementation of many built-in ASN.1 types to take into
  348. account all of their initializers such as tagSet, subtypeSpec etc.
  349. - String typed float initializer to REAL type now supported.
  350. - Float typed mantissa initializer to REAL type for base 2 added.
  351. - Encoding bases 8 and 16 support for REAL type binary encoder added.
  352. - More strict CER/DER encoders added for GeneralizedTime and UTCTime types.
  353. - Asn1Item.hasValue() added to easily distinguish initalized ASN.1 objects
  354. from uninitialized ones (e.g. pure types).
  355. - Fix to REAL type binary decoder to handle different bases and scale factor.
  356. - Fix to TagSet.repr() to include [obsolete] baseTag information.
  357. - Fix to broken REAL type decoding handling.
  358. - Fix to BitString and OctetString decoders dealing with constructed
  359. encoding -- it used to be possible to embed other types in substrate.
  360. - DER codec hardened not to tolerate indefinite length encoding/decoding.
  361. - Fix to end-of-octest sentinel handling:
  362. + require strict two-zeros sentinel encoding
  363. + recognize EOO sentinel only when explicitly requested by caller
  364. of the decoder via allowEoo=True parameter (warning: API change)
  365. Revision 0.1.7
  366. --------------
  367. - License updated to vanilla BSD 2-Clause to ease package use
  368. (https://opensource.org/licenses/BSD-2-Clause).
  369. - Test suite made discoverable by unittest/unittest2 discovery feature.
  370. - Fix to decoder working on indefinite length substrate -- end-of-octets
  371. marker is now detected by both tag and value. Otherwise zero values may
  372. interfere with end-of-octets marker.
  373. - Fix to decoder to fail in cases where tagFormat indicates inappropriate
  374. format for the type (e.g. BOOLEAN is always PRIMITIVE, SET is always
  375. CONSTRUCTED and OCTET STRING is either of the two)
  376. - Fix to REAL type encoder to force primitive encoding form encoding.
  377. - Fix to CHOICE decoder to handle explicitly tagged, indefinite length
  378. mode encoding
  379. - Fix to REAL type decoder to handle negative REAL values correctly. Test
  380. case added.
  381. Revision 0.1.6
  382. --------------
  383. - The compact (valueless) way of encoding zero INTEGERs introduced in
  384. 0.1.5 seems to fail miserably as the world is filled with broken
  385. BER decoders. So we had to back off the *encoder* for a while.
  386. There's still the IntegerEncoder.supportCompactZero flag which
  387. enables compact encoding form whenever it evaluates to True.
  388. - Report package version on debugging code initialization.
  389. Revision 0.1.5
  390. --------------
  391. - Documentation updated and split into chapters to better match
  392. web-site contents.
  393. - Make prettyPrint() working for non-initialized pyasn1 data objects. It
  394. used to throw an exception.
  395. - Fix to encoder to produce empty-payload INTEGER values for zeros
  396. - Fix to decoder to support empty-payload INTEGER and REAL values
  397. - Fix to unit test suites imports to be able to run each from
  398. their current directory
  399. Revision 0.1.4
  400. --------------
  401. - Built-in codec debugging facility added
  402. - Added some more checks to ObjectIdentifier BER encoder catching
  403. posible 2^8 overflow condition by two leading sub-OIDs
  404. - Implementations overriding the AbstractDecoder.valueDecoder method
  405. changed to return the rest of substrate behind the item being processed
  406. rather than the unprocessed substrate within the item (which is usually
  407. empty).
  408. - Decoder's recursiveFlag feature generalized as a user callback function
  409. which is passed an uninitialized object recovered from substrate and
  410. its uninterpreted payload.
  411. - Catch inappropriate substrate type passed to decoder.
  412. - Expose tagMap/typeMap/Decoder objects at DER decoder to uniform API.
  413. - Obsolete __init__.MajorVersionId replaced with __init__.__version__
  414. which is now in-sync with distutils.
  415. - Package classifiers updated.
  416. - The __init__.py's made non-empty (rumors are that they may be optimized
  417. out by package managers).
  418. - Bail out gracefully whenever Python version is older than 2.4.
  419. - Fix to Real codec exponent encoding (should be in 2's complement form),
  420. some more test cases added.
  421. - Fix in Boolean truth testing built-in methods
  422. - Fix to substrate underrun error handling at ObjectIdentifier BER decoder
  423. - Fix to BER Boolean decoder that allows other pre-computed
  424. values besides 0 and 1
  425. - Fix to leading 0x80 octet handling in DER/CER/DER ObjectIdentifier decoder.
  426. See https://www.esat.kuleuven.be/cosic/publications/article-1432.pdf
  427. Revision 0.1.3
  428. --------------
  429. - Include class name into asn1 value constraint violation exception.
  430. - Fix to OctetString.prettyOut() method that looses leading zero when
  431. building hex string.
  432. Revision 0.1.2
  433. --------------
  434. - Fix to __long__() to actually return longs on py2k
  435. - Fix to OctetString.__str__() workings of a non-initialized object.
  436. - Fix to quote initializer of OctetString.__repr__()
  437. - Minor fix towards ObjectIdentifier.prettyIn() reliability
  438. - ObjectIdentifier.__str__() is aliased to prettyPrint()
  439. - Exlicit repr() calls replaced with '%r'
  440. Revision 0.1.1
  441. --------------
  442. - Hex/bin string initializer to OctetString object reworked
  443. (in a backward-incompatible manner)
  444. - Fixed float() infinity compatibility issue (affects 2.5 and earlier)
  445. - Fixed a bug/typo at Boolean CER encoder.
  446. - Major overhawl for Python 2.4 -- 3.2 compatibility:
  447. + get rid of old-style types
  448. + drop string module usage
  449. + switch to rich comparation
  450. + drop explicit long integer type use
  451. + map()/filter() replaced with list comprehension
  452. + apply() replaced with \*/\*\*args
  453. + switched to use 'key' sort() callback function
  454. + support both __nonzero__() and __bool__() methods
  455. + modified not to use py3k-incompatible exception syntax
  456. + getslice() operator fully replaced with getitem()
  457. + dictionary operations made 2K/3K compatible
  458. + base type for encoding substrate and OctetString-based types
  459. is now 'bytes' when running py3k and 'str' otherwise
  460. + OctetString and derivatives now unicode compliant.
  461. + OctetString now supports two python-neutral getters: asOcts() & asInts()
  462. + print OctetString content in hex whenever it is not printable otherwise
  463. + in test suite, implicit relative import replaced with the absolute one
  464. + in test suite, string constants replaced with numerics
  465. Revision 0.0.13
  466. ---------------
  467. - Fix to base10 normalization function that loops on univ.Real(0)
  468. Revision 0.0.13b
  469. ----------------
  470. - ASN.1 Real type is now supported properly.
  471. - Objects of Constructed types now support __setitem__()
  472. - Set/Sequence objects can now be addressed by their field names (string index)
  473. and position (integer index).
  474. - Typo fix to ber.SetDecoder code that prevented with schema decoding
  475. operation.
  476. - Fix to explicitly tagged items decoding support.
  477. - Fix to OctetString.prettyPrint() to better handle non-printable content.
  478. - Fix to repr() workings of Choice objects.
  479. Revision 0.0.13a
  480. ----------------
  481. - Major codec re-design.
  482. - Documentation significantly improved.
  483. - ASN.1 Any type is now supported.
  484. - All example ASN.1 modules moved to separate pyasn1-modules package.
  485. - Fix to initial sub-OID overflow condition detection an encoder.
  486. - BitString initialization value verification improved.
  487. - The Set/Sequence.getNameByPosition() method implemented.
  488. - Fix to proper behaviour of PermittedAlphabetConstraint object.
  489. - Fix to improper Boolean substrate handling at CER/DER decoders.
  490. - Changes towards performance improvement:
  491. + all dict.has_key() & dict.get() invocations replaced with modern syntax
  492. (this breaks compatibility with Python 2.1 and older).
  493. + tag and tagset caches introduced to decoder
  494. + decoder code improved to prevent unnecessary pyasn1 objects creation
  495. + allow disabling components verification when setting components to
  496. structured types, this is used by decoder whilst running with schema
  497. mode.
  498. + BER decoder for integer values now looks up a small set of pre-computed
  499. substrate values to save on decoding.
  500. + a few pre-computed values configured to ObjectIdentifier BER encoder.
  501. + ChoiceDecoder split-off SequenceOf one to save on unnecessary checks.
  502. + replace slow hasattr()/getattr() calls with isinstance() introspection.
  503. + track the number of initialized components of Constructed types to save
  504. on default/optional components initialization.
  505. + added a shortcut ObjectIdentifier.asTuple() to be used instead of
  506. __getitem__() in hotspots.
  507. + use Tag.asTuple() and pure integers at tag encoder.
  508. + introduce and use in decoder the baseTagSet attribute of the built-in
  509. ASN.1 types.
  510. Revision 0.0.12a
  511. ----------------
  512. - The individual tag/length/value processing methods of
  513. encoder.AbstractItemEncoder renamed (leading underscore stripped)
  514. to promote overloading in cases where partial substrate processing
  515. is required.
  516. - The ocsp.py, ldap.py example scripts added.
  517. - Fix to univ.ObjectIdentifier input value handler to disallow negative
  518. sub-IDs.
  519. Revision 0.0.11a
  520. ----------------
  521. - Decoder can now treat values of unknown types as opaque OctetString.
  522. - Fix to Set/SetOf type decoder to handle uninitialized scalar SetOf
  523. components correctly.
  524. Revision 0.0.10a
  525. ----------------
  526. - API versioning mechanics retired (pyasn1.v1 -> pyasn1) what makes
  527. it possible to zip-import pyasn1 sources (used by egg and py2exe).
  528. Revision 0.0.9a
  529. ---------------
  530. - Allow any non-zero values in Boolean type BER decoder, as it's in
  531. accordnance with the standard.
  532. Revision 0.0.8a
  533. ---------------
  534. - Integer.__index__() now supported (for Python 2.5+).
  535. - Fix to empty value encoding in BitString encoder, test case added.
  536. - Fix to SequenceOf decoder that prevents it skipping possible Choice
  537. typed inner component.
  538. - Choice.getName() method added for getting currently set component
  539. name.
  540. - OctetsString.prettyPrint() does a single str() against its value
  541. eliminating an extra quotes.
  542. Revision 0.0.7a
  543. ---------------
  544. - Large tags (>31) now supported by codecs.
  545. - Fix to encoder to properly handle explicitly tagged untagged items.
  546. - All possible value lengths (up to 256^126) now supported by encoders.
  547. - Fix to Tag class constructor to prevent negative IDs.
  548. Revision 0.0.6a
  549. ---------------
  550. - Make use of setuptools.
  551. - Constraints derivation verification (isSuperTypeOf()/isSubTypeOf()) fixed.
  552. - Fix to constraints comparation logic -- can't cmp() hash values as it
  553. may cause false positives due to hash conflicts.
  554. Revision 0.0.5a
  555. ---------------
  556. - Integer BER codec reworked fixing negative values encoding bug.
  557. - clone() and subtype() methods of Constructed ASN.1 classes now
  558. accept optional cloneValueFlag flag which controls original value
  559. inheritance. The default is *not* to inherit original value for
  560. performance reasons (this may affect backward compatibility).
  561. Performance penalty may be huge on deeply nested Constructed objects
  562. re-creation.
  563. - Base ASN.1 types (pyasn1.type.univ.*) do not have default values
  564. anymore. They remain uninitialized acting as ASN.1 types. In
  565. this model, initialized ASN.1 types represent either types with
  566. default value installed or a type instance.
  567. - Decoders' prototypes are now class instances rather than classes.
  568. This is to simplify initial value installation to decoder's
  569. prototype value.
  570. - Bugfix to BitString BER decoder (trailing bits not regarded).
  571. - Bugfix to Constraints use as mapping keys.
  572. - Bugfix to Integer & BitString clone() methods
  573. - Bugix to the way to distinguish Set from SetOf at CER/DER SetOfEncoder
  574. - Adjustments to make it running on Python 1.5.
  575. - In tests, substrate constants converted from hex escaped literals into
  576. octals to overcome indefinite hex width issue occuring in young Python.
  577. - Minor performance optimization of TagSet.isSuperTagSetOf() method
  578. - examples/sshkey.py added
  579. Revision 0.0.4a
  580. ---------------
  581. * Asn1Type.prettyPrinter() -> \*.prettyPrint()
  582. Revision 0.0.3a
  583. ---------------
  584. * Simple ASN1 objects now hash to their Python value and don't
  585. depend upon tag/constraints/etc.
  586. * prettyIn & prettyOut methods of SimplleAsn1Object become public
  587. * many syntax fixes
  588. Revision 0.0.2a
  589. ---------------
  590. * ConstraintsIntersection.isSuperTypeOf() and
  591. ConstraintsIntersection.hasConstraint() implemented
  592. * Bugfix to NamedValues initialization code
  593. * +/- operators added to NamedValues objects
  594. * Integer.__abs__() & Integer.subtype() added
  595. * ObjectIdentifier.prettyOut() fixes
  596. * Allow subclass components at SequenceAndSetBase
  597. * AbstractConstraint.__cmp__() dropped
  598. * error.Asn1Error replaced with error.PyAsn1Error
  599. Revision 0.0.1a
  600. ---------------
  601. * Initial public alpha release