Skip to content

gitsign: fix for RejectExpiredKeys logic - #6412

Merged
tonistiigi merged 1 commit into
moby:masterfrom
tonistiigi:gitsign-expiry-logic
Dec 17, 2025
Merged

tonistiigi merged 1 commit into
moby:masterfrom
tonistiigi:gitsign-expiry-logic

Conversation

@tonistiigi

@tonistiigi tonistiigi commented Dec 11, 2025 •

Copy link
Copy Markdown
Member

Current RejectExpiredKeys didn't work (for the false case) as CheckDetachedSignature validates expiration date internally.

It looks like go-crypto library does not allow signature checks with completely ignoring exipration times (as Github UI allows for example). With this change we allow (option for) keys to be expired, but the signature creation time can not be after key expiry.

If we would set the reference time to the key creation time that would cause a different error where validation would not work because signatures are created in future.

Current RejectExpiredKeys didn't work as CheckDetachedSignature
validates expiration date internally.

It looks like go-crypto library does not allow signature checks
with completely ignoring exipration times (as Github UI allows
for example). With this change we allow (option for) keys to be expired,
but the signature creation time can not be after key expiry.

If we would set the reference time to the key creation time
that would cause a different error where validation would not work
because signatures are created in future.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
@tonistiigi
tonistiigi merged commit 19a0de6 into moby:master Dec 17, 2025
@crazy-max crazy-max added this to the v0.27.0 milestone Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants