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

Only export public key of default keypair #1707

Conversation

kwin
Copy link
Contributor

@kwin kwin commented Nov 21, 2022

This closes #1706

@kwin kwin force-pushed the bugfix/export-only-relevant-public-key branch from 1b7870f to 161e517 Compare November 21, 2022 17:54
@github-actions
Copy link

github-actions bot commented Nov 21, 2022

Test Results

299 tests  ±0   295 ✔️ ±0   52m 36s ⏱️ - 1m 18s
169 suites ±0       4 💤 ±0 
169 files   ±0       0 ±0 

Results for commit 516a0c6. ± Comparison against base commit 80983d5.

♻️ This comment has been updated with latest results.

@kwin kwin force-pushed the bugfix/export-only-relevant-public-key branch from 161e517 to 516a0c6 Compare November 21, 2022 18:05
@mickaelistria mickaelistria merged commit 3c2c8ac into eclipse-tycho:master Nov 22, 2022
@laeubi
Copy link
Member

laeubi commented Nov 22, 2022

It seems that I'm a bit late but I'm not sure if the default key is always the right choice, should it not be the one used to actually sign the artifacts? At least the standard pgp-maven-plugin allows to specify a different key as well...

@kwin
Copy link
Contributor Author

kwin commented Nov 22, 2022

@laeubi The mechanism only kicks in as fallback, i.e. if a dedicated key is used for signing its public key is used (that already worked before)

@merks
Copy link
Contributor

merks commented Nov 23, 2022

FYI, while working on the following I took the problem you reported into consideration:

#1720

In particular, the new logic ensures that we only add the key that is actually associated with the signature to the properties. So we don't actually need to know which key is the default. Furthermore, one thing I noticed while reconciling your changes with the changes I have underway is that the user can also specify default-key BBF1E2D1 in their ~/.gnupg/gpg.conf to change the default signing key and this does not change the order in which the secret keys are listed. So the only way to be sure which key does the signing is to check the key ID on the signature. In any case, the #1720 changes will still work properly for your use case, and there are now tests to confirm that too.

@laeubi laeubi added this to the 4.0 milestone Jun 24, 2023
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.

tycho-gpg:3.0.0:sign-p2-artifacts creates incorrect values for property pgp.publicKeys
4 participants