Explorar el Código

gpgv: use EXPKEYSIG instead of KEYEXPIRED

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.
David Kalnischkies hace 10 años
padre
commit
f13b413a3b
Se han modificado 2 ficheros con 5 adiciones y 5 borrados
  1. 3 3
      methods/gpgv.cc
  2. 2 2
      test/integration/test-releasefile-verification

+ 3 - 3
methods/gpgv.cc

@@ -36,7 +36,7 @@ using std::vector;
 #define GNUPGNOPUBKEY "[GNUPG:] NO_PUBKEY"
 #define GNUPGNOPUBKEY "[GNUPG:] NO_PUBKEY"
 #define GNUPGVALIDSIG "[GNUPG:] VALIDSIG"
 #define GNUPGVALIDSIG "[GNUPG:] VALIDSIG"
 #define GNUPGGOODSIG "[GNUPG:] GOODSIG"
 #define GNUPGGOODSIG "[GNUPG:] GOODSIG"
-#define GNUPGKEYEXPIRED "[GNUPG:] KEYEXPIRED"
+#define GNUPGEXPKEYSIG "[GNUPG:] EXPKEYSIG"
 #define GNUPGREVKEYSIG "[GNUPG:] REVKEYSIG"
 #define GNUPGREVKEYSIG "[GNUPG:] REVKEYSIG"
 #define GNUPGNODATA "[GNUPG:] NODATA"
 #define GNUPGNODATA "[GNUPG:] NODATA"
 
 
@@ -182,10 +182,10 @@ string GPGVMethod::VerifyGetSigners(const char *file, const char *outfile,
             std::clog << "Got NODATA! " << std::endl;
             std::clog << "Got NODATA! " << std::endl;
          BadSigners.push_back(string(buffer+sizeof(GNUPGPREFIX)));
          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)
          if (Debug == true)
-            std::clog << "Got KEYEXPIRED! " << std::endl;
+            std::clog << "Got EXPKEYSIG! " << std::endl;
          WorthlessSigners.push_back(string(buffer+sizeof(GNUPGPREFIX)));
          WorthlessSigners.push_back(string(buffer+sizeof(GNUPGPREFIX)));
       }
       }
       else if (strncmp(buffer, GNUPGREVKEYSIG, sizeof(GNUPGREVKEYSIG)-1) == 0)
       else if (strncmp(buffer, GNUPGREVKEYSIG, sizeof(GNUPGREVKEYSIG)-1) == 0)

+ 2 - 2
test/integration/test-releasefile-verification

@@ -123,7 +123,7 @@ runtest() {
 	cp keys/rexexpired.pub rootdir/etc/apt/trusted.gpg.d/rexexpired.gpg
 	cp keys/rexexpired.pub rootdir/etc/apt/trusted.gpg.d/rexexpired.gpg
 	signreleasefiles 'Rex Expired'
 	signreleasefiles 'Rex Expired'
 	find aptarchive/ -name "$DELETEFILE" -delete
 	find aptarchive/ -name "$DELETEFILE" -delete
-	updatewithwarnings '^W: .* KEYEXPIRED'
+	updatewithwarnings '^W: .* EXPKEYSIG'
 	testsuccessequal "$(cat "${PKGFILE}")
 	testsuccessequal "$(cat "${PKGFILE}")
 " aptcache show apt
 " aptcache show apt
 	failaptold
 	failaptold
@@ -172,7 +172,7 @@ runtest() {
 	cp keys/rexexpired.pub rootdir/etc/apt/trusted.gpg.d/rexexpired.gpg
 	cp keys/rexexpired.pub rootdir/etc/apt/trusted.gpg.d/rexexpired.gpg
 	signreleasefiles 'Rex Expired'
 	signreleasefiles 'Rex Expired'
 	find aptarchive/ -name "$DELETEFILE" -delete
 	find aptarchive/ -name "$DELETEFILE" -delete
-	updatewithwarnings '^W: .* KEYEXPIRED'
+	updatewithwarnings '^W: .* EXPKEYSIG'
 	testsuccessequal "$(cat "${PKGFILE}")
 	testsuccessequal "$(cat "${PKGFILE}")
 " aptcache show apt
 " aptcache show apt
 	installaptold
 	installaptold