Skip to content
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

Refactor to use changed format metadata to key #1016

Merged

Conversation

MVrachev
Copy link
Collaborator

@MVrachev MVrachev commented Apr 3, 2020

Fixes issue #:
This pr enables tuf to use changes made in secure-systems-lab/securesystemslib#227
Don't merge before the above pr is merged!

Description of the changes being introduced by the pull request:

Because of issue secure-systems-lab/securesystemslib#227
I had to checkout to the last commit which doesn't had that issue and
make the current changes based on it.

Please verify and check that the pull request fulfills the following
requirements
:

  • The code follows the Code Style Guidelines
  • Tests have been added for the bug fix or new feature
  • Docs have been added for the bug fix or new feature

@MVrachev MVrachev changed the title Refactor to use changed format metadata to key [WIP] Refactor to use changed format metadata to key Apr 3, 2020
@MVrachev MVrachev force-pushed the refactor-format-metadata-to-key branch from 0f0baa7 to 152068b Compare July 7, 2020 13:48
@MVrachev
Copy link
Collaborator Author

MVrachev commented Jul 7, 2020

I made changes to this pr, but in order to tests those changes a new version of securesyslib should be published adding the changes in the format_metadata_to_key.

@joshuagl joshuagl added the securesystemslib Requires corresponding implementation in securesystemslib label Jul 8, 2020
@joshuagl
Copy link
Member

joshuagl commented Jul 8, 2020

Thanks for the update @MVrachev. I see the with-sslib-master failures are related to another PR you've submitted #1072, thank you for that.

@joshuagl
Copy link
Member

Note: #1103 introduces an additional call to format_metadata_to_key which we should clean up in this PR if #1103 is merged first.

@MVrachev MVrachev force-pushed the refactor-format-metadata-to-key branch from 152068b to e03b098 Compare August 17, 2020 11:41
@MVrachev MVrachev changed the title [WIP] Refactor to use changed format metadata to key Refactor to use changed format metadata to key Aug 17, 2020
@MVrachev
Copy link
Collaborator Author

MVrachev commented Aug 17, 2020

I rebased on the recent changes in the develop branch and the tests should no longer fail, but I don't know why tox -e py37 fails...
Can somebody from the maintainers restart Travis CI?

@joshuagl
Copy link
Member

Hi @MVrachev. With the release of securesystemslib 0.16.0 we are ready to include this change. Could you rebase this on the latest develop branch and when doing so edit setup.py to bump the minimum version of securesystemslib in install_requires?

We should also stop passing default_keyid=None to securesystemslib.keys.format_metadata_to_key as that is already the default value and we can save ourselves a line of code for each invocation of format_metadata_to_key. 😄

In commit b7a15fdee7dee899c098b01fe64d604635b2b132
or pr secure-systems-lab/securesystemslib#227
in securesystemslib I change the function arguments of the
format_metadata_to_key function in securesystemslib/keys.py
to add the opportunity to use custom keyid hash algorithms without
chainging the securesystemslib.settings.HASH_ALGORITHMS variable.

With this commit, I make use of the above changes in tuf.

Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
@MVrachev MVrachev force-pushed the refactor-format-metadata-to-key branch from e03b098 to 7a828ea Compare August 18, 2020 14:49
@MVrachev
Copy link
Collaborator Author

Rebased upon the latest changes in tuf and bumped securesyslib to 0.16.0 in setup.py.

Copy link
Member

@joshuagl joshuagl left a comment

Choose a reason for hiding this comment

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

Thank you!

@joshuagl joshuagl merged commit 28f0b67 into theupdateframework:develop Aug 26, 2020
joshuagl added a commit to joshuagl/tuf that referenced this pull request Sep 9, 2020
PR theupdateframework#1014 removed uses of keyid_hash_algorithms in favour of using the calculated
keyid values from the metadata. A few instances of this removal were
unintentionally reintroduced in PR theupdateframework#1016, when changing to explicitly passing
a list of hash algorithms rather than changing securesystemslib settings
values.

This change removes uneccessary uses of keyid_hash_algorithms.

Signed-off-by: Joshua Lock <jlock@vmware.com>
MVrachev pushed a commit to MVrachev/tuf that referenced this pull request Sep 17, 2020
PR theupdateframework#1014 removed uses of keyid_hash_algorithms in favour of using the calculated
keyid values from the metadata. A few instances of this removal were
unintentionally reintroduced in PR theupdateframework#1016, when changing to explicitly passing
a list of hash algorithms rather than changing securesystemslib settings
values.

This change removes uneccessary uses of keyid_hash_algorithms.

Signed-off-by: Joshua Lock <jlock@vmware.com>
@MVrachev MVrachev deleted the refactor-format-metadata-to-key branch October 5, 2020 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
securesystemslib Requires corresponding implementation in securesystemslib
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants