commit: 24aa5eb9f92883fb0fb3e7222b78eeddf33b9bf6
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 29 06:39:47 2015 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sat Aug 8 15:51:40 2015 +0000
URL: https://gitweb.gentoo.org/proj/gentoo-keys.git/commit/?id=24aa5eb9
gkeys/lib.py: Creation of the code for the verify_text()
gkeys/gkeys/lib.py | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/gkeys/gkeys/lib.py b/gkeys/gkeys/lib.py
index 528464b..5ad1aab 100644
--- a/gkeys/gkeys/lib.py
+++ b/gkeys/gkeys/lib.py
@@ -318,10 +318,19 @@ class GkeysGPG(GPG):
pass
- def verify_text(self, text):
+ def verify_text(self, gkey, text, filepath=None):
'''Verify a text block in memory
+
+ @param gkey: GKEY instance of the gpg key used to verify it
+ @param text: string of the of the text to verify
+ @param filepath: optional string with the path or url of the signed
file
'''
- pass
+ self.set_keydir(gkey.keydir, 'verify', fingerprint=False, reset=True)
+ self.logger.debug("** Calling runGPG with Running 'gpg %s --verify %s'"
+ % (' '.join(self.config['tasks']['verify']), filepath))
+ results = self.runGPG(task='verify', inputfile=filepath, inputtxt=text)
+ self._log_result('verification', gkey, results)
+ return results
def verify_file(self, gkey, signature, filepath):