Tags: vanrein/quick-der
Tags
Default put/unput routines - After der_unpack() use der_put_default() to allow defaults to be set - Before der_pack() use der_unput_default() to remove values matching the default
Fixed order of testing Include files were tested before indirect include files got generated.Z
Tests: add more test values for unsigned with high-bits set.
Added der_put_bool() and der_get_bool() helper functions. Why? Because DER wants FALSE encoded as 0x00 and TRUE as 0xff, while BER is agnostic. And because it may be possible to ignore lengths other than 1 byte, and still make some sense of such non-minimal encoding (by looking at zero versus non-zero) and use that to be lenient on interpreting the transit data. That, however, is a choice. BER acceptability is general however, as we do that across the board with Quick DER recognition.
Now able to reproduce DER unpacked content with anASN1Object._der_pack() - tested in test/certio.py using test/verisigin.der (X.509 certificate) - works in spite of nested SEQUENCE OF and SET OF, and "funny" types - explicitly used der_pack() / der_unpack() to mean "with DER header" - additionally used der_format() / der_parse() to mean "DER body only" - updated test/der_pack() with changes; renamed it to test/der_format()
PreviousNext