From 8482e689c5000493655cfbdfc38d90b389319dc2 Mon Sep 17 00:00:00 2001 From: Brian Dolbec Date: Thu, 5 Jul 2018 08:25:56 -0700 Subject: gkeys actions.py: Additional debug logging Signed-off-by: Brian Dolbec --- gkeys/gkeys/actions.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gkeys') diff --git a/gkeys/gkeys/actions.py b/gkeys/gkeys/actions.py index f9bba7a..e480613 100644 --- a/gkeys/gkeys/actions.py +++ b/gkeys/gkeys/actions.py @@ -284,6 +284,7 @@ class Actions(ActionBase): kwargs = self.seedhandler.build_gkeydict(args) keyresults = seeds.list(**kwargs) for key in sorted(keyresults): + self.logger.debug("ACTIONS: listkey; key/keydir:" + str(key.keydir)) if args.fingerprint: result = self.gpg.list_keys(key.keydir, kwargs['fingerprint']) else: @@ -775,6 +776,7 @@ class Actions(ActionBase): self.logger.debug(_unicode( "ACTIONS: verify; keyring category not specified, using default: %s") % args.category) + self.logger.debug(_unicode("ACTIONS: verify; keyring category: %s"), args.category) keys = self.seedhandler.load_category(args.category) if not keys: return (False, ['No installed keys found, try installkey action.']) @@ -788,6 +790,7 @@ class Actions(ActionBase): args.nick = self.config.get_key('verify-nick') messages.append(_unicode("Using config defaults..: %s %s") % (args.category, args.nick)) + self.logger.debug(_unicode("ACTIONS: verify; going recursive... %s, %s"), args.category, args.nick) self.verify_recursion = True return self.verify(args, messages) elif self.verify_recursion: @@ -808,6 +811,7 @@ class Actions(ActionBase): timestamp_path = None isurl = success = verified = False if filepath.startswith('http'): + self.logger.debug(_unicode("ACTIONS: _verify; supplied url, using current directory ./%s"), filepath) isurl = True url = filepath filepath = args.destination @@ -824,6 +828,8 @@ class Actions(ActionBase): else: climit = 0 sig_path = None + get_sig = signature is not None + self.logger.debug(_unicode("ACTIONS: _verify; supplied signature %s"), signature) if isurl: fetcher = Fetch(self.logger) success, msgs = fetcher.fetch_url(url, filepath, signature, timestamp_path=timestamp_path, @@ -851,7 +857,7 @@ class Actions(ActionBase): sig_path = None elif signature: sig_path = os.path.abspath(signature) - self.logger.info("Verifying file...") + self.logger.info("Verifying file... %s, %s, %s", key, sig_path, filepath) verified = False results = self.gpg.verify_file(key, sig_path, filepath) keyid = key.keyid[0] -- cgit v1.2.3-65-gdbad