aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-03-03 15:05:49 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-03-03 15:05:49 +0000
commitf7f9ba1ef7d3acee0e92b9d693e453daa0b0ae59 (patch)
tree1816aaf33160c51467d248d78f0c23dec86c9954
parent3256d14280ff7c278a5a81ab40df5153e2658677 (diff)
downloadperl-URPM-f7f9ba1ef7d3acee0e92b9d693e453daa0b0ae59.tar
perl-URPM-f7f9ba1ef7d3acee0e92b9d693e453daa0b0ae59.tar.gz
perl-URPM-f7f9ba1ef7d3acee0e92b9d693e453daa0b0ae59.tar.bz2
perl-URPM-f7f9ba1ef7d3acee0e92b9d693e453daa0b0ae59.tar.xz
perl-URPM-f7f9ba1ef7d3acee0e92b9d693e453daa0b0ae59.zip
Include key id in verify_signature()'s OK output. Also, avoid a header leak.
-rw-r--r--URPM.xs11
1 files changed, 10 insertions, 1 deletions
diff --git a/URPM.xs b/URPM.xs
index 5919eca..ebc0370 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -3402,7 +3402,15 @@ Urpm_verify_signature(filename)
*result = '\0';
switch(rc) {
case RPMRC_OK:
- snprintf(result, sizeof(result), "OK");
+ {
+ char *fmtsig = headerSprintf(
+ h,
+ "%|DSAHEADER?{%{DSAHEADER:pgpsig}}:{%|RSAHEADER?{%{RSAHEADER:pgpsig}}:"
+ "{%|SIGGPG?{%{SIGGPG:pgpsig}}:{%|SIGPGP?{%{SIGPGP:pgpsig}}:{(none)}|}|}|}|",
+ rpmTagTable, rpmHeaderFormats, NULL);
+ snprintf(result, sizeof(result), "OK (%s)", fmtsig);
+ free(fmtsig);
+ }
break;
case RPMRC_NOTFOUND:
snprintf(result, sizeof(result), "NOT OK (signature not found): %s", rpmErrorString());
@@ -3418,6 +3426,7 @@ Urpm_verify_signature(filename)
break;
}
RETVAL = result;
+ if (h) headerFree(h);
rpmtsFree(ts);
}