Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sb in lhs and rhs #3185

Closed
newrow opened this issue Jun 26, 2024 · 2 comments
Closed

sb in lhs and rhs #3185

newrow opened this issue Jun 26, 2024 · 2 comments
Assignees
Labels

Comments

@newrow
Copy link

newrow commented Jun 26, 2024

rpm/lib/rpmvs.c

Line 443 in c00d8a0

rc = sb->sigalgo - sb->sigalgo;

rpm/lib/rpmvs.c

Line 445 in c00d8a0

rc = sb->hashalgo - sb->hashalgo;

both operands are sb

I guess it should be like

sb->* - sa->*
@ffesti ffesti self-assigned this Jul 3, 2024
@ffesti ffesti added the bug label Jul 3, 2024
ffesti added a commit to ffesti/rpm that referenced this issue Jul 4, 2024
This requires adjusting a number of test that reflect the ordering. The
changes in tests/rpmsigdig.at look straight forward and correct - just
changing the order in which the signatures and checksums are presented.

The changes in tests/rpmi.at seem to drop the relevant information. This
might be accidental as the code just returns the first issue found. But
"no signature" seems kinda weird result when before it complaint about a
specific signature. May be someone  with more clue about this should
ahve a second look beforemergin.

Tags: DONT
Resolves: rpm-software-management#3185
ffesti added a commit to ffesti/rpm that referenced this issue Jul 18, 2024
This requires adjusting a number of test that reflect the ordering. The
changes in tests/rpmsigdig.at look straight forward and correct - just
changing the order in which the signatures and checksums are presented.

The changes in tests/rpmi.at seem to drop the relevant information. This
might be accidental as the code just returns the first issue found. But
"no signature" seems kinda weird result when before it complaint about a
specific signature. The next patch tries to fix that.

Resolves: rpm-software-management#3185
ffesti added a commit to ffesti/rpm that referenced this issue Jul 18, 2024
Don't rely on the fist issue found being the most meaningful. The
selection could still be smarter but at least it won't report a missing
signature when actually one is broken.

Related: rpm-software-management#3185
@ffesti
Copy link
Contributor

ffesti commented Jul 19, 2024

OK, turn out we have an older ticket for this also: #1057

ffesti added a commit to ffesti/rpm that referenced this issue Jul 23, 2024
Don't rely on the fist issue found being the most meaningfuli. Always
return 1 to loop through all signatures / hashes. Use the first error of
the highest rc number. The selection could still be smarter but at least
it won't report a missing signature when actually one is broken.

Related: rpm-software-management#3185
ffesti added a commit to ffesti/rpm that referenced this issue Jul 26, 2024
Don't rely on the fist issue found being the most meaningful. Always
return 1 to loop through all signatures / hashes. Use the first error of
the highest severity.

Using the severity in vd->type[] is a bit of a hack but OK as it is only
checked for == RPMRC_OK (aka 0) in verifyPackageFiles.

Related: rpm-software-management#3185
ffesti added a commit to ffesti/rpm that referenced this issue Jul 26, 2024
Don't rely on the fist issue found being the most meaningful. Always
return 1 to loop through all signatures / hashes. Use the first error of
the highest severity.

Using the severity in vd->type[] is a bit of a hack but OK as it is only
checked for == RPMRC_OK (aka 0) in verifyPackageFiles.

Related: rpm-software-management#3185
@pmatilai
Copy link
Member

Closing as duplicate of #1057

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants