2014-01-12 | Paul Boddie | raw annotate files changeset graph | Updated the action to use the MessageInterface abstraction. Made the getfiles script use the command language. Introduced specific content types for command sequences and responses. Reversed the order of operations in the getfiles script to be compatible with the action (so that signing occurs before encryption). |
1 #!/usr/bin/env python 2 3 from MoinMessage import GPG 4 from email.parser import Parser 5 import sys 6 7 if __name__ == "__main__": 8 try: 9 keyid = sys.argv[1] 10 except IndexError: 11 print >>sys.stderr, "Need a signing key identifier." 12 sys.exit(1) 13 14 message = Parser().parse(sys.stdin) 15 16 gpg = GPG() 17 text = gpg.signMessage(message, keyid) 18 19 # Show the resulting message text. 20 21 print text 22 23 # vim: tabstop=4 expandtab shiftwidth=4