librasn / rasn

A Safe #[no_std] ASN.1 Codec Framework
Other
183 stars 43 forks source link

OER: fix empty length decoding, no zero padding allowed #274

Closed Nicceboy closed 1 week ago

Nicceboy commented 1 week ago

There was a logic bug when parsing zero padding and there was no length.

That was a cause for null string in #272 instead of None.

But after consulting the standard again, I think zero padding is not allowed even in OER in this case and whole function can be removed. Zeros are allowed in long format.

XAMPPRocky commented 1 week ago

This now needs to be rebased to resolve conflicts.

Nicceboy commented 1 week ago

Rebased

XAMPPRocky commented 1 week ago

Thank you for your PR!