forked from secure-systems-lab/securesystemslib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove schema checks in securesystemslib.gpg
In preparation for the removal of schema.py (secure-systems-lab#183), this patch removes schema checks in the following modules of the `securesystemslib.gpg` subpackage: * internal modules `rsa`, `dsa`, `eddsa`, `common`. These checks are redundant with schema checks that are already performed in the calling functions of the `functions` module. * in previously public `functions` module: * keyid in `create_signature` and `export_pubkey` functions * public key and signature dict in `verify_signature` function This is okay for two reasons: 1. the preferred way of interacting with `securesystemslib.gpg.functions` is via `GPGSigner`, which controls the format of the passed arguments to some extent 2. securesystemslib.gpg still raises meaningful and even more consistent errors for invalid arguments anyway, than it did before. E.g. a keyid passed to `export_pubkey` that doesn't conform to the previously checked hex schema, now raises a `KeyNotFoundError`. Other changes include: * move string literal `GPG_HASH_ALGORITHM_STRING` from `securesystemslib.schema` to the better suited `secureystemslib.gpg.constants` module. * remove mentions of schema definitions in docstrings * adopt changes in tests Signed-off-by: Lukas Puehringer <[email protected]>
- Loading branch information
Showing
9 changed files
with
42 additions
and
129 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.