1.1 --- a/MoinMessage.py Sat Oct 20 18:21:20 2012 +0200
1.2 +++ b/MoinMessage.py Sat Oct 20 19:27:25 2012 +0200
1.3 @@ -86,7 +86,7 @@
1.4 if not cmd.wait():
1.5 return text
1.6 else:
1.7 - raise MoinMessageError, errors
1.8 + raise MoinMessageError, self.errors
1.9
1.10 finally:
1.11 cmd.stdout.close()
1.12 @@ -113,7 +113,22 @@
1.13
1.14 # Verify the message text.
1.15
1.16 - self.run(["--verify", signature_filename, content_filename])
1.17 + text = self.run(["--status-fd", "1", "--verify", signature_filename, content_filename])
1.18 +
1.19 + # Return the details of the signing key.
1.20 +
1.21 + for line in text.split("\n"):
1.22 + try:
1.23 + prefix, msgtype, fingerprint, details = line.strip().split(" ", 3)
1.24 + except ValueError:
1.25 + continue
1.26 +
1.27 + # Return the fingerprint and identity details.
1.28 +
1.29 + if msgtype == "GOODSIG":
1.30 + return fingerprint, details
1.31 +
1.32 + return None
1.33
1.34 finally:
1.35 os.remove(signature_filename)