EGA-archive / crypt4gh

GA4GH cryptographic tools
http://crypt4gh.readthedocs.io
Apache License 2.0
16 stars 12 forks source link

All encryption keys are not checked. #32

Closed kkmattil closed 1 year ago

kkmattil commented 1 year ago

In cases where se several encryption keys are used, no error message is returned if one of the keys is missing. Example. Command:

crypt4gh encrypt --recipient_pk key1.pub --recipient_pk key2.pub < input > out.c4gh

does not report any errors if key1.pub exists but key2.pub does not exist.

silverdaz commented 1 year ago

I see the pull request from @blankdots to fix this, but how about only displaying a warning? The file is in fact properly encrypted if at least one key worked. Obviously, it's just misleading for the user, so a warning message to correct that should also be alright, don't you think? Moreover, just checking the presence of the key is then not enough, we need to open the file and parse the key.

blankdots commented 1 year ago

warning sounds good i will change my PR