neicnordic / crypt4gh

Crypt4GH standard implementation
https://pkg.go.dev/github.com/neicnordic/crypt4gh
MIT License
8 stars 4 forks source link

Add support for unencrypted private crypt4gh keys #121

Closed pontus closed 8 months ago

pontus commented 8 months ago

This fixes support for unencrypted private crypt4gh keys. Support essentially existed but due to a logic error wasn't usable (KDF was checked against a list of actual KDFs, not including none, which is used for the unencrypted case) and failed if no match was found.

This moves the unencrypted case up a bit and lets the following code be a little simpler, also adds a testcase for an unencrypted key.

blankdots commented 8 months ago

i think we can go with version 1.9.1 as the way i read it it is a bug fix change version https://github.com/neicnordic/crypt4gh/blob/master/internal/version/version.go#L10

codecov-commenter commented 8 months ago

Codecov Report

Attention: Patch coverage is 60.00000% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 69.75%. Comparing base (88c2108) to head (9060c4f). Report is 4 commits behind head on master.

Files Patch % Lines
keys/keys.go 60.00% 5 Missing and 5 partials :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #121 +/- ## ========================================== + Coverage 69.72% 69.75% +0.03% ========================================== Files 6 6 Lines 862 873 +11 ========================================== + Hits 601 609 +8 Misses 141 141 - Partials 120 123 +3 ``` | [Flag](https://app.codecov.io/gh/neicnordic/crypt4gh/pull/121/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=neicnordic) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/neicnordic/crypt4gh/pull/121/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=neicnordic) | `69.75% <60.00%> (+0.03%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=neicnordic#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.