eu-digital-green-certificates / dgc-testdata

Repository for storing generated QR code data for testing.
Apache License 2.0
157 stars 218 forks source link

BE: can't inflate test data #388

Closed simonh1000 closed 3 years ago

simonh1000 commented 3 years ago

Affected Country: BE

Issue Description

I am able to decode the data in my own QR Code (covidsafe app), but while the prefix data here can be base45 decoded, it cannot be Inflated, nor can it be converted into cbor.

Proposed Solution

PeterEbraert commented 3 years ago

Hello there,

Don't understand what the problem is... Can you get into contact with me on slack to elaborate on this?

Thanks,

Peter Ebraert (team BE)

simonh1000 commented 3 years ago

Hi, I can't find a way to join Slack, so let me try to be clearer.

I'm trying to get the data from the QR Code.

My own certificate has content of HC1:.... If I pass it through a multi stage process of

I get the expected json.

But with the test data, this pipeline fails. The base45 decode reports a success but the inflate fails, and just skipping the inflate is not a workaround.

So I am wondering whether the test data has constructed using some other sequence?

krlnokrl commented 3 years ago

Hello,

I believe there might be an issue with your implementation. Using the python trivial implementation the testdata decompresses fine. I have tested the string with a few implementations of zlib and they all pass.

The specification requires the use of zlib compression format. Gzip is not the same as Zlib.

zlib Gzip
Headers 0x78 1F8B
simonh1000 commented 3 years ago

My mistake - it is inflateZLib that I am using, so that's not the error.

I'm doing this in Elm using https://package.elm-lang.org/packages/folkertdev/elm-tiny-inflate/latest/Inflate so there could be a bug there i guess

I'll play around some more

daniel-eder commented 3 years ago

@simonh1000 to join slack visit https://github.com/eu-digital-green-certificates/dgc-overview, the table contains an invite link

simonh1000 commented 3 years ago

It's somewhere in my own base45 decoding - apologies