diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2017-04-11 18:55:12 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2017-04-11 19:00:45 +0300 |
commit | 52cbcb2d41b6eeabc4d9bcd4da44816cbb1da08d (patch) | |
tree | 751c44780bcb4d1cf26b4ded24b880434a6c27f2 | |
parent | d4a4cf5cd7fa61afdb5d19c2374d7b7594890fc0 (diff) | |
download | rpm-52cbcb2d41b6eeabc4d9bcd4da44816cbb1da08d.tar.gz |
Eliminate now unnecessary tag hardcoding in rpmVerifySignature()
-rw-r--r-- | lib/signature.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/lib/signature.c b/lib/signature.c index 23574df72..2d5f0d725 100644 --- a/lib/signature.c +++ b/lib/signature.c @@ -448,23 +448,10 @@ rpmVerifySignature(rpmKeyring keyring, struct rpmsinfo_s *sinfo, if (sinfo->sig == NULL || ctx == NULL) goto exit; - switch (sinfo->tag) { - case RPMSIGTAG_MD5: - case RPMSIGTAG_SHA1: - case RPMSIGTAG_SHA256: - case RPMTAG_PAYLOADDIGEST: + if (sinfo->type == RPMSIG_DIGEST_TYPE) res = verifyDigest(sinfo, ctx, &msg); - break; - case RPMSIGTAG_RSA: - case RPMSIGTAG_DSA: - case RPMSIGTAG_PGP5: /* XXX legacy */ - case RPMSIGTAG_PGP: - case RPMSIGTAG_GPG: + else if (sinfo->type == RPMSIG_SIGNATURE_TYPE) res = verifySignature(keyring, sinfo, ctx, &msg); - break; - default: - break; - } exit: if (res == RPMRC_NOTFOUND) { |