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

已关闭
coolaj862018-11-26 21:44:33 +00:00创建 · 1 评论
管理员

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
作者
管理员

Fixed it last night.

Fixed it last night.
coolaj862018-11-28 16:50:57 +00:00 关闭此工单
登录 并参与到对话中。
未选择标签
未选择里程碑
未指派成员
1 名参与者
通知
到期时间
到期日期无效或超出范围。请使用 'yyyy-mm-dd' 格式。

未设置到期时间。

依赖工单

没有设置依赖项。

参考:coolaj86/asn1-parser.js#1
没有提供说明。