summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2001-07-08 21:30:35 +0000
committerjbj <devnull@localhost>2001-07-08 21:30:35 +0000
commitf440f450d9648f06ed8589adf7d4c1d6a286550b (patch)
tree4bc98a03029d70e39c7b7c5cc3a41603fb8d5902 /lib
parent34f1d5125146c995c49f39a41c8799c5cc3201c2 (diff)
downloadrpm-f440f450d9648f06ed8589adf7d4c1d6a286550b.tar.gz
rpm-f440f450d9648f06ed8589adf7d4c1d6a286550b.tar.bz2
rpm-f440f450d9648f06ed8589adf7d4c1d6a286550b.zip
- python: rhnLoad/rhnUnload to check header digest.
CVS patchset: 4928 CVS date: 2001/07/08 21:30:35
Diffstat (limited to 'lib')
-rw-r--r--lib/verify.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/verify.c b/lib/verify.c
index ab32448f2..84b9b94f2 100644
--- a/lib/verify.c
+++ b/lib/verify.c
@@ -348,12 +348,7 @@ int rpmVerifyDigest(Header h)
rpmDigestFinal(ctx, (void **)&digest, &digestlen, 1);
if (digest) { /* XXX can't happen */
- const char *n, *v, *r;
- (void) headerNVR(h, &n, &v, &r);
if (strcmp(hdigest, digest)) {
- rpmMessage(RPMMESS_NORMAL,
- _("%s-%s-%s: immutable header region digest check failed\n"),
- n, v, r);
ec = 1;
}
}
@@ -539,8 +534,14 @@ int showVerifyPackage(QVA_t qva, rpmdb rpmdb, Header h)
int rc;
if (qva->qva_flags & VERIFY_DIGEST) {
- if ((rc = rpmVerifyDigest(h)) != 0)
+ if ((rc = rpmVerifyDigest(h)) != 0) {
+ const char *n, *v, *r;
+ (void) headerNVR(h, &n, &v, &r);
+ rpmMessage(RPMMESS_NORMAL,
+ _("%s-%s-%s: immutable header region digest check failed\n"),
+ n, v, r);
ec = rc;
+ }
}
if (qva->qva_flags & VERIFY_DEPS) {
if ((rc = verifyDependencies(rpmdb, h)) != 0)