[Pkg-privacy-commits] [torbrowser-launcher] 28/48: launcher.py: Add method calls to common.refresh_keyring on signature verify failures.
Roger Shimizu
rosh at moszumanska.debian.org
Mon Sep 4 16:42:33 UTC 2017
This is an automated email from the git hooks/post-receive script.
rosh pushed a commit to branch debian/sid
in repository torbrowser-launcher.
commit fd5ea4fd2c76c608518299097be1787fd4ad78a4
Author: Dan Snider <dan at dephekt.net>
Date: Thu Apr 13 17:24:42 2017 -0500
launcher.py: Add method calls to common.refresh_keyring on signature verify failures.
---
torbrowser_launcher/common.py | 6 ++----
torbrowser_launcher/launcher.py | 8 ++++++--
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/torbrowser_launcher/common.py b/torbrowser_launcher/common.py
index 0a11109..17a2b12 100644
--- a/torbrowser_launcher/common.py
+++ b/torbrowser_launcher/common.py
@@ -212,16 +212,14 @@ class Common:
'--keyserver', 'pool.sks-keyservers.net',
'--recv-keys', fingerprint], stderr=subprocess.PIPE)
- for output in p.stderr.readlines():
- print output
+ print('Refreshing Missing public key(s): ' + fingerprint)
else:
p = subprocess.Popen(['/usr/bin/gpg', '--status-fd', '2',
'--homedir', self.paths['gnupg_homedir'],
'--keyserver', 'pool.sks-keyservers.net',
'--refresh-keys'], stderr=subprocess.PIPE)
- for output in p.stderr.readlines():
- print output
+ print('Refreshing local keyring.')
def import_key_and_check_status(self, key):
"""Import a GnuPG key and check that the operation was successful.
diff --git a/torbrowser_launcher/launcher.py b/torbrowser_launcher/launcher.py
index 2c70b61..b09548b 100644
--- a/torbrowser_launcher/launcher.py
+++ b/torbrowser_launcher/launcher.py
@@ -526,7 +526,9 @@ class Launcher:
"""
sigerror = 'SIGNATURE VERIFICATION FAILED!\n\nError Code: {0}\n\nYou might be under attack, there might' \
' be a network\nproblem, or you may be missing a recently added\nTor Browser verification key.' \
- '\n\nFor support, report the above error code.\nClick Start to try again.'.format(sigerror)
+ '\nClick Start to refresh the keyring and try again. If the message persists report the above' \
+ ' error code here:\nhttps://github.com/micahflee/torbrowser-launcher/issues'.format(sigerror)
+
self.set_gui('task', sigerror, ['start_over'], False)
self.clear_ui()
self.build_ui()
@@ -545,6 +547,7 @@ class Launcher:
if result[1] == 'Bad signature':
gui_raise_sigerror(self, str(e))
elif result[1] == 'No public key':
+ self.common.refresh_keyring(result[0])
gui_raise_sigerror(self, str(e))
else:
self.run_task()
@@ -557,7 +560,8 @@ class Launcher:
if p.returncode == 0:
self.run_task()
else:
- gui_raise_sigerror(self, 'VERIFY_FAIL_NO_GPGME')
+ self.common.refresh_keyring()
+ gui_raise_sigerror(self, 'GENERIC_VERIFY_FAIL')
if not reactor.running:
reactor.run()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/torbrowser-launcher.git
More information about the Pkg-privacy-commits
mailing list