verify: signature must be checked against the key named in signed_with #18
Labels
No labels
coordination/cross-repo
coordination/needed
effort
large
effort
medium
effort
small
meta/duplicate
meta/planning
meta/wontfix
priority
high
priority
low
priority
medium
session
blocker
session
handover
session
next
status
blocked
status
done
status
in-progress
status
review
status
to-go
type
admin
type
bug
type
config
type
deployment
type
docs
type
enhancement
type
feature
type
handover
type
infrastructure
type
installation
type
maintenance
type
migration
type
research
type
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
DAW/daw-module-manager#18
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
verify.luareadssigned_withfrom the manifest but only checks that thiskey-id exists in the keyring. The signature itself is then checked with
sig.verify_file(), which tries every key of the keyring and accepts the firstone that validates.
Result: a package whose manifest says
signed_with: goodis accepted when itwas signed with any other key of the keyring (found with a test that signs
with a second keyring key).
Scope
sig.verify_file()gets a way to check against exactly one key-id(optional fourth parameter or a separate function)
verify.verify()passesmanifest.signed_withunknown_key_iderrorstays as it is
Acceptance criteria
signed_withis rejected with
signature_invalidsig.verify_file()without the new parameter behaves as beforeDone in v2.0.0: verify() passes manifest.signed_with to sig.verify_file(file, sig, keyring, key_id); with a key id only that key counts, without it the behaviour is as before. Tests in test_sig.lua and test_verify.lua (a signature made with another key of the keyring is refused).