LeoIannacone / goopg

GPG for Gmail in Chrome and Chromium
http://leoiannacone.github.io/goopg/
GNU General Public License v3.0
53 stars 5 forks source link

Debian unstable #27

Closed davesteele closed 7 years ago

davesteele commented 7 years ago

I am unable to get the extension to work in Debian Sid, using either Chrome or Chromium. The log says that 'gpg-agent is not available in this session', but it is running, and is available from other contexts.

Note that Sid is undergoing a transition from gpg1 to gpg2. '/usr/bin/gpg' doesn't currently exist. It appears that goopg explicitly calls gpg2, which is available.

I was able to get the extension to work on Lubuntu 16.04, using Chrome 53.0.2785.116-1 and a throwaway key.

$ dpkg --list | grep gnupg ii gnupg-agent 2.1.11-7 amd64 GNU privacy guard - cryptographic agent ii gnupg1 1.4.21-1 amd64 GNU privacy guard - a free PGP replacement ("classic" version) ii gnupg1-curl 1.4.21-1 amd64 GNU privacy guard - a free PGP replacement (cURL helpers for "classic" version) ii gnupg1-l10n 1.4.21-1 all GNU privacy guard "classic" - localization files ii gnupg2 2.1.11-7 amd64 GNU privacy guard - a free PGP replacement (new v2.x) ii python-gnupg 0.3.8-3 all Python wrapper for the GNU Privacy Guard (Python 2.x)

$ dpkg --list | grep chrom ii chromium 53.0.2785.113-1 amd64 web browser ii google-chrome-stable 53.0.2785.116-1 amd64 The web browser from Google ii goopg-chrome 0.3.1 all GPG for Gmail - Chrome browser plugin ii goopg-chromium 0.3.1 all GPG for Gmail - Chromium browser plugin ii libchromaprint1:amd64 1:1.3.2-dmo1 amd64 Audio fingerprint library ii xserver-xorg-video-openchrome 1:0.3.3+git20160310-1 amd64 X.Org X server -- VIA display driver

log:

2016-09-29 19:05:48,552:INFO:Gmail:getting message 15775dc532f299b6 2016-09-29 19:05:50,019:DEBUG:Gmail:message id 15775dc532f299b6 MIME-Version: 1.0^M Received: by 10.31.162.1 with HTTP; Thu, 29 Sep 2016 05:12:36 -0700 (PDT)^M To: Dave Steele dsteele@gmail.com^M Date: Thu, 29 Sep 2016 08:12:36 -0400^M Message-ID: CAOHcdNZUOgQyOdt0iZq0xn9P6eQqyP98BYsVtMV2-Yw=uRgGug@mail.gmail.com^M Subject: test^M From: David Steele steele@debian.org^M Content-Type: text/plain; charset=UTF-8^M ^M test^M

2016-09-29 19:05:50,020:DEBUG:gnupg:sign_file: <_io.BytesIO object at 0x7f63eab33b90> 2016-09-29 19:05:50,020:DEBUG:gnupg:['gpg1', '--status-fd', '2', '--no-tty', '--use-agent', '-sa', '--detach-sign'] 2016-09-29 19:05:50,026:DEBUG:gnupg:data copier: <Thread(Thread-15, initial daemon)>, <_io.BytesIO object at 0x7f63eab33b90>, <open file '', mode 'wb' at 0x7f63ec60ded0> 2016-09-29 19:05:50,026:DEBUG:gnupg:sending chunk (115): 'Content-Type: text/plain; charset="utf-8"\r\nMIME-Version: 1.0\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\ntest\r\n' 2016-09-29 19:05:50,027:DEBUG:gnupg:stderr reader: <Thread(Thread-16, initial daemon)> 2016-09-29 19:05:50,027:DEBUG:gnupg:closed output, 115 bytes sent 2016-09-29 19:05:50,028:DEBUG:gnupg:stdout reader: <Thread(Thread-17, initial daemon)> 2016-09-29 19:05:50,035:DEBUG:gnupg:[GNUPG:] USERID_HINT 627EBB290A817A82 David Steele steele@debian.org 2016-09-29 19:05:50,036:DEBUG:gnupg:[GNUPG:] NEED_PASSPHRASE 627EBB290A817A82 8A3171EF366150CE 1 0 2016-09-29 19:05:50,037:DEBUG:gnupg:gpg: gpg-agent is not available in this session 2016-09-29 19:05:50,037:DEBUG:gnupg:gpg: Sorry, no terminal at all requested - can't get input 2016-09-29 19:05:50,037:ERROR:GPGMail:signature Content-Type: text/plain; charset="utf-8"^M MIME-Version: 1.0^M Content-Transfer-Encoding: quoted-printable^M ^M test^M

2016-09-29 19:05:50,038:ERROR:CommandHandler:Invalid signature hash_algo None Traceback (most recent call last): File "/usr/share/goopg/commandhandler.py", line 88, in sign new_message = self.gpgmail.sign(draft) File "/usr/share/goopg/gpgmail.py", line 171, in sign micalg = "pgp-{}".format(self._get_digest_algo(signature).lower()) File "/usr/share/goopg/gpgmail.py", line 135, in _get_digest_algo raise TypeError("Invalid signature hash_algo {}".format(hash_algo)) TypeError: Invalid signature hash_algo None

$ gpg2 --list-secret-keys 8A3171EF366150CE sec rsa4096/366150CE 2010-08-15 [SC] uid [ unknown] David Steele steele@debian.org uid [ unknown] David Steele daves@users.sourceforge.net uid [ unknown] David Steele dsteele@gmail.com ssb rsa4096/0D929394 2010-08-15 [E] ssb rsa4096/0A817A82 2014-08-15 [S] [expires: 2019-08-14]

davesteele commented 7 years ago

A new gnupg and gpg-agent loaded yesterday, and the extension now works.

LeoIannacone commented 7 years ago

Cool! can you paste here the exact version and the debian changelog entry just for the records?

davesteele commented 7 years ago

gnupg 2.1.15-3 gnupg-agent 2.1.15-3

gnupg2 (2.1.15-3) unstable; urgency=medium

gnupg2 (2.1.15-2) unstable; urgency=medium

gnupg2 (2.1.15-1) unstable; urgency=medium

See also https://debian-administration.org/users/dkg/weblog/116