Skip to content

Allow RPM to get signature salt for OpenPGP v6 signatures#92

Closed
Jakuje wants to merge 9 commits intorpm-software-management:mainfrom
Jakuje:signature-salt
Closed

Allow RPM to get signature salt for OpenPGP v6 signatures#92
Jakuje wants to merge 9 commits intorpm-software-management:mainfrom
Jakuje:signature-salt

Conversation

@Jakuje
Copy link
Copy Markdown
Collaborator

@Jakuje Jakuje commented Jul 1, 2025

Most of the content is the same as in #91, but attempts to address the hashing issue using the new API for RPM.

Jakuje added 7 commits June 30, 2025 21:52
Also updates the GH actions versions to latest ones.

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Formed the same way as the v4 ones.

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
to match the expected one

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
@pmatilai
Copy link
Copy Markdown
Member

pmatilai commented Jul 1, 2025

Rpm side at rpm-software-management/rpm#3848

Haven't tried with the actual test-suite, just manual verify:

$ ./tools/rpmkeys -Kv /tmp/hello-2.0-1.x86_64.rpm
/tmp/hello-2.0-1.x86_64.rpm:
Header OpenPGP V6 Ed25519/SHA512 signature, key fingerprint: 036824f0ac60aed6f1a3256f88190469f6d7255e3d8e41c577233aa03e0bb9d3: OK
Header SHA256 digest: OK
Payload SHA256 digest: OK

@Jakuje
Copy link
Copy Markdown
Collaborator Author

Jakuje commented Jul 1, 2025

Run of this branch against the rpm-software-management/rpm#3848 is here (not sure why it did not run in the pr directly):

https://github.com/Jakuje/rpm-sequoia/actions/runs/15995286790/job/45117251685

@Jakuje
Copy link
Copy Markdown
Collaborator Author

Jakuje commented Jul 1, 2025

Latest run in my fork with recent changes from Panu worked:

https://github.com/Jakuje/rpm-sequoia/actions/runs/15998694606/job/45128059715

@pmatilai
Copy link
Copy Markdown
Member

pmatilai commented Jul 1, 2025

So this works and the Salt() interface is what I suggested in the other PR, I'm just pondering whether there is any real value in returning an error code over just returning NULL if there's no salt, ie

const uint8_t *pgpDigParamsSalt(pgpDigParams digp, size_t *lenp)

I've no strong opinions on this, just thinking out loud.

@Jakuje
Copy link
Copy Markdown
Collaborator Author

Jakuje commented Jul 1, 2025

I do not really have a preference. I slightly prefer the current approach approach (what is now in the PR) as I like the Error/Success is written in the rust way with the Result(Ok/Err) being mapped directly to ErrorCode. While I agree that we could return the salt directly, we would remove the Ok/Err semantics, possibly hiding the errors (as you mentioned that this should really not be called on non-signature contexts).

@pmatilai
Copy link
Copy Markdown
Member

pmatilai commented Jul 1, 2025

Ok, in that case lets just keep it as it is 👍

Copy link
Copy Markdown
Collaborator

@nwalfield nwalfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, I'm not able to run the test suite using the instructions in the README. Could you help me debug the issue, please?

Comment thread README.md
Comment thread README.md
Comment thread README.md
Comment thread README.md
@nwalfield
Copy link
Copy Markdown
Collaborator

I'm closing this in favor of #93 .

@nwalfield nwalfield closed this Jul 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants