Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow better pickle integration (#240)
The way asn1crypto manages its classes does not always play nice with unpickling objects. In particular, pickled Asn1Values cannot always be unpickled in a "fresh" interpreter where the class setup methods for asn1crypto's classes haven't been called yet. See discussion in #239. This commit implements __reduce__ on Asn1Value in such a way that pickle will use asn1crypto's own DER serialisation/deserialisation functionality to handle pickling and unpickling. Fixes #239.
- Loading branch information