Sign Message-Id header if present
PATCH 1/3 Sign Message-Id header if present
It is useful to sign the message-id header, because it is frequently used as the patch identifier. Unfortunately, unless git-format-patch is run with --thread, the message-id won't be generated until *after* the sendemail-validate hook is invoked, so most of the time we won't end up signing that header.
However, having this as an option is handy.
Signed-off-by Konstantin Ryabitsev <[email protected]>
--- man/patatt.5 | 2 +- man/patatt.5.rst | 4 +-- patatt/__init__.py | 68 ++++++++++++++++++++++++++++++++-------------- 3 files changed, 51 insertions(+), 23 deletions(-)
man/patatt.5 +1 -1
@@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH PATATT 5 "2021-05-11" "0.2.0" "" +.TH PATATT 5 "2021-05-21" "0.4.0" "" .SH NAME PATATT \- DKIM-like cryptographic patch attestation .
man/patatt.5.rst +2 -2
@@ -5,10 +5,10 @@ DKIM-like cryptographic patch attestation ----------------------------------------- :Author: [email protected] -:Date: 2021-05-11 +:Date: 2021-05-21 :Copyright: The Linux Foundation and contributors :License: MIT-0 -:Version: 0.2.0 +:Version: 0.4.0 :Manual section: 5 SYNOPSIS
patatt/__init__.py +48 -20
103 lines not on this page · raw message
Signature · 1 line
2.31.1
PATCH 2/3 Make header order deterministic
I know that it doesn't matter, but the OCD part of me likes seeing the h= value in a deterministic order.
Signed-off-by Konstantin Ryabitsev <[email protected]>
--- patatt/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
patatt/__init__.py +2 -2
@@ -149,8 +149,8 @@ class DevsigHeader: raise SigningError('The following required headers not present: %s' % (b', '.join(reqset.difference(allhdrs)).decode())) # Add optional headers that are actually present - optpresent = allhdrs.intersection(optset) - signlist = list(reqset.union(optpresent)) + optpresent = list(allhdrs.intersection(optset)) + signlist = REQ_HDRS + sorted(optpresent) self.hdata['h'] = b':'.join(signlist) elif mode == 'validate':
Signature · 1 line
2.31.1
PATCH 3/3 Release as 0.4.0
In reply to Konstantin RyabitsevLet's bump to 0.4.0, so we can pull that into b4.
Signed-off-by Konstantin Ryabitsev <[email protected]>
--- patatt/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
patatt/__init__.py +1 -1
@@ -47,7 +47,7 @@ OPT_HDRS = [b'message-id'] KEYCACHE = dict() # My version -__VERSION__ = '0.4.0-dev' +__VERSION__ = '0.4.0' MAX_SUPPORTED_FORMAT_VERSION = 1
Signature · 1 line
2.31.1