summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2009-03-11 15:16:26 +0200
committerPanu Matilainen <pmatilai@redhat.com>2009-03-11 15:16:26 +0200
commitc7aad74879349dcb0a7b3fbdae9ba4fdc54adea4 (patch)
tree8c13daa0a4ff26ce43d8b59be324c587ffa144c6 /lib
parentb8b970a94c310346666069c781dc185d6a54aff0 (diff)
downloadrpm-c7aad74879349dcb0a7b3fbdae9ba4fdc54adea4.tar.gz
rpm-c7aad74879349dcb0a7b3fbdae9ba4fdc54adea4.tar.bz2
rpm-c7aad74879349dcb0a7b3fbdae9ba4fdc54adea4.zip
Size signature failures are always RPMRC_FAIL
- these failures cannot be "fixed" by importing a key, RPMRC_NOKEY is wrong - streamline a bit by assuming failure
Diffstat (limited to 'lib')
-rw-r--r--lib/signature.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/signature.c b/lib/signature.c
index 9ead16c58..5763f3792 100644
--- a/lib/signature.c
+++ b/lib/signature.c
@@ -969,13 +969,12 @@ static const char * rpmSigString(rpmRC res)
static rpmRC
verifySizeSignature(rpmtd sigtd, size_t nbytes, char ** msg)
{
- rpmRC res;
+ rpmRC res = RPMRC_FAIL; /* assume failure */
size_t size = 0x7fffffff;
const char * title = _("Header+Payload size:");
*msg = NULL;
if (sigtd->data == NULL || nbytes == 0) {
- res = RPMRC_NOKEY;
rasprintf(msg, "%s %s\n", title, rpmSigString(res));
goto exit;
}
@@ -983,7 +982,6 @@ verifySizeSignature(rpmtd sigtd, size_t nbytes, char ** msg)
memcpy(&size, sigtd->data, sizeof(size));
if (size != nbytes) {
- res = RPMRC_FAIL;
rasprintf(msg, "%s %s Expected(%zd) != (%zd)\n", title,
rpmSigString(res), size, nbytes);
} else {