-
Notifications
You must be signed in to change notification settings - Fork 24
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
[Feature Request] disable key lookup #55
Comments
In the line you reference, To me that looks like just what you want — right? |
Nope. If I call mail-gpg/lib/mail/gpg/gpgme_helper.rb Line 126 in cbe381f
Will look up the recipient as fallback. |
As far as I understand, the code of GpgmeHelper doesn't work as you described, because [] || 'something'
=> [] But the code actually does behave similar to your description (and not like I described), because GPGME::Key.find(:public, [], :encrypt)
=> [#<GPGME::Key pub ...] So apparently a new option is required to stop the code-flow if no (usable) key could be imported from the given material. It would also make the code's behaviour less surprising, in my eyes. So I second this request. |
Sorry, I'm actually a Pythonist and thought
But anyway, just as you said I noticed that (only on some systems) |
Does that commit above (which is also part of just released v0.3.2) solve your problem or would you still require an explicit option? |
I think that might not have been enough yet to really raise an error in case of no keys. please try it out with master to include the compact call I just added. |
Ok, sorry for taking so long to give you feedback. When given an invalid key Note: The result will be an empty array when the mail address is not stored in the key chain. Thanks for keeping up the good work. I really appreciate it! |
- if the :keys option is present, do not fall back to previously imported for any recipient address without a specified key
Still no error but the just-released version 0.4 should not use any keys you did not specify in the Regarding the option to raise an error, just to make sure I get this right: you want an error to be raised whenever there is a recipient for whom no valid key was present in the :keys argument, correct? |
That would be one option (like Like so: |
Actually, I have to correct that. I just tested the examples with version |
jkraemer/mail-gpg#55 now mail-gpg raises an exception when dealing with invalid keys
Hi,
in my app I only want to use keys. So I do not want to look up keys given a mail address. If the key (given as string) does not work I would like an exception to be raised.
I think to implement this one would need to warp this line in a options check and raise some error, if the key couldn't be imported. It might well be that there are other things that have to be changed for this.
The text was updated successfully, but these errors were encountered: