From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 264D41386F1 for ; Sun, 9 Aug 2015 01:09:45 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CEA6514145; Sun, 9 Aug 2015 01:09:40 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5F3851419B for ; Sun, 9 Aug 2015 01:09:39 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B2660340B4F for ; Sun, 9 Aug 2015 01:09:38 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0571A13B for ; Sun, 9 Aug 2015 01:09:34 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1439049100.24aa5eb9f92883fb0fb3e7222b78eeddf33b9bf6.dolsen@gentoo> Subject: [gentoo-commits] proj/gentoo-keys:master commit in: gkeys/gkeys/ X-VCS-Repository: proj/gentoo-keys X-VCS-Files: gkeys/gkeys/lib.py X-VCS-Directories: gkeys/gkeys/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 24aa5eb9f92883fb0fb3e7222b78eeddf33b9bf6 X-VCS-Branch: master Date: Sun, 9 Aug 2015 01:09:34 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: fec2ed65-b0f6-495f-8a5b-087caa9c6c29 X-Archives-Hash: 8c87e05fcbd97da87aa1c99599123572 commit: 24aa5eb9f92883fb0fb3e7222b78eeddf33b9bf6 Author: Brian Dolbec gentoo org> AuthorDate: Wed Jul 29 06:39:47 2015 +0000 Commit: Brian Dolbec gentoo 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):