rust-italia / dgc

A parser and validator for the EU Digital Green Certificate (dgc) a.k.a. greenpass
https://github.com/rust-italia/dgc
MIT License
26 stars 11 forks source link

Looks up for `kid` and `alg` also in unprotected header #25

Closed lmammino closed 2 years ago

lmammino commented 2 years ago

Fixes #1

Note: It is better to merge #23 first and then rebase this branch, so we can easily test against all the previously failing tests. Done

CC: @rez23 who was already looking at this!

codecov-commenter commented 2 years ago

Codecov Report

Merging #25 (672e19f) into main (ff6ae22) will increase coverage by 0.02%. The diff coverage is 82.19%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #25      +/-   ##
==========================================
+ Coverage   82.34%   82.36%   +0.02%     
==========================================
  Files          10       10              
  Lines        1048     1072      +24     
==========================================
+ Hits          863      883      +20     
- Misses        185      189       +4     
Impacted Files Coverage Ξ”
src/trustlist.rs 58.87% <75.00%> (+0.67%) :arrow_up:
src/cwt.rs 79.41% <80.70%> (-1.10%) :arrow_down:
src/parse.rs 73.91% <87.50%> (+0.72%) :arrow_up:
src/dgc_cert.rs 97.08% <100.00%> (+0.11%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data Powered by Codecov. Last update ff6ae22...672e19f. Read the comment docs.

lmammino commented 2 years ago

@lu-zero, this is now rebases with main. I can do a "Squash and merge" once this is ready to go rather than squashing everything upfront. Would that work for you?

lmammino commented 2 years ago

Note that with this PR we solve most of the broken test. We go from:

test result: ok. 528 passed; 0 failed; 52 ignored; 0 measured; 0 filtered out; finished in 0.17s

To:

test result: ok. 558 passed; 0 failed; 22 ignored; 0 measured; 0 filtered out; finished in 0.17s

So 30 new tests are now passing! πŸŽ‰

dodomorandi commented 2 years ago

This is the change I was talking about. Let me know what do you think about it.

lmammino commented 2 years ago

I love the suggested changes @dodomorandi! Thanks.

I actually contributed to ciborium adding the existing as_x functions to Value. It would be nice to submit a PR with these new features. You should do it πŸ˜‰

I'll try to fix the conflict, rebase and get this merged today 🀞

dodomorandi commented 2 years ago

I'll try to fix the conflict, rebase and get this merged today :crossed_fingers:

No worries, I'll do it because I caused the conflict :grin:. I was just waiting for your feedback before performing a forced push.

It would be nice to submit a PR with these new features. You should do it :wink:

I totally agree!!