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:
a8d8d5a
)
Check that digest type is actually supported before enabling it
author
Panu Matilainen
<pmatilai@redhat.com>
Mon, 2 Jun 2008 09:20:22 +0000
(12:20 +0300)
committer
Panu Matilainen
<pmatilai@redhat.com>
Mon, 2 Jun 2008 09:20:22 +0000
(12:20 +0300)
- we don't necessarily support all types listed in pgpHashAlgo_e, it
depends on what NSS happens to support
lib/rpmfi.c
patch
|
blob
|
history
diff --git
a/lib/rpmfi.c
b/lib/rpmfi.c
index
8c08e64
..
8461136
100644
(file)
--- a/
lib/rpmfi.c
+++ b/
lib/rpmfi.c
@@
-1282,7
+1282,7
@@
if (fi->actions == NULL)
if (headerGet(h, RPMTAG_FILEDIGESTALGO, &digalgo, HEADERGET_MINMEM)) {
pgpHashAlgo *algo = rpmtdGetUint32(&digalgo);
/* Hmm, what to do with unknown digest algorithms? */
- if (algo &&
*algo >= PGPHASHALGO_MD5 && *algo <= PGPHASHALGO_SHA512
) {
+ if (algo &&
rpmDigestLength(*algo) != 0
) {
fi->digestalgo = *algo;
}
}