From: rmurray <> Date: Mon, 4 Jun 2007 01:56:44 +0000 (+0000) Subject: RT #70: Fix SUBKEY signatures; update some error cases to more recent gpgv docs X-Git-Tag: debian_userdir-ldap_0-3-14~12 X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap.git;a=commitdiff_plain;h=734f08196ff3c48d9f7440bf8731f3cd72f128aa RT #70: Fix SUBKEY signatures; update some error cases to more recent gpgv docs --- diff --git a/userdir_gpg.py b/userdir_gpg.py index 59e7400..ab192c7 100644 --- a/userdir_gpg.py +++ b/userdir_gpg.py @@ -368,12 +368,12 @@ def GPGCheckSig(Message): Why = "Unable to verify signature, signing key missing."; # Expired signature - if Split[1] == "SIGEXPIRED": + if Split[1] == "SIGEXPIRED" or Split[1] == "EXPSIG": GoodSig = 0; Why = "Signature has expired"; # Revoked key - if Split[1] == "KEYREVOKED": + if Split[1] == "KEYREVOKED" or Split[1] == "REVKEYSIG": GoodSig = 0; Why = "Signing key has been revoked"; @@ -389,7 +389,11 @@ def GPGCheckSig(Message): # ValidSig has the key finger print if Split[1] == "VALIDSIG": - KeyFinger = Split[2]; + # Use the fingerprint of the primary key when available + if len(Split) >= 12: + KeyFinger = Split[11]; + else: + KeyFinger = Split[2]; # Reopen the stream as a readable stream Text = Res[2].read();