From 3eee3e56eca3058abe88e2e213d37a889af38db5 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Fri, 23 May 2008 12:10:14 +0300 Subject: [PATCH] Convert makeHDRSignature() to new headerGet() interface --- lib/signature.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/signature.c b/lib/signature.c index fe1f5c3..65ccbcc 100644 --- a/lib/signature.c +++ b/lib/signature.c @@ -662,12 +662,10 @@ static int makeHDRSignature(Header sigh, const char * file, rpmSigTag sigTag, if (headerIsEntry(h, RPMTAG_HEADERIMMUTABLE)) { DIGEST_CTX ctx; - void * uh; - rpmTagType uht; - rpm_count_t uhc; + struct rpmtd_s utd; - if (!headerGetEntry(h, RPMTAG_HEADERIMMUTABLE, &uht, &uh, &uhc) - || uh == NULL) + if (!headerGet(h, RPMTAG_HEADERIMMUTABLE, &utd, HEADERGET_DEFAULT) + || utd.data == NULL) { rpmlog(RPMLOG_ERR, _("Immutable header region could not be read. " @@ -677,9 +675,9 @@ static int makeHDRSignature(Header sigh, const char * file, rpmSigTag sigTag, } ctx = rpmDigestInit(PGPHASHALGO_SHA1, RPMDIGEST_NONE); (void) rpmDigestUpdate(ctx, header_magic, sizeof(header_magic)); - (void) rpmDigestUpdate(ctx, uh, uhc); + (void) rpmDigestUpdate(ctx, utd.data, utd.count); (void) rpmDigestFinal(ctx, (void **)&SHA1, NULL, 1); - uh = headerFreeData(uh, uht); + rpmtdFreeData(&utd); } h = headerFree(h); -- 2.7.4