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

Remove unused function and schema checks in hash #774

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

lukpueh
Copy link
Member

@lukpueh lukpueh commented Apr 10, 2024

  • addresses part of #731
  • blocks on #772 (commits are included in this PR)

In preparation for the removal of schema.py (#183), this patch removes schema checks of function arguments in hash.py and one entire function.

The removed checks are obfuscated "is string" checks, and without them invalid args in any of the relevant functions are still caught in the digest function, where they all end up and would raise a more meaningful UnsupportedLibraryError or UnsupportedAlgorithmError.

The removed function digest_from_rsa_scheme doesn't seem to be used anywhere (according to sourcegraph.com) not even in securesystemslib.signer, where the same functionality is replicated several times (see #594). Removing it here allows to ignore a slightly more complex schema check.

In prepartion for the removal of schema.py (secure-systems-lab#183), this patch removes
schema checks of function arguments in hash.py and one entire function.

The removed checks are obfuscated "is string" checks, and without them
invalid args are still caught in the `digest` function, where they all
end up and raise a more meaningful UnsupportedLibraryError or
UnsupportedAlgorithmError if invalid.

The removed function `digest_from_rsa_scheme` doesn't seem to be used
anywhere (according to sourcegraph.com) not even in
securesystemslib.signer, where the same functionality is replicated
several times (see secure-systems-lab#594). Removing it here allows to ignore a
slightly more complex schema check.

Signed-off-by: Lukas Puehringer <[email protected]>
@lukpueh lukpueh marked this pull request as ready for review April 15, 2024 13:45
@lukpueh lukpueh requested a review from jku April 15, 2024 15:41
@lukpueh lukpueh merged commit 7c547ac into secure-systems-lab:main Apr 16, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants