summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2017-04-19 16:35:05 +0300
committerPanu Matilainen <pmatilai@redhat.com>2017-04-19 16:35:05 +0300
commitc6dfbece5fd4d6be9ab97ceb01203d2a27a827c0 (patch)
tree79bdf34d4f58343af4f9cb660347a81d61a946be
parent8d6a8a5953e87ee92100b81f3b807a2802465d68 (diff)
downloadrpm-c6dfbece5fd4d6be9ab97ceb01203d2a27a827c0.tar.gz
List different signature types explicitly without fallthroughs
No functional changes (at least intended ones), just makes it easier to see what is what exactly.
-rw-r--r--lib/signature.c17
1 files 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 */