-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for unencrypted private crypt4gh keys #121
Conversation
a80f357
to
4d9303d
Compare
i think we can go with version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about we also add a test for decrypting with unprotected key, just in case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart for the test mentioned by Stefan, it looks good. Also tested it with the pipeline
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.