2013-06-02 | Paul Boddie | file changeset files shortlog | Moved common functionality from the PostMessage action to the MoinMessage module and the new MoinMessageSupport module. |
paul@10 | 1 | #!/usr/bin/env python |
paul@10 | 2 | |
paul@10 | 3 | from MoinMessage import GPG |
paul@10 | 4 | from email.parser import Parser |
paul@10 | 5 | import sys |
paul@10 | 6 | |
paul@10 | 7 | if __name__ == "__main__": |
paul@10 | 8 | message = Parser().parse(sys.stdin) |
paul@10 | 9 | content, signature = message.get_payload() |
paul@10 | 10 | |
paul@10 | 11 | gpg = GPG() |
paul@10 | 12 | print gpg.verifyMessage(signature.get_payload(), content.as_string()) |
paul@10 | 13 | |
paul@10 | 14 | # vim: tabstop=4 expandtab shiftwidth=4 |