Handle the special case of an invalid non-child primitive value #1

Закрито
2018-11-26 21:44:33 +00:00 відкрито coolaj86 · 1 comment
coolaj86 прокоментував(ла) 2018-11-26 21:44:33 +00:00
Власник

Example of malformed data:

-----BEGIN PUBLIC KEY-----
BEleay9rUXWPOlAucJVcPgPTrGfxKiDJe5MStHHKu4gaJqDloeAJwtiC9T3+H02QhmoQ0xjmIIvozvcUO4mUvW0
-----END PUBLIC KEY-----

This should fail to parse because it appears to contain a primitive value and that value's length is much longer that the data that's put in.

Also:

-----BEGIN PUBLIC KEY-----
BOCi/0nLmTodhUUbI+GIyRxWvk8JaBu8HCFy46FJ/qO2hcfVPrUhXs5T3I2m6S2Jt65mDPS44EmIO0OCiRVbcXCvD6WjEC2+TirJ291sFVreisQvguuuKfLtnuVNhhfV7w
-----END PUBLIC KEY-----

the lenlen is longer than the whole string

Example of malformed data: ``` -----BEGIN PUBLIC KEY----- BEleay9rUXWPOlAucJVcPgPTrGfxKiDJe5MStHHKu4gaJqDloeAJwtiC9T3+H02QhmoQ0xjmIIvozvcUO4mUvW0 -----END PUBLIC KEY----- ``` This should fail to parse because it appears to contain a primitive value and that value's length is much longer that the data that's put in. Also: ``` -----BEGIN PUBLIC KEY----- BOCi/0nLmTodhUUbI+GIyRxWvk8JaBu8HCFy46FJ/qO2hcfVPrUhXs5T3I2m6S2Jt65mDPS44EmIO0OCiRVbcXCvD6WjEC2+TirJ291sFVreisQvguuuKfLtnuVNhhfV7w -----END PUBLIC KEY----- ``` the `lenlen` is longer than the whole string
coolaj86 прокоментував(ла) 2018-11-28 16:50:57 +00:00
Author
Власник

Fixed it last night.

Fixed it last night.
coolaj86 закрив цю задачу 2018-11-28 16:50:57 +00:00
Підпишіться щоб приєднатися до обговорення.
Без мітки
Етап відсутній
Немає виконавця
1 учасників
Сповіщення
Дата завершення
Термін дії не дійсний або знаходиться за межами допустимого діапазону. Будь ласка використовуйте формат 'yyyy-mm-dd'.

Термін виконання не встановлений.

Залежності

No dependencies set.

Reference: coolaj86/asn1-parser.js#1
No description provided.