Am 06.07.2017 um 14:01 schrieb Justus Winter:
>> 2.) Is there a way to safely distinguish "User clicked cancel when asked
>> for the passphrase" from other errors? I think an application should
>> abort silently in this case, but I'm getting another GPGMEError without
>> any clue to the reason.
> Maybe.  GPGMEError is a very general error, this is a bit of pyme
> legacy.  You can inspect the error code using .getcode().  For a quick
> check, try to str() the error.
Thank you for the quick answer. I gave it a try with 3 tests, one
decrypt with cancel'ing the pinentry, one with missing private key and
one with a truncated input file. All three gave

print str(e): Invocation of gpgme_op_decrypt_verify: GPGME: Decryption
failed
print e.getcode(): 152

So this doesn't help. But good to know someone is working on this; I'd
be happy to help where I can. I am not a C developer, though, but I
could test if neccessary.

Bye,
Andreas

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users

Reply via email to