From c6dfbece5fd4d6be9ab97ceb01203d2a27a827c0 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 19 Apr 2017 16:35:05 +0300 Subject: List different signature types explicitly without fallthroughs No functional changes (at least intended ones), just makes it easier to see what is what exactly. --- lib/signature.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/signature.c b/lib/signature.c index d7acb5a4e..19265bc94 100644 --- a/lib/signature.c +++ b/lib/signature.c @@ -35,16 +35,25 @@ rpmRC rpmsinfoInit(rpmtd td, const char *origin, memset(sinfo, 0, sizeof(*sinfo)); switch (td->tag) { case RPMSIGTAG_GPG: + tagtype = RPM_BIN_TYPE; + sinfo->type = RPMSIG_SIGNATURE_TYPE; + sinfo->range = (RPMSIG_HEADER|RPMSIG_PAYLOAD); + break; case RPMSIGTAG_PGP5: /* XXX legacy */ case RPMSIGTAG_PGP: - sinfo->range = RPMSIG_PAYLOAD; - /* fallthrough */ + tagtype = RPM_BIN_TYPE; + sinfo->type = RPMSIG_SIGNATURE_TYPE; + sinfo->range = (RPMSIG_HEADER|RPMSIG_PAYLOAD); + break; case RPMSIGTAG_RSA: + tagtype = RPM_BIN_TYPE; + sinfo->type = RPMSIG_SIGNATURE_TYPE; + sinfo->range = RPMSIG_HEADER; + break; case RPMSIGTAG_DSA: tagtype = RPM_BIN_TYPE; sinfo->type = RPMSIG_SIGNATURE_TYPE; - /* GPG/PGP are hdr+payload, RSA/DSA are hdr-only */ - sinfo->range |= RPMSIG_HEADER; + sinfo->range = RPMSIG_HEADER; break; case RPMSIGTAG_SHA256: tagsize = 65; /* includes trailing \0 */ -- cgit v1.2.1