diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2006-03-03 15:05:49 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2006-03-03 15:05:49 +0000 |
commit | f7f9ba1ef7d3acee0e92b9d693e453daa0b0ae59 (patch) | |
tree | 1816aaf33160c51467d248d78f0c23dec86c9954 /URPM.xs | |
parent | 3256d14280ff7c278a5a81ab40df5153e2658677 (diff) | |
download | perl-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.
Diffstat (limited to 'URPM.xs')
-rw-r--r-- | URPM.xs | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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); } |