Commit b451ef27 authored by Yann Leboulanger's avatar Yann Leboulanger

update python-gnupg version. Fixes #8051

parent 38b940ef
......@@ -229,7 +229,7 @@ class Verify(object):
"DECRYPTION_OKAY", "INV_SGNR", "FILE_START", "FILE_ERROR",
"FILE_DONE", "PKA_TRUST_GOOD", "PKA_TRUST_BAD", "BADMDC",
"GOODMDC", "NO_SGNR", "NOTATION_NAME", "NOTATION_DATA",
"PROGRESS"):
"PROGRESS", "PINENTRY_LAUNCHED", "NEWSIG"):
pass
elif key == "BADSIG":
self.valid = False
......@@ -509,7 +509,8 @@ class Crypt(Verify, TextHandler):
def handle_status(self, key, value):
if key in ("ENC_TO", "USERID_HINT", "GOODMDC", "END_DECRYPTION",
"BEGIN_SIGNING", "NO_SECKEY", "ERROR", "NODATA", "PROGRESS",
"CARDCTRL", "BADMDC", "SC_OP_FAILURE", "SC_OP_SUCCESS"):
"CARDCTRL", "BADMDC", "SC_OP_FAILURE", "SC_OP_SUCCESS",
"PINENTRY_LAUNCHED"):
# in the case of ERROR, this is because a more specific error
# message will have come first
pass
......@@ -557,7 +558,8 @@ class GenKey(object):
return self.fingerprint or ''
def handle_status(self, key, value):
if key in ("PROGRESS", "GOOD_PASSPHRASE", "NODATA", "KEY_NOT_CREATED"):
if key in ("PROGRESS", "GOOD_PASSPHRASE", "NODATA", "KEY_NOT_CREATED",
"PINENTRY_LAUNCHED"):
pass
elif key == "KEY_CREATED":
(self.type,self.fingerprint) = value.split()
......@@ -1202,10 +1204,8 @@ class GPG(object):
parms.setdefault('Key-Type','RSA')
parms.setdefault('Key-Length',2048)
parms.setdefault('Name-Real', "Autogenerated Key")
try:
logname = os.environ['LOGNAME']
except KeyError:
logname = os.environ['USERNAME']
logname = (os.environ.get('LOGNAME') or os.environ.get('USERNAME') or
'unspecified')
hostname = socket.gethostname()
parms.setdefault('Name-Email', "%s@%s" % (logname.replace(' ', '_'),
hostname))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment