CHANGES 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  1. Revision 0.1.8
  2. --------------
  3. - ObjectIdentifier codec fixed to work properly with arc 0 and arc 2 values.
  4. - Explicit limit on ObjectIdentifier arc value size removed.
  5. - Unicode initializer support added to OctetString type and derivatives.
  6. - New prettyPrintType() abstract method implemented to base pyasn1 types
  7. to facilitate encoding errors analisys.
  8. - The __str__() method implemented to Tag, TagSet and TagMap classes to
  9. ease encoding errors troubleshooting.
  10. easing encoding errors
  11. - Fix to SEQUENCE and SET types to give them their private componentTypes
  12. collection (which is a NamedTypes object) so that they won't collide in
  13. a MT execution environment.
  14. - Missing T61String,ISO646String character types and ObjectDescriptor useful
  15. type added.
  16. - Distribute is gone, switched to setuptools completely.
  17. - Missing NamedValues.__repr__() added.
  18. - The base.NoValue() class, that indicates uninitialized ASN.1 object,
  19. made public.
  20. - The base.NoValue() class instances now support __repr__() what makes
  21. possible to perform repr() on uninitialized pyasn1 types objects.
  22. - When comparing ASN.1 types, by-tag and/or by-constraints matching
  23. can now be performed with the isSuperTypeOf()/isSameTypeWith() optional
  24. flags.
  25. - Constructed types now verify their consistency by invoking
  26. isSameTypeWith(matchTags=True, matchConstraints=False) and
  27. isSuperTypeOf(matchTags=False, matchConstraints=True) for each of their
  28. components rather than isSuperTypeOf() as it used to be. Constriants check
  29. could be enforced to isSameTypeWith() with the strictConstraints=True
  30. constructed classes attribute.
  31. - Constructed types can now be initialized with new .setComponents() method
  32. which accepts both var-args and keyword-args. Default repr() modified to
  33. reflect this change.
  34. - NamedTypes() and NamedValues() made comparable.
  35. - Test coverage extended to cover pyasn1 types __repr__() function.
  36. - The abs(Integer()) & abs(Real()) operation now returns respective pyasn1
  37. type, not a Python type.
  38. - More Python magic methods implementations added to Integer & Real classes
  39. (e.g. __pos__, __neg__, __round__, __floor__, __ceil__, __trunc__)
  40. - The Integer.__invert__ Python magic method implemented.
  41. - The OctetString.__int__() and .__float__() magic methods implemented.
  42. - Handle the case of null writer at Debug printer.
  43. - BitString encoder/decoder performance improved.
  44. - Built-in debugging is now based on Python logging module.
  45. - Fix to NamedType.__repr__() to work properly.
  46. - Fixes to __repr__() implementation of many built-in ASN.1 types to take into
  47. account all of their initializers such as tagSet, subtypeSpec etc.
  48. - String typed float initializer to REAL type now supported.
  49. - Float typed mantissa initializer to REAL type for base 2 added.
  50. - Encoding bases 8 and 16 support for REAL type binary encoder added.
  51. - More strict CER/DER encoders added for GeneralizedTime and UTCTime types.
  52. - Asn1Item.hasValue() added to easily distinguish initalized ASN.1 objects
  53. from uninitialized ones (e.g. pure types).
  54. - Fix to REAL type binary decoder to handle different bases and scale factor.
  55. - Fix to TagSet.repr() to include [obsolete] baseTag information.
  56. - Fix to broken REAL type decoding handling.
  57. - Fix to BitString and OctetString decoders dealing with constructed
  58. encoding -- it used to be possible to embed other types in substrate.
  59. - Fix to end-of-octest sentinel handling:
  60. * require strict two-zeros sentinel encoding
  61. * recognize EOO sentinel only when explicitly requested by caller
  62. of the decoder via allowEoo=True parameter (warning: API change)
  63. - DER codec hardened not to tolerate indefinite length encoding/decoding.
  64. Revision 0.1.7
  65. --------------
  66. - License updated to vanilla BSD 2-Clause to ease package use
  67. (http://opensource.org/licenses/BSD-2-Clause).
  68. - Test suite made discoverable by unittest/unittest2 discovery feature.
  69. - Fix to decoder working on indefinite length substrate -- end-of-octets
  70. marker is now detected by both tag and value. Otherwise zero values may
  71. interfere with end-of-octets marker.
  72. - Fix to decoder to fail in cases where tagFormat indicates inappropriate
  73. format for the type (e.g. BOOLEAN is always PRIMITIVE, SET is always
  74. CONSTRUCTED and OCTET STRING is either of the two)
  75. - Fix to REAL type encoder to force primitive encoding form encoding.
  76. - Fix to CHOICE decoder to handle explicitly tagged, indefinite length
  77. mode encoding
  78. - Fix to REAL type decoder to handle negative REAL values correctly. Test
  79. case added.
  80. Revision 0.1.6
  81. --------------
  82. - The compact (valueless) way of encoding zero INTEGERs introduced in
  83. 0.1.5 seems to fail miserably as the world is filled with broken
  84. BER decoders. So we had to back off the *encoder* for a while.
  85. There's still the IntegerEncoder.supportCompactZero flag which
  86. enables compact encoding form whenever it evaluates to True.
  87. - Report package version on debugging code initialization.
  88. Revision 0.1.5
  89. --------------
  90. - Documentation updated and split into chapters to better match
  91. web-site contents.
  92. - Make prettyPrint() working for non-initialized pyasn1 data objects. It
  93. used to throw an exception.
  94. - Fix to encoder to produce empty-payload INTEGER values for zeros
  95. - Fix to decoder to support empty-payload INTEGER and REAL values
  96. - Fix to unit test suites imports to be able to run each from
  97. their current directory
  98. Revision 0.1.4
  99. --------------
  100. - Built-in codec debugging facility added
  101. - Added some more checks to ObjectIdentifier BER encoder catching
  102. posible 2^8 overflow condition by two leading sub-OIDs
  103. - Implementations overriding the AbstractDecoder.valueDecoder method
  104. changed to return the rest of substrate behind the item being processed
  105. rather than the unprocessed substrate within the item (which is usually
  106. empty).
  107. - Decoder's recursiveFlag feature generalized as a user callback function
  108. which is passed an uninitialized object recovered from substrate and
  109. its uninterpreted payload.
  110. - Catch inappropriate substrate type passed to decoder.
  111. - Expose tagMap/typeMap/Decoder objects at DER decoder to uniform API.
  112. - Obsolete __init__.MajorVersionId replaced with __init__.__version__
  113. which is now in-sync with distutils.
  114. - Package classifiers updated.
  115. - The __init__.py's made non-empty (rumors are that they may be optimized
  116. out by package managers).
  117. - Bail out gracefully whenever Python version is older than 2.4.
  118. - Fix to Real codec exponent encoding (should be in 2's complement form),
  119. some more test cases added.
  120. - Fix in Boolean truth testing built-in methods
  121. - Fix to substrate underrun error handling at ObjectIdentifier BER decoder
  122. - Fix to BER Boolean decoder that allows other pre-computed
  123. values besides 0 and 1
  124. - Fix to leading 0x80 octet handling in DER/CER/DER ObjectIdentifier decoder.
  125. See http://www.cosic.esat.kuleuven.be/publications/article-1432.pdf
  126. Revision 0.1.3
  127. --------------
  128. - Include class name into asn1 value constraint violation exception.
  129. - Fix to OctetString.prettyOut() method that looses leading zero when
  130. building hex string.
  131. Revision 0.1.2
  132. --------------
  133. - Fix to __long__() to actually return longs on py2k
  134. - Fix to OctetString.__str__() workings of a non-initialized object.
  135. - Fix to quote initializer of OctetString.__repr__()
  136. - Minor fix towards ObjectIdentifier.prettyIn() reliability
  137. - ObjectIdentifier.__str__() is aliased to prettyPrint()
  138. - Exlicit repr() calls replaced with '%r'
  139. Revision 0.1.1
  140. --------------
  141. - Hex/bin string initializer to OctetString object reworked
  142. (in a backward-incompatible manner)
  143. - Fixed float() infinity compatibility issue (affects 2.5 and earlier)
  144. - Fixed a bug/typo at Boolean CER encoder.
  145. - Major overhawl for Python 2.4 -- 3.2 compatibility:
  146. + get rid of old-style types
  147. + drop string module usage
  148. + switch to rich comparation
  149. + drop explicit long integer type use
  150. + map()/filter() replaced with list comprehension
  151. + apply() replaced with */**args
  152. + switched to use 'key' sort() callback function
  153. + support both __nonzero__() and __bool__() methods
  154. + modified not to use py3k-incompatible exception syntax
  155. + getslice() operator fully replaced with getitem()
  156. + dictionary operations made 2K/3K compatible
  157. + base type for encoding substrate and OctetString-based types
  158. is now 'bytes' when running py3k and 'str' otherwise
  159. + OctetString and derivatives now unicode compliant.
  160. + OctetString now supports two python-neutral getters: asOcts() & asInts()
  161. + print OctetString content in hex whenever it is not printable otherwise
  162. + in test suite, implicit relative import replaced with the absolute one
  163. + in test suite, string constants replaced with numerics
  164. Revision 0.0.13
  165. ---------------
  166. - Fix to base10 normalization function that loops on univ.Real(0)
  167. Revision 0.0.13b
  168. ----------------
  169. - ASN.1 Real type is now supported properly.
  170. - Objects of Constructed types now support __setitem__()
  171. - Set/Sequence objects can now be addressed by their field names (string index)
  172. and position (integer index).
  173. - Typo fix to ber.SetDecoder code that prevented guided decoding operation.
  174. - Fix to explicitly tagged items decoding support.
  175. - Fix to OctetString.prettyPrint() to better handle non-printable content.
  176. - Fix to repr() workings of Choice objects.
  177. Revision 0.0.13a
  178. ----------------
  179. - Major codec re-design.
  180. - Documentation significantly improved.
  181. - ASN.1 Any type is now supported.
  182. - All example ASN.1 modules moved to separate pyasn1-modules package.
  183. - Fix to initial sub-OID overflow condition detection an encoder.
  184. - BitString initialization value verification improved.
  185. - The Set/Sequence.getNameByPosition() method implemented.
  186. - Fix to proper behaviour of PermittedAlphabetConstraint object.
  187. - Fix to improper Boolean substrate handling at CER/DER decoders.
  188. - Changes towards performance improvement:
  189. + all dict.has_key() & dict.get() invocations replaced with modern syntax
  190. (this breaks compatibility with Python 2.1 and older).
  191. + tag and tagset caches introduced to decoder
  192. + decoder code improved to prevent unnecessary pyasn1 objects creation
  193. + allow disabling components verification when setting components to
  194. structured types, this is used by decoder whilst running in guided mode.
  195. + BER decoder for integer values now looks up a small set of pre-computed
  196. substrate values to save on decoding.
  197. + a few pre-computed values configured to ObjectIdentifier BER encoder.
  198. + ChoiceDecoder split-off SequenceOf one to save on unnecessary checks.
  199. + replace slow hasattr()/getattr() calls with isinstance() introspection.
  200. + track the number of initialized components of Constructed types to save
  201. on default/optional components initialization.
  202. + added a shortcut ObjectIdentifier.asTuple() to be used instead of
  203. __getitem__() in hotspots.
  204. + use Tag.asTuple() and pure integers at tag encoder.
  205. + introduce and use in decoder the baseTagSet attribute of the built-in
  206. ASN.1 types.
  207. Revision 0.0.12a
  208. ----------------
  209. - The individual tag/length/value processing methods of
  210. encoder.AbstractItemEncoder renamed (leading underscore stripped)
  211. to promote overloading in cases where partial substrate processing
  212. is required.
  213. - The ocsp.py, ldap.py example scripts added.
  214. - Fix to univ.ObjectIdentifier input value handler to disallow negative
  215. sub-IDs.
  216. Revision 0.0.11a
  217. ----------------
  218. - Decoder can now treat values of unknown types as opaque OctetString.
  219. - Fix to Set/SetOf type decoder to handle uninitialized scalar SetOf
  220. components correctly.
  221. Revision 0.0.10a
  222. ----------------
  223. - API versioning mechanics retired (pyasn1.v1 -> pyasn1) what makes
  224. it possible to zip-import pyasn1 sources (used by egg and py2exe).
  225. Revision 0.0.9a
  226. ---------------
  227. - Allow any non-zero values in Boolean type BER decoder, as it's in
  228. accordnance with the standard.
  229. Revision 0.0.8a
  230. ---------------
  231. - Integer.__index__() now supported (for Python 2.5+).
  232. - Fix to empty value encoding in BitString encoder, test case added.
  233. - Fix to SequenceOf decoder that prevents it skipping possible Choice
  234. typed inner component.
  235. - Choice.getName() method added for getting currently set component
  236. name.
  237. - OctetsString.prettyPrint() does a single str() against its value
  238. eliminating an extra quotes.
  239. Revision 0.0.7a
  240. ---------------
  241. - Large tags (>31) now supported by codecs.
  242. - Fix to encoder to properly handle explicitly tagged untagged items.
  243. - All possible value lengths (up to 256^126) now supported by encoders.
  244. - Fix to Tag class constructor to prevent negative IDs.
  245. Revision 0.0.6a
  246. ---------------
  247. - Make use of setuptools.
  248. - Constraints derivation verification (isSuperTypeOf()/isSubTypeOf()) fixed.
  249. - Fix to constraints comparation logic -- can't cmp() hash values as it
  250. may cause false positives due to hash conflicts.
  251. Revision 0.0.5a
  252. ---------------
  253. - Integer BER codec reworked fixing negative values encoding bug.
  254. - clone() and subtype() methods of Constructed ASN.1 classes now
  255. accept optional cloneValueFlag flag which controls original value
  256. inheritance. The default is *not* to inherit original value for
  257. performance reasons (this may affect backward compatibility).
  258. Performance penalty may be huge on deeply nested Constructed objects
  259. re-creation.
  260. - Base ASN.1 types (pyasn1.type.univ.*) do not have default values
  261. anymore. They remain uninitialized acting as ASN.1 types. In
  262. this model, initialized ASN.1 types represent either types with
  263. default value installed or a type instance.
  264. - Decoders' prototypes are now class instances rather than classes.
  265. This is to simplify initial value installation to decoder's
  266. prototype value.
  267. - Bugfix to BitString BER decoder (trailing bits not regarded).
  268. - Bugfix to Constraints use as mapping keys.
  269. - Bugfix to Integer & BitString clone() methods
  270. - Bugix to the way to distinguish Set from SetOf at CER/DER SetOfEncoder
  271. - Adjustments to make it running on Python 1.5.
  272. - In tests, substrate constants converted from hex escaped literals into
  273. octals to overcome indefinite hex width issue occuring in young Python.
  274. - Minor performance optimization of TagSet.isSuperTagSetOf() method
  275. - examples/sshkey.py added
  276. Revision 0.0.4a
  277. ---------------
  278. * Asn1ItemBase.prettyPrinter() -> *.prettyPrint()
  279. Revision 0.0.3a
  280. ---------------
  281. * Simple ASN1 objects now hash to their Python value and don't
  282. depend upon tag/constraints/etc.
  283. * prettyIn & prettyOut methods of SimplleAsn1Object become public
  284. * many syntax fixes
  285. Revision 0.0.2a
  286. ---------------
  287. * ConstraintsIntersection.isSuperTypeOf() and
  288. ConstraintsIntersection.hasConstraint() implemented
  289. * Bugfix to NamedValues initialization code
  290. * +/- operators added to NamedValues objects
  291. * Integer.__abs__() & Integer.subtype() added
  292. * ObjectIdentifier.prettyOut() fixes
  293. * Allow subclass components at SequenceAndSetBase
  294. * AbstractConstraint.__cmp__() dropped
  295. * error.Asn1Error replaced with error.PyAsn1Error
  296. Revision 0.0.1a
  297. ---------------
  298. * Initial public alpha release