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

Fermé
créé 2018-11-26 21:44:33 +00:00 par coolaj86 · 1 commentaire
Propriétaire

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
Auteur
Propriétaire

Fixed it last night.

Fixed it last night.
coolaj86 a fermé ce ticket 2018-11-28 16:50:57 +00:00.
Connectez-vous pour rejoindre cette conversation.
Sans labels
Sans jalon
Sans assignation
1 participants
Notifications
Échéance
La date d’échéance est invalide ou hors plage. Veuillez utiliser le format 'aaaa-mm-dd'.

Aucune échéance n'a été définie.

Dépendances

Aucune dépendance définie.

Référence : coolaj86/asn1-parser.js#1
Sans contenu.