-
Notifications
You must be signed in to change notification settings - Fork 54
Schema revision #176
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
Schema revision #176
Conversation
de9a750 to
001ed1d
Compare
|
@lukpueh I saw you merged gpg work to master branch, so I have rebased this branch. |
402fa06 to
1bc1767
Compare
|
@lukpueh, sorry for that, I think it should be fine now. |
lukpueh
left a comment
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 PR. Please consider addressing a few minor inline comments. Otherwise it looks mostly unproblematic, i.e. he existing SIGNATURES_SCHEMA and SIGNABLE_SCHEMA have become broader, to also allow gpg signatures. And there are a couple of new ANY_* schemas.
securesystemslib/keys.py
Outdated
|
|
||
| # Does 'signature' have the correct format? | ||
| securesystemslib.formats.SIGNATURE_SCHEMA.check_match(signature) | ||
| securesystemslib.formats.ANY_SIGNATURE_SCHEMA.check_match(signature) |
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.
keys.verify_signature does not support gpg keys/signatures (yet). Why allow passing them as arguments? IIUC this should raise a TypeError('Unsupported key type.').
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.
@lukpueh I thought it's fine to get TypeError until it is implemented. I have reverted those changes.
securesystemslib/formats.py
Outdated
| good_sigs = KEYIDS_SCHEMA, | ||
| bad_sigs = KEYIDS_SCHEMA, | ||
| unknown_sigs = KEYIDS_SCHEMA, | ||
| untrusted_sigs = KEYIDS_SCHEMA) |
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.
SIGNATURESTATUS_SCHEMA was dropped with #165, please don't add back.
securesystemslib/formats.py
Outdated
| value_schema = ANY_PUBKEY_SCHEMA) | ||
|
|
||
| ANY_STRING_SCHEMA = SCHEMA.AnyString() | ||
| LIST_OF_ANY_STRING_SCHEMA = SCHEMA.ListOf(ANY_STRING_SCHEMA) |
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.
Any reason why ANY_STRING_SCHEMA and LIST_OF_ANY_STRING_SCHEMA were moved down here?
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.
It was the latest defined schema in the file, I moved it to the top of the file now.
lukpueh
left a comment
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 updates!
Description of the changes being introduced by the pull request:
This PR modifies formats in order to support GPG keys.
Signature verification function is also modified to allow passing GPG public key format.
Please verify and check that the pull request fulfills the following
requirements: