Native app has different behavior when ran inside Firefox

Damien Cassou damien at cassou.me
Wed Jul 12 16:04:35 UTC 2017


Hi,

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
   passphrase.

Others have reported the exact same problem with another web-extension
and another native application (written in Go):
https://github.com/dannyvankooten/browserpass/issues/23

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

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

-- 
Damien Cassou
http://damiencassou.seasidehosting.st

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


More information about the Dev-addons mailing list