projects
/
platform
/
upstream
/
rpm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1c8e567
)
Tolerate NULL key in pgpVerifySignature()
author
Panu Matilainen
<pmatilai@redhat.com>
Tue, 8 Nov 2011 12:08:40 +0000
(14:08 +0200)
committer
Panu Matilainen
<pmatilai@redhat.com>
Tue, 8 Nov 2011 12:08:40 +0000
(14:08 +0200)
rpmio/rpmpgp.c
patch
|
blob
|
history
diff --git
a/rpmio/rpmpgp.c
b/rpmio/rpmpgp.c
index
d4cbd27
..
43e6c5d
100644
(file)
--- a/
rpmio/rpmpgp.c
+++ b/
rpmio/rpmpgp.c
@@
-1018,9
+1018,7
@@
rpmRC pgpVerifySignature(pgpDigParams key, pgpDigParams sig, DIGEST_CTX hashctx)
* If we have a key, verify the signature for real. Otherwise we've
* done all we can, return NOKEY to indicate "looks okay but dunno."
*/
- if (key->alg == NULL) {
- res = RPMRC_NOKEY;
- } else {
+ if (key && key->alg) {
pgpDigAlg sa = sig->alg;
pgpDigAlg ka = key->alg;
if (sa && sa->verify) {
@@
-1028,6
+1026,8
@@
rpmRC pgpVerifySignature(pgpDigParams key, pgpDigParams sig, DIGEST_CTX hashctx)
res = RPMRC_OK;
}
}
+ } else {
+ res = RPMRC_NOKEY;
}
exit: