Closed GrzegorzMalina94 closed 4 months ago
Thank you for the detailed bug report!
Are you interested in submitting a PR for this? If not - I can probably take a look at this tomorrow
If you can, take a look at it.
Just pushed 1.5.3 . Let me know if that works for you
Yes, problem solved. Thanks.
Description
The method
nextObject
of theASN1Parser
class doesn't work correctly when objects with an extended tag's value are encoded in bytes. I looked at the method code. In my opinion there are two errors there._position
field is not updated when an object with an extended tag value is returned.ASN1Object.fromBytes
constructor of an object with an extended tag value, all parser bytes (_bytes
) are passed. In my opinion_bytes.sublist(_position)
should be passed.To Reproduce
I prepared a small test allowing to reproduce the problem. Test will fail due to malfunction of the
nextObject
method.Relevant Files
asn1Parser.dart
Tasks
They all refer to the
nextObject()
method of theASN1Parser
class_position
field when an object with an extended tag value is returned.