Skip to contentSkip to conversation

gnupg: Add gpg status output to debug logging

PATCH In review Kees Cook 2 participants 2 messages Oct 7, 2021

lore
Share & tools
lore

Kees Cook

author
#0 lore raw

PATCH 1/1 gnupg: Add gpg status output to debug logging

There wasn't an easy way to see how a failure was being determined by GPG, so add the entire GPG status output to the debug log.

---
 patatt/__init__.py | 1 +
 1 file changed, 1 insertion(+)
patatt/__init__.py +1 -0
index 2e33bce209e2..6f4591973751 100644
@@ -371,6 +371,7 @@ class DevsigHeader:
         signtime = ''
         signkey = ''
 
+        logger.debug('GNUPG status:\n\t%s' % ("\n\t".join(status.decode().strip().split('\n'))))
         gs_matches = re.search(rb'^\[GNUPG:] GOODSIG ([0-9A-F]+)\s+(.*)$', status, flags=re.M)
         if gs_matches:
             good = True
Signature · 1 line
2.30.2
#1 lore raw
Quoted 4 lines · Kees Cook

There wasn't an easy way to see how a failure was being determined by GPG, so add the entire GPG status output to the debug log.

Applied with minor stylistic changes to both main and stable-0.4.y, thanks!

[1/1] gnupg: Add gpg status output to debug logging

      commit: a7ec0c10429bb1e14591e33c08baf3aee28c26dd

Best regards,

Signature · 1 line
Konstantin Ryabitsev <[email protected]>