X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=daklib%2Futils.py;h=2b40219c12bf0ff8823a4cb8d4ff13e1f3d9adc6;hb=5147b67a4c51905b6e35927b7a022e063a730d8a;hp=9758fc97400d0ee45c7b549caa5d736e44f56a73;hpb=6c92853af8a7ca65fad19cb0f1a0ffaecec48fb7;p=dak.git diff --git a/daklib/utils.py b/daklib/utils.py old mode 100644 new mode 100755 index 9758fc97..2b40219c --- a/daklib/utils.py +++ b/daklib/utils.py @@ -885,7 +885,7 @@ def process_gpgv_output(status): internal_error += "gpgv status line is malformed (incorrect prefix '%s').\n" % (gnupg) continue args = split[2:] - if keywords.has_key(keyword) and (keyword != "NODATA" and keyword != "SIGEXPIRED"): + if keywords.has_key(keyword) and keyword not in [ "NODATA", "SIGEXPIRED", "KEYEXPIRED" ]: internal_error += "found duplicate status token ('%s').\n" % (keyword) continue else: @@ -939,7 +939,7 @@ on error.""" ################################################################################ -def gpg_keyring_args(keyrings=None) +def gpg_keyring_args(keyrings=None): if not keyrings: keyrings = Cnf.ValueList("Dinstall::GPGKeyring") @@ -1002,9 +1002,6 @@ used.""" bad = "" # Now check for obviously bad things in the processed output - if keywords.has_key("SIGEXPIRED"): - reject("The key used to sign %s has expired." % (sig_filename)) - bad = 1 if keywords.has_key("KEYREVOKED"): reject("The key used to sign %s has been revoked." % (sig_filename)) bad = 1 @@ -1026,6 +1023,9 @@ used.""" if keywords.has_key("NODATA"): reject("no signature found in %s." % (sig_filename)) bad = 1 + if keywords.has_key("KEYEXPIRED") and not keywords.has_key("GOODSIG"): + reject("The key (0x%s) used to sign %s has expired." % (key, sig_filename)) + bad = 1 if bad: return None @@ -1060,7 +1060,7 @@ used.""" # Finally ensure there's not something we don't recognise known_keywords = Dict(VALIDSIG="",SIG_ID="",GOODSIG="",BADSIG="",ERRSIG="", SIGEXPIRED="",KEYREVOKED="",NO_PUBKEY="",BADARMOR="", - NODATA="") + NODATA="",NOTATION_DATA="",NOTATION_NAME="",KEYEXPIRED="") for keyword in keywords.keys(): if not known_keywords.has_key(keyword):