Streamline TUFs crypto interface #919
Merged
lukpueh merged 2 commits intotheupdateframework:developfrom Sep 24, 2019
Merged
Conversation
added 2 commits
September 18, 2019 18:08
Import some API functions from repository_lib and securesystemslib directly into repository_tool and developer_tool, instead of providing them via wrapper. Also short-circuit some functions that used to point to securesystemslib through repository_lib. This reverts parts of 6f7ba76, which introduced some of the wrappers to appease the linter. Here we just disable that specific linter check (unused-import). The advantage of importing over wrapping is: - no duplication of hardcoded defaults for keyword arguments - no duplication of docstrings - less code --> easier maintenance This should also pave the way for more serious refactoring of the repository- and developer-tools: theupdateframework#840 Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
Remove only wrappers and corresponding tests that don't add any new functionality, but blindly forward the caller to sslib, where the same function exists and is tested. Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
3 tasks
adityasaky
approved these changes
Sep 24, 2019
Member
Author
|
Thanks, @adityasaky! |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes issue #:
Closes #656
Supersedes #804
Paves the way for #840
Description of the changes being introduced by the pull request:
Remove
securesystemslib-wrappers inrepository_libthat don't add any new functionality. Also remove corresponding tests that already exist insecuresystemslib.This means the functions are no longer available via
repository_lib, which should be fine, becauserepository_libdoes not seem to be a public interface.Replace
securesystemslib- andrepository_lib-wrappers, inrepository_toolanddeveloper_toolwith direct imports.This means, the functions are still available via the
repository_tool(ordeveloper_tool), which they should be (see e.g. TUTORIAL.md), but internally the modules get slimmer.See commit messages for more details.
Please verify and check that the pull request fulfills the following
requirements: