aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gkeys/gkeys/lib.py13
1 files 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):