[projects/pld-ftp-admin] sign: count a damaged signature as not signed by sign_key

arekm arekm at pld-linux.org
Tue Oct 27 23:50:14 CET 2026


commit 7affd3e05d58e8137826eef4b48ed28ce8f325e9
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Tue Oct 27 22:09:16 2026 +0100

    sign: count a damaged signature as not signed by sign_key
    
    rpm reads a header whose DSA signature block is not an OpenPGP
    signature, as DSA signatures are not verified, and prints it as
    "(not an OpenPGP signature)".  is_signed() expected comma separated
    fields there and stopped with an IndexError: pfa-mvpkg and
    pfa-testmvpkg into a signed tree, pfa-signpkg and pfa-checksign.  Such
    a file now counts as not signed, so it is reported or signed again.

 modules/sign.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/modules/sign.py b/modules/sign.py
index 2879ecd..bbda74d 100644
--- a/modules/sign.py
+++ b/modules/sign.py
@@ -18,7 +18,11 @@ def getSigInfo(hdr):
     if siginfo == '(none)':
         return None
 
-    return siginfo.split(',')[2].lstrip()
+    fields = siginfo.split(',')
+    if len(fields) < 3:
+        # "(not an OpenPGP signature)": a damaged signature, by no key
+        return ''
+    return fields[2].lstrip()
 
 def is_signed(rpm_file):
     """Returns rpm information is package signed by the same key"""
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/projects/pld-ftp-admin.git/commitdiff/dcb7070978482eea3347fd0bed77fd94e0d0de4e



More information about the pld-cvs-commit mailing list