]> git.saurik.com Git - apt.git/commitdiff
gpgv: use EXPKEYSIG instead of KEYEXPIRED
authorDavid Kalnischkies <david@kalnischkies.de>
Thu, 28 Apr 2016 17:05:06 +0000 (19:05 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Sun, 1 May 2016 08:50:24 +0000 (10:50 +0200)
The upstream documentation says about KEYEXPIRED:
"This status line is not very useful". Indeed, it doesn't mention which
key is expired, and suggests to use the other message which does.

methods/gpgv.cc
test/integration/test-releasefile-verification

index 60a7d4719a07ee43ec75bd2dfae8cc6e2d6a54f0..2ab8b9c9750a5314cdcff1bec2ecc43b2dbb3612 100644 (file)
@@ -36,7 +36,7 @@ using std::vector;
 #define GNUPGNOPUBKEY "[GNUPG:] NO_PUBKEY"
 #define GNUPGVALIDSIG "[GNUPG:] VALIDSIG"
 #define GNUPGGOODSIG "[GNUPG:] GOODSIG"
-#define GNUPGKEYEXPIRED "[GNUPG:] KEYEXPIRED"
+#define GNUPGEXPKEYSIG "[GNUPG:] EXPKEYSIG"
 #define GNUPGREVKEYSIG "[GNUPG:] REVKEYSIG"
 #define GNUPGNODATA "[GNUPG:] NODATA"
 
@@ -182,10 +182,10 @@ string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile,
             std::clog << "Got NODATA! " << std::endl;
          BadSigners.push_back(string(buffer+sizeof(GNUPGPREFIX)));
       }
-      else if (strncmp(buffer, GNUPGKEYEXPIRED, sizeof(GNUPGKEYEXPIRED)-1) == 0)
+      else if (strncmp(buffer, GNUPGEXPKEYSIG, sizeof(GNUPGEXPKEYSIG)-1) == 0)
       {
          if (Debug == true)
-            std::clog << "Got KEYEXPIRED! " << std::endl;
+            std::clog << "Got EXPKEYSIG! " << std::endl;
          WorthlessSigners.push_back(string(buffer+sizeof(GNUPGPREFIX)));
       }
       else if (strncmp(buffer, GNUPGREVKEYSIG, sizeof(GNUPGREVKEYSIG)-1) == 0)
index c349c44283b5de8d434c01b1face6b8a4ff0ee93..10b830449b119ec334df4e67fd849f875ef900fc 100755 (executable)
@@ -123,7 +123,7 @@ runtest() {
        cp keys/rexexpired.pub rootdir/etc/apt/trusted.gpg.d/rexexpired.gpg
        signreleasefiles 'Rex Expired'
        find aptarchive/ -name "$DELETEFILE" -delete
-       updatewithwarnings '^W: .* KEYEXPIRED'
+       updatewithwarnings '^W: .* EXPKEYSIG'
        testsuccessequal "$(cat "${PKGFILE}")
 " aptcache show apt
        failaptold
@@ -172,7 +172,7 @@ runtest() {
        cp keys/rexexpired.pub rootdir/etc/apt/trusted.gpg.d/rexexpired.gpg
        signreleasefiles 'Rex Expired'
        find aptarchive/ -name "$DELETEFILE" -delete
-       updatewithwarnings '^W: .* KEYEXPIRED'
+       updatewithwarnings '^W: .* EXPKEYSIG'
        testsuccessequal "$(cat "${PKGFILE}")
 " aptcache show apt
        installaptold