diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2009-03-11 14:04:16 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2009-03-11 14:04:16 +0200 |
commit | fc023a2885bb30ae65c5b56d687bfacaf6c62b77 (patch) | |
tree | 0f2d65c40906e382845aa866163c2ba0566e87d4 /lib/signature.c | |
parent | 73e0ee5df95ac22cbed73b18575d33c284f62975 (diff) | |
download | rpm-fc023a2885bb30ae65c5b56d687bfacaf6c62b77.tar.gz rpm-fc023a2885bb30ae65c5b56d687bfacaf6c62b77.tar.bz2 rpm-fc023a2885bb30ae65c5b56d687bfacaf6c62b77.zip |
For DSA sigs, RPMRC_NOKEY is only sane for keyring lookup failure
- assume failure and non-keyring lookups fail with RPMRC_FAIL
Diffstat (limited to 'lib/signature.c')
-rw-r--r-- | lib/signature.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/signature.c b/lib/signature.c index a4343b8f9..21b09690a 100644 --- a/lib/signature.c +++ b/lib/signature.c @@ -1226,7 +1226,7 @@ verifyDSASignature(rpmKeyring keyring, rpmtd sigtd, pgpDig dig, char ** msg, DIGEST_CTX sha1ctx) { pgpDigParams sigp = dig ? &dig->signature : NULL; - rpmRC res; + rpmRC res = RPMRC_FAIL; /* assume failure */ const char *hdr; int sigver; const char *sig = sigtd->data; @@ -1237,7 +1237,6 @@ verifyDSASignature(rpmKeyring keyring, rpmtd sigtd, pgpDig dig, char ** msg, sigver = sigp !=NULL ? sigp->version : 0; if (sha1ctx == NULL || sig == NULL || dig == NULL || sigp == NULL) { - res = RPMRC_NOKEY; goto exit; } @@ -1246,7 +1245,6 @@ verifyDSASignature(rpmKeyring keyring, rpmtd sigtd, pgpDig dig, char ** msg, && sigp->pubkey_algo == PGPPUBKEYALGO_DSA && sigp->hash_algo == PGPHASHALGO_SHA1)) { - res = RPMRC_NOKEY; goto exit; } |