Skip to content

Commit

Permalink
Make BER/CER/DER decodersstreaming and suspendible (#176)
Browse files Browse the repository at this point in the history
The goal of this change is to make the decoder yielding on input
data starvation and resuming from where it stopped whenever the
caller decides to try again (hopefully making sure that some more
input becomes available).

This change makes it possible for the decoder to operate on streams
of data (meaning that the entire DER blob might not be immediately
available on input).

On top of that, the decoder yields partially reconstructed ASN.1
object on input starvation making it possible for the caller to
inspect what has been decoded so far and possibly consume partial
ASN.1 data.

All these new feature are natively available through
`StreamingDecoder` class. Previously published API is implemented
as a thin wrapper on top of that ensuring backward compatibility.
  • Loading branch information
etingof authored Nov 23, 2019
2 parents f10434e + cda318a commit 96b0a77
Show file tree
Hide file tree
Showing 18 changed files with 1,737 additions and 612 deletions.
23 changes: 23 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@

Revision 0.5.0, released XX-09-2019
-----------------------------------

- Make BER/CER/DER decodersstreaming and suspendible

The goal of this change is to make the decoder yielding on input
data starvation and resuming from where it stopped whenever the
caller decides to try again (hopefully making sure that some more
input becomes available).

This change makes it possible for the decoder to operate on streams
of data (meaning that the entire DER blob might not be immediately
available on input).

On top of that, the decoder yields partially reconstructed ASN.1
object on input starvation making it possible for the caller to
inspect what has been decoded so far and possibly consume partial
ASN.1 data.

All these new feature are natively available through
`StreamingDecoder` class. Previously published API is implemented
as a thin wrapper on top of that ensuring backward compatibility.

Revision 0.4.9, released XX-11-2019
-----------------------------------

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Features

* Generic implementation of ASN.1 types (X.208)
* Standards compliant BER/CER/DER codecs
* Can operate on streams of serialized data
* Dumps/loads ASN.1 structures from Python types
* 100% Python, works with Python 2.7 and 3.5+
* MT-safe
Expand Down
Loading

0 comments on commit 96b0a77

Please sign in to comment.