summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-04-08 14:11:47 +0300
committerPanu Matilainen <pmatilai@redhat.com>2008-04-08 14:11:47 +0300
commit090782c3c73f1b95fa6a033f73ce3cb4de38b539 (patch)
treebb714c0dfb022f8ad519dc29110cc215de845763 /lib
parent45f5e135aee276185eda68642406ec6917315006 (diff)
downloadrpm-090782c3c73f1b95fa6a033f73ce3cb4de38b539.tar.gz
rpm-090782c3c73f1b95fa6a033f73ce3cb4de38b539.tar.bz2
rpm-090782c3c73f1b95fa6a033f73ce3cb4de38b539.zip
Collapse unknown / unsupport RSA sigtypes into one fallthrough
Diffstat (limited to 'lib')
-rw-r--r--lib/signature.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/signature.c b/lib/signature.c
index 6e5787d3b..f1b5c005c 100644
--- a/lib/signature.c
+++ b/lib/signature.c
@@ -1127,19 +1127,10 @@ verifyRSASignature(rpmts ts, char ** msg,
signame = "RSA/SHA1";
sigalg = SEC_OID_PKCS1_SHA1_WITH_RSA_ENCRYPTION;
break;
- case PGPHASHALGO_RIPEMD160:
- res = RPMRC_NOKEY;
- break;
case PGPHASHALGO_MD2:
signame = "RSA/MD2";
sigalg = SEC_OID_PKCS1_MD2_WITH_RSA_ENCRYPTION;
break;
- case PGPHASHALGO_TIGER192:
- res = RPMRC_NOKEY;
- break;
- case PGPHASHALGO_HAVAL_5_160:
- res = RPMRC_NOKEY;
- break;
case PGPHASHALGO_SHA256:
signame = "RSA/SHA256";
sigalg = SEC_OID_PKCS1_SHA256_WITH_RSA_ENCRYPTION;
@@ -1152,6 +1143,10 @@ verifyRSASignature(rpmts ts, char ** msg,
signame = "RSA/SHA512";
sigalg = SEC_OID_PKCS1_SHA512_WITH_RSA_ENCRYPTION;
break;
+ /* fallthrough for unsupported / unknown types */
+ case PGPHASHALGO_TIGER192:
+ case PGPHASHALGO_HAVAL_5_160:
+ case PGPHASHALGO_RIPEMD160:
default:
res = RPMRC_NOKEY;
sigalg = SEC_OID_UNKNOWN;