2 ms·
Fun fact; what these things implement is more general than DER; a sub/superset of BER. BER does have "constructed values" which are most 'obviously' parsed rec
by nullc 11y ago
Fun fact; what these things implement is more general than DER; a sub/superset of BER.
BER does have "constructed values" which are most 'obviously' parsed recursively. OpenSSL handles this via C macros that unroll the parsing 7 levels deep, but no more.
(What does it do when given nested constructed values? Well-- when its expecting an integer it goes and traverses into the constructed values in a particular order, pulls out the primitive types at the bottom, concatenates their bytes, and treats the result as an unsigned integer. ... Why? Because this is precisely the kind of madness that happens when you deploy a 'too powerful' language! :) )