PINENTRY_LAUNCHED is not supported when exporting keys

Issue #43 resolved
Anonymous created an issue

When exporting a key in GPG2, the user may be prompted for a passphrae. This makes python-gnupg raise Unknown status message: u'PINENTRY_LAUNCHED'

Comments (5)

  1. Ian Denhardt

    I can confirm this. export_keys uses a DeleteResult (with a comment "any result will do") rather than its own result type. The comment is probably incorrect, since a bad passphrase could result in failure to export the key. @Vinay Sajip, is my intuition correct that this probably ought to have its own result type?

    The only other place in the code where something like this is done is in GPG.init.

  2. Vinay Sajip repo owner

    is my intuition correct that this probably ought to have its own result type?

    Perhaps one of the existing types which is more suitable than DeleteResult will do. BTW thanks for looking at these issues.

  3. Ian Denhardt

    You're welcome.

    Sign, Verify, Crypt and GenKey handle PINENTRY_LAUNCHED specifically, and there a few others that default to passing things through (SearchKeys's handle_status is just a no-op, SendResult logs something at debug level).

    We could probably get away with using one of these, but my gut still says we should just write a new one for export. The code for the new class probably won't be any longer than the comment explaining why export_keys needs to use e.g. GenKey as its result (rather than "anything will do").

  4. Log in to comment