Skip to content

Commit

Permalink
Do not allow extra packets to follow a signature
Browse files Browse the repository at this point in the history
According to RFC 4880 § 11.4, a detached signature is “simply a
Signature packet”.  Therefore, extra packets following a detached
signature are not allowed.
  • Loading branch information
DemiMarie authored and pmatilai committed Jun 21, 2021
1 parent f101c8c commit 5ff8676
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rpmio/rpmpgp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,8 @@ int pgpPrtParams(const uint8_t * pkts, size_t pktlen, unsigned int pkttype,
break;

p += (pkt.body - pkt.head) + pkt.blen;
if (pkttype == PGPTAG_SIGNATURE)
break;
}

rc = (digp && (p == pend)) ? 0 : -1;
Expand Down

0 comments on commit 5ff8676

Please sign in to comment.