P1sec / pycrate

A Python library to ease the development of encoders and decoders for various protocols and file formats; contains ASN.1 and CSN.1 compilers.
GNU Lesser General Public License v2.1
381 stars 132 forks source link

OER fixes #111

Closed JNevrly closed 3 years ago

JNevrly commented 3 years ago

Fixes the utils functions for Py2 (tested with Python2.7), additional fix for CHOICE decoding error handling.

p1-bmu commented 3 years ago

I moved the IEEE 754 routines to pycrate_asn1rt/utils, so that it is not needed to duplicate the code. Moreover, some functions uses Charpy which is not intended to be used by functions in pycrate_core/utils. I think this is better organized like this.

I cherry-picked your 2nd commit for handling CHOICE decoding. Therefore, everything should be fine in master (I hope so).

Thanks for the PR.