Skip to content

Conversation

mstv
Copy link
Member

@mstv mstv commented Dec 12, 2024

Fixes #12099

Proposed changes

  • Set toolStripGpgKeyTextBox.MaxLength to 40

Test methodology

  • to be tested manually

Merge strategy

I agree that the maintainer squash merge this PR (if the commit message is clear).


✒️ I contribute this code under The Developer Certificate of Origin.

@mstv mstv self-assigned this Dec 12, 2024
@mstv mstv changed the title fix(GPG): Increase max length of key to 40 fix(GPG): Increase max length of key ID to 40 Dec 12, 2024
Copy link
Member

@gerhardol gerhardol left a comment

Choose a reason for hiding this comment

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

I get 37 visible chars in the box, should be sufficient

@gerhardol
Copy link
Member

@mstv You are on fire. Yet another correction/improvement.
There should be a 5.2 quite soon, when some of your pending changes are sorted out.

Copy link
Member

@pmiossec pmiossec left a comment

Choose a reason for hiding this comment

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

Is there a real reason why there is a limit ?

@gerhardol
Copy link
Member

Is there a real reason why there is a limit ?

Not really. Not sure what algorithms that are commonly used.
RSA key need to be much longer (512 or 1024 bytes) to be safe, elliptical keys should fit in 40 bytes (32 bytes for Ed25519).
40 is probably reasonable to enter manually.

fix(GPG): Remove max length of key id

Refs: gitextensions#12100
@mstv
Copy link
Member Author

mstv commented Dec 13, 2024

Is there a real reason why there is a limit?

Valid point. For the historic values 8 and 16, this might have helped making it clear that the field takes the ID of the GPG key.
With 40, this limitation might even not be noticed. So, I have removed it.


There should be a 5.2 quite soon, when some of your pending changes are sorted out.

I would prefer merging the "ready" ones. :)
I do not have other urgent bugs on my list.

@mstv mstv changed the title fix(GPG): Increase max length of key ID to 40 fix(GPG): Remove max length of key id Dec 13, 2024
@mstv mstv merged commit 19d7b8b into gitextensions:master Dec 13, 2024
4 checks passed
@mstv mstv deleted the fix/gpg_key_length branch December 13, 2024 16:09
@mstv mstv added this to the v5.2 milestone Jan 11, 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.

GPG Commit Signing doesn't work; Key Id max length is too short
3 participants