aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-12-07 09:41:19 -0500
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2020-12-07 09:41:19 -0500
commitb1599fd879ae83134362e718bb9855a34b2e05f4 (patch)
tree52eeed4fa9d9b6be8672df3fe1b28a3d0e3dcb00
parent02d205ed5a9eeb9515a00bf860134a3522e59907 (diff)
downloadb4-b1599fd879ae83134362e718bb9855a34b2e05f4.tar.gz
Fix logic when adding trailers without DKIM sigs
If the message with a follow-up trailer did not include a DKIM signature, we didn't show it in the report for added trailers (we were still adding it to the resulting message). Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rw-r--r--b4/__init__.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/b4/__init__.py b/b4/__init__.py
index 695fe68..06c95db 100644
--- a/b4/__init__.py
+++ b/b4/__init__.py
@@ -1355,12 +1355,11 @@ class LoreMessage:
if len(trailer) > 3 and trailer[3] is not None:
fmsg = trailer[3]
attsig = LoreAttestationSignatureDKIM(fmsg.msg) # noqa
- if not attsig.present:
- continue
- if attsig.passing:
- extra = ' (%s %s)' % (attweak, attsig.attestor.get_trailer())
- elif attpolicy in ('softfail', 'hardfail'):
- extra = ' (%s %s)' % (attfail, attsig.attestor.get_trailer())
+ if attsig.present:
+ if attsig.passing:
+ extra = ' (%s %s)' % (attweak, attsig.attestor.get_trailer())
+ elif attpolicy in ('softfail', 'hardfail'):
+ extra = ' (%s %s)' % (attfail, attsig.attestor.get_trailer())
logger.info(' + %s: %s%s', trailer[0], trailer[1], extra)
else:
logger.debug(' . %s: %s', trailer[0], trailer[1])