Describe the bug
RPMTAG_OPENPGP is documented to return header-only signatures.
When used with the HEADERGET_EXT flag, the extension code for the handling of this tag returns legacy header + payload signatures in the mix.
The commit message suggests this was intentional (bea8f45), but it does not conform to the documented behavior of that tag. It makes usage challenging, because you cannot trust that these signatures can be verified against the header bytes range, and the behavior changes depending on whether RPMTAG_OPENPGP was actually present or not.
Querying multiple different tags should not be considered a problem when the usage of the return values is genuinely different.
To Reproduce
Steps to reproduce the behavior:
- Take a package which contains V4 (RSAHEADER/DSAHEADER) and V3 signatures (SIGPGP/SIGGPG)
- Call
headerGet(RPMTAG_OPENPGP) with HEADERGET_EXT flags enabled
- Observe that >1 signatures are present
Expected behavior
Fetching from the RPMTAG_OPENPGP should return only header-only signatures as documented - disincluding legacy signatures. SIGPGP / SIGGPG signatures should be ignored.
Environment
- OS / Distribution: F43
- Version: rpm 6.0.1
Describe the bug
RPMTAG_OPENPGPis documented to return header-only signatures.When used with the
HEADERGET_EXTflag, the extension code for the handling of this tag returns legacy header + payload signatures in the mix.The commit message suggests this was intentional (bea8f45), but it does not conform to the documented behavior of that tag. It makes usage challenging, because you cannot trust that these signatures can be verified against the header bytes range, and the behavior changes depending on whether
RPMTAG_OPENPGPwas actually present or not.Querying multiple different tags should not be considered a problem when the usage of the return values is genuinely different.
To Reproduce
Steps to reproduce the behavior:
headerGet(RPMTAG_OPENPGP)withHEADERGET_EXTflags enabledExpected behavior
Fetching from the
RPMTAG_OPENPGPshould return only header-only signatures as documented - disincluding legacy signatures.SIGPGP/SIGGPGsignatures should be ignored.Environment