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

RFE: add rpmkeys --export for exporting the ASCII armored key material #3366

Closed
pmatilai opened this issue Oct 9, 2024 · 4 comments · Fixed by #3383
Closed

RFE: add rpmkeys --export for exporting the ASCII armored key material #3366

pmatilai opened this issue Oct 9, 2024 · 4 comments · Fixed by #3383
Assignees
Labels
CLI Command-line interface crypto Signatures, keys, hashes and their verification RFE

Comments

@pmatilai
Copy link
Member

pmatilai commented Oct 9, 2024

Sprung from the discussion in #3332:

gpg-pubkey packages have the key ASCII armor in description, but going forward we'll need some other means of access.
rpmkeys --export seems like a obvious place to put this functionality.

AC:

  • Add rpmkeys --export [FINGERPRINT ...]
  • Outputs the ASCII armored keys to stdout
@pmatilai pmatilai added RFE CLI Command-line interface labels Oct 9, 2024
@pmatilai pmatilai added this to RPM Oct 9, 2024
@github-project-automation github-project-automation bot moved this to Backlog in RPM Oct 9, 2024
@ffesti ffesti self-assigned this Oct 14, 2024
@ffesti ffesti moved this from Backlog to In Progress in RPM Oct 15, 2024
@ffesti ffesti added the crypto Signatures, keys, hashes and their verification label Oct 15, 2024
@ffesti
Copy link
Contributor

ffesti commented Oct 15, 2024

OK, adding this to rpmkeys is rather easy now that we have matchingKeys in place. One issue that goes beyond this ticket is the disconnect between rpmkeyring.h and rpmPubkey on one side and rpmpgp.h on the other. The later works either on pgpDigParams - which rpmPubkey can return - or the raw packet data and length. The later is stored in the rpmPubkey object of the primary keys but is not exported. SO the question is do we add a function to retrieve the blob or do we basically attach the functions in rpmpgp.h to the rpmPubkey data structure?

@ffesti
Copy link
Contributor

ffesti commented Oct 15, 2024

For the record: There is currently a way to do this with the current API by getting rpmPubkeyBase64 and then decoding it again. But this is rather silly.

@ffesti
Copy link
Contributor

ffesti commented Oct 15, 2024

AC:

  • Add rpmkeys --export [FINGERPRINT ...]
  • Outputs the ASCII armored keys to stdout

@pmatilai
Copy link
Member Author

pmatilai commented Oct 15, 2024

SO the question is do we add a function to retrieve the blob or do we basically attach the functions in rpmpgp.h to the rpmPubkey data structure?

Add higher level accessor functions to the rpmPubkey, for the stuff that we absolutely have to have, UserID being one such obvious thing. But lets not add stuff just because there happens to be a pgp-level thing now, that low-level stuff is largely just historical happenstance. Low-level stuff that we're trying to phase out to the extent we can.

ffesti added a commit to ffesti/rpm that referenced this issue Oct 15, 2024
ffesti added a commit to ffesti/rpm that referenced this issue Oct 15, 2024
Just writes the keys out to stdout in an ASCII armored format.

Resolves: rpm-software-management#3366
pmatilai pushed a commit that referenced this issue Oct 16, 2024
pmatilai pushed a commit that referenced this issue Oct 16, 2024
Just writes the keys out to stdout in an ASCII armored format.

Resolves: #3366
@github-project-automation github-project-automation bot moved this from In Progress to Done in RPM Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI Command-line interface crypto Signatures, keys, hashes and their verification RFE
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants