summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2011-10-23 14:23:12 +0300
committerPanu Matilainen <pmatilai@redhat.com>2011-10-23 14:26:42 +0300
commitb8ad9ac9203ad1315cc808cf93c1e66dd43fbb03 (patch)
treeb10256e04f52d999189745e235093569a2bb6897
parent084a00bf51a941ec85c094a436bda401fccf7d3a (diff)
downloadlibrpm-tizen-b8ad9ac9203ad1315cc808cf93c1e66dd43fbb03.tar.gz
librpm-tizen-b8ad9ac9203ad1315cc808cf93c1e66dd43fbb03.tar.bz2
librpm-tizen-b8ad9ac9203ad1315cc808cf93c1e66dd43fbb03.zip
Log an error on signing if we can't even parse the gpg-generated signature
- The error message is not very helpful but if pgpPrtPkts() fails we dont have a whole lot clue in the caller why it failed, spitting out at least *some* error is better than silently failing (RhBug:748116, RhBug:719154)
-rw-r--r--sign/rpmgensig.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sign/rpmgensig.c b/sign/rpmgensig.c
index cd61b7af4..a9a2552e6 100644
--- a/sign/rpmgensig.c
+++ b/sign/rpmgensig.c
@@ -121,8 +121,10 @@ static int putSignature(Header sigh, int ishdr, uint8_t *pkt, size_t pktlen)
struct rpmtd_s sigtd;
int rc = 1; /* assume failure */
- if (pgpPrtPkts(pkt, pktlen, dig, 0) != 0)
+ if (pgpPrtPkts(pkt, pktlen, dig, 0) != 0) {
+ rpmlog(RPMLOG_ERR, _("Unsupported PGP signature\n"));
goto exit;
+ }
if (rpmDigestLength(sigp->hash_algo) == 0) {
rpmlog(RPMLOG_ERR, _("Unsupported PGP hash algorithm %d\n"),