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

CLI --sign: Support signing of delegated metadata and ability to import any public key type #638

Conversation

vladimir-v-diaz
Copy link
Contributor

Fixes issue #:

The issue tracker does not have an issue for this task.

Description of the changes being introduced by the pull request:

This pull request allows any delegated role to be signed with the --sign option (it previously only supported signing of the Targets role). Public keys of any key type can now be imported, as well.

Unrelated: Allow 2+ roles to delegate to the same role. Although pending pull request #590 implements it, it is implemented here to get everything working.

(env) $ repo.py --init
(env) $ repo.py --key ed25519 --filename foo_key
(env) $ repo.py --delegate "foo*.tgz" --delegatee foo --pubkeys tufkeystore/foo_key.pub
(env) $ repo.py --sign tufkeystore/foo_key --role foo
Enter a password for the encrypted key (tufkeystore/foo_key):
(env) $ cat tufrepo/metadata/foo.json
{
 "signatures": [
  {
   "keyid": "93d511347a13c2c3bec4537bbe5b642c7860c4f2590dfec6470182628404699f",
   "sig": "7f78b552560b589814cd7a7fc49047a855660d576c22fc9e6b83b55cf733d0516a07bd664993ef48908e7bff6770395940cc07b5f3529cbc97f2253face07b0f"
  }
 ],
 "signed": {
  "_type": "targets",
  "delegations": {
   "keys": {},
   "roles": []
  },
  "expires": "2018-06-05T05:53:53Z",
  "spec_version": "1.0",
  "targets": {},
  "version": 1
 }
}(env) $

Please verify and check that the pull request fulfills the following
requirements
:

  • The code follows the Code Style Guidelines
  • Tests have been added for the bug fix or new feature
  • Docs have been added for the bug fix or new feature

Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>

Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
@vladimir-v-diaz vladimir-v-diaz changed the title CLI --sign: Support signing of delegated metadata and ability import of any public key type CLI --sign: Support signing of delegated metadata and ability to import any public key type Mar 5, 2018
Signed-off-by: Vladimir Diaz <vladimir.v.diaz@gmail.com>
@vladimir-v-diaz vladimir-v-diaz merged commit d1ea040 into theupdateframework:develop Mar 6, 2018
@vladimir-v-diaz vladimir-v-diaz deleted the sign_fresh_metadata branch April 13, 2018 18:11
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.

1 participant