char *sigtarget = NULL, *trpm = NULL;
Header sigh = NULL;
char * msg;
- void * uh = NULL;
- rpmTagType uht;
- rpm_count_t uhc;
int res = -1; /* assume failure */
int deleting = (qva->qva_mode == RPMSIGN_DEL_SIGNATURE);
int xx;
while ((rpm = *argv++) != NULL)
{
rpmRC rc;
+ struct rpmtd_s utd;
fprintf(stdout, "%s:\n", rpm);
/* ASSERT: fd == NULL && ofd == NULL */
/* Dump the immutable region (if present). */
- if (headerGetEntry(sigh, RPMTAG_HEADERSIGNATURES, &uht, &uh, &uhc)) {
+ if (headerGet(sigh, RPMTAG_HEADERSIGNATURES, &utd, HEADERGET_DEFAULT)) {
HeaderIterator hi;
- rpmTagType type;
- rpmTag tag;
- rpm_count_t count;
- rpm_data_t ptr;
+ struct rpmtd_s copytd;
Header oh;
Header nh;
nh = headerNew();
if (nh == NULL) {
- uh = headerFreeData(uh, uht);
+ rpmtdFreeData(&utd);
goto exit;
}
- oh = headerCopyLoad(uh);
+ oh = headerCopyLoad(utd.data);
+ hi = headerInitIterator(oh);
for (hi = headerInitIterator(oh);
- headerNextIterator(hi, &tag, &type, &ptr, &count);
- ptr = headerFreeData(ptr, type))
+ headerNext(hi, ©td);
+ rpmtdFreeData(©td))
{
- if (ptr)
- xx = headerAddEntry(nh, tag, type, ptr, count);
+ if (copytd.data)
+ xx = headerPut(nh, ©td, HEADERPUT_DEFAULT);
}
hi = headerFreeIterator(hi);
oh = headerFree(oh);