[gnome-keysign: 2/22] gpgmeh: remove detection for crashy gpgme
- From: Tobias Mueller <tobiasmue src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-keysign: 2/22] gpgmeh: remove detection for crashy gpgme
- Date: Thu, 24 Oct 2019 14:58:35 +0000 (UTC)
commit c7e524ba3e6dbf3c31d99197bcee50d51542a84f
Author: Tobias Mueller <muelli cryptobitch de>
Date: Tue Sep 10 10:16:08 2019 +0200
gpgmeh: remove detection for crashy gpgme
We used to work around a bug on 32bit platforms which crashed the
process. It's been a while and we may as well assume that the issue has
been fixed for good.
This neatly solves a problem of the gpgme version returning not only
ints, but also strings. We don't handle that case very well.
keysign/gpgmeh.py | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
---
diff --git a/keysign/gpgmeh.py b/keysign/gpgmeh.py
index 1a69562..7703c7f 100755
--- a/keysign/gpgmeh.py
+++ b/keysign/gpgmeh.py
@@ -38,16 +38,6 @@ texttype = unicode if sys.version_info.major < 3 else str
log = logging.getLogger(__name__)
-major, minor, patch = map(int, gpg.version.versionlist)
-# Due to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=884900
-# we'd crash if we're accessing signatures on a key.
-# With this test we can try to avoid that as much as possible.
-on32bit = platform.architecture()[0] == "32bit"
-crashing_gpgme = on32bit and major <= 1 and minor <= 10 and patch <= 0
-log.info("Detected gpgme (%d.%d.%d). %s", major, minor, patch, "And it might crash" if crashing_gpgme else
"")
-
-
-
#####
## INTERNAL API
##
@@ -505,6 +495,7 @@ def sign_keydata_and_encrypt(keydata, error_cb=None, homedir=None):
else:
log.debug("The UID %s has %d signatures",
uid, len(uid.signatures))
+ log.debug("Data for uid %d: %r, sigs: %r %r", i, uid, uid.signatures, uid_data)
if len(uid.signatures) < 2:
log.error("We seem to not have produced signatures correctly. "
"%s has less than 2 signatures: %s",
@@ -512,10 +503,6 @@ def sign_keydata_and_encrypt(keydata, error_cb=None, homedir=None):
)
uid_data = UIDExport(signed_keydata, i)
- # FIXME: Check whether this bug is resolved and the remove this conditional
- # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=884900
- if not crashing_gpgme:
- log.debug("Data for uid %d: %r, sigs: %r %r", i, uid, uid.signatures, uid_data)
ciphertext, _, _ = ctx.encrypt(plaintext=uid_data,
recipients=[key],
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]