Scopevisio / eudgc

A totally free (Apache 2.0) implementation of the Covid Vaccination Certifcate parsing and validation (more accurately EuDGC) in Javascript/Typescript. This works completely on the client side if needed. Serverside is possible too of course.
23 stars 13 forks source link

Element 0 overwritten? #4

Open jumpjack opened 3 years ago

jumpjack commented 3 years ago

https://github.com/Scopevisio/eudgc/blob/9af2d1baf7c2a802df978d9c195a470a09da1aff/src/cose1.ts#L107

Are you intentionally overwriting element 0 of raw[]?

srutz commented 2 years ago

yes, i do that because of the behavior in the library. 0x84 means array of length 4. This way I got it to work. Maybe newer versions of the cbor-web library work without this ugly hack. That would be nice actually. Leaving out this code would break the parsing when I originally wrote the eudgc code.