Commit b451ef27 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

update python-gnupg version. Fixes #8051

parent 38b940ef
...@@ -229,7 +229,7 @@ def handle_status(self, key, value): ...@@ -229,7 +229,7 @@ def handle_status(self, key, value):
"DECRYPTION_OKAY", "INV_SGNR", "FILE_START", "FILE_ERROR", "DECRYPTION_OKAY", "INV_SGNR", "FILE_START", "FILE_ERROR",
"FILE_DONE", "PKA_TRUST_GOOD", "PKA_TRUST_BAD", "BADMDC", "FILE_DONE", "PKA_TRUST_GOOD", "PKA_TRUST_BAD", "BADMDC",
"GOODMDC", "NO_SGNR", "NOTATION_NAME", "NOTATION_DATA", "GOODMDC", "NO_SGNR", "NOTATION_NAME", "NOTATION_DATA",
"PROGRESS"): "PROGRESS", "PINENTRY_LAUNCHED", "NEWSIG"):
pass pass
elif key == "BADSIG": elif key == "BADSIG":
self.valid = False self.valid = False
...@@ -509,7 +509,8 @@ def __nonzero__(self): ...@@ -509,7 +509,8 @@ def __nonzero__(self):
def handle_status(self, key, value): def handle_status(self, key, value):
if key in ("ENC_TO", "USERID_HINT", "GOODMDC", "END_DECRYPTION", if key in ("ENC_TO", "USERID_HINT", "GOODMDC", "END_DECRYPTION",
"BEGIN_SIGNING", "NO_SECKEY", "ERROR", "NODATA", "PROGRESS", "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 # in the case of ERROR, this is because a more specific error
# message will have come first # message will have come first
pass pass
...@@ -557,7 +558,8 @@ def __str__(self): ...@@ -557,7 +558,8 @@ def __str__(self):
return self.fingerprint or '' return self.fingerprint or ''
def handle_status(self, key, value): 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 pass
elif key == "KEY_CREATED": elif key == "KEY_CREATED":
(self.type,self.fingerprint) = value.split() (self.type,self.fingerprint) = value.split()
...@@ -1202,10 +1204,8 @@ def gen_key_input(self, **kwargs): ...@@ -1202,10 +1204,8 @@ def gen_key_input(self, **kwargs):
parms.setdefault('Key-Type','RSA') parms.setdefault('Key-Type','RSA')
parms.setdefault('Key-Length',2048) parms.setdefault('Key-Length',2048)
parms.setdefault('Name-Real', "Autogenerated Key") parms.setdefault('Name-Real', "Autogenerated Key")
try: logname = (os.environ.get('LOGNAME') or os.environ.get('USERNAME') or
logname = os.environ['LOGNAME'] 'unspecified')
except KeyError:
logname = os.environ['USERNAME']
hostname = socket.gethostname() hostname = socket.gethostname()
parms.setdefault('Name-Email', "%s@%s" % (logname.replace(' ', '_'), parms.setdefault('Name-Email', "%s@%s" % (logname.replace(' ', '_'),
hostname)) 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