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.
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.
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.
@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.
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.
Any reason why ANY_STRING_SCHEMA and LIST_OF_ANY_STRING_SCHEMA were moved down here?
There was a problem hiding this comment.
It was the latest defined schema in the file, I moved it to the top of the file now.
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: