-
Notifications
You must be signed in to change notification settings - Fork 50
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
Add default keyid to format_metadata_to_key #225
Conversation
…aller to provide a default keyid. This will help remove the depenency on keyid_hash_algorithms in tuf while remaining backwards compatible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the change @mnm678. I've made a minor suggestion to make the check for default_keyid
more idiomatic.
@@ -474,7 +474,7 @@ def format_keyval_to_metadata(keytype, scheme, key_value, private=False): | |||
|
|||
|
|||
|
|||
def format_metadata_to_key(key_metadata): | |||
def format_metadata_to_key(key_metadata, default_keyid=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you document default_keyid in the Arguments section of the docstring?
Co-Authored-By: Joshua Lock <jlock@vmware.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the patch and your work on keyids, @mnm678! Looking forward to seeing this handled better.
Add an optional parameter to format_metadata_to_key that allows the caller to provide a default keyid. This change can be used for future changes that remove keyid_hash_algorithms from TUF as described in theupdateframework/python-tuf#848.