Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

move verify_delegate() from Metadata to Signed #2361

Copy link
Copy link
@jku

Description

@jku
Issue body actions

verify_delegate() is currently an instance method of Metadata. It could be an instance method of Signed since it does not need anything from metadata and since this would lead to cleaner code.

  • Generally code that uses tuf.repository can mostly look clean as it does not need to deal with the actual Metadata:
    root = repo.root()
    print (f"root version is {root.version}")
    
    This no longer works if one wants to verify a delegate just because of API design
  • We could add a Signed.verify_delegate() and similar code should work:
    root = repo.root()
    root.verify_delegate("targets", metadata)
    
  • nothing prevents leaving Metadata.verify_delegate() in place as a deprecated method
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionDiscussions related to the design, implementation and operation of the projectDiscussions related to the design, implementation and operation of the project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.