From 177488cb3b5b727d5a0c93ee94b5d8b39c17ae4c Mon Sep 17 00:00:00 2001 From: root Date: Wed, 21 Feb 1996 22:20:51 +0000 Subject: [PATCH] read the signature CVS patchset: 385 CVS date: 1996/02/21 22:20:51 --- lib/package.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/package.c b/lib/package.c index 32fca42b1..8fa240ae9 100644 --- a/lib/package.c +++ b/lib/package.c @@ -10,6 +10,7 @@ #include "rpmerr.h" #include "rpmlead.h" #include "rpmlib.h" +#include "signature.h" /* 0 = success */ /* !0 = error */ @@ -39,6 +40,9 @@ int pkgReadHeader(int fd, Header * hdr, int * isSource) { oldLead->archiveOffset = ntohl(oldLead->archiveOffset); lseek(fd, oldLead->archiveOffset, SEEK_SET); } else { + if (!readSignature(fd, lead.signature_type, NULL)) { + return 2; + } *hdr = readHeader(fd); if (! *hdr) return 2; freeHeader(*hdr); @@ -47,6 +51,9 @@ int pkgReadHeader(int fd, Header * hdr, int * isSource) { if (lead.major == 1) { readOldHeader(fd, hdr, isSource); } else if (lead.major == 2) { + if (!readSignature(fd, lead.signature_type, NULL)) { + return 2; + } *hdr = readHeader(fd); if (! *hdr) return 2; } else {