Don't get the pinentry for passphrase in some contexts

Damien Cassou damien at
Wed Jul 12 19:35:34 CEST 2017


I have the attached application below that just tries to decrypt a file
with gpg2. When the gpg-agent has an empty cache (I temporarily set
max-cache-ttl to 0 while testing), the application has different
behavior when ran from a terminal or from a Firefox add-on:

1- in the terminal, I get the pinentry application that asks me to enter
   the passphrase for the gpg key used to encrypt the file;

2- when launched from a Firefox web extension's browser action (Firefox
   itself being launched with `web-ext run` from the same terminal), I
   just get an error: "Public key decryption failed: Operation
   canceled. Decryption failed: No secret key". I'm never asked for my

Others have reported the exact same problem with another web-extension
and another native application (written in Go):

I checked the environment variables and they are very much similar (diff

Do you have any clue what could be different in the two environments
that could cause gpg2 to behave differently?

I sent the same message to the dedicated mailing-list at They
suggested I contact you.

Thank you

Damien Cassou

"Success is the ability to go from one failure to another without
losing enthusiasm." --Winston Churchill
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: index-decrypt.txt
URL: </pipermail/attachments/20170712/f155687f/attachment.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: log.diff
Type: text/x-patch
Size: 2296 bytes
Desc: not available
URL: </pipermail/attachments/20170712/f155687f/attachment.bin>

More information about the Gnupg-users mailing list