PR #242 has started requiring a passphrase for the imported key, and
recomputes the key ID, making the command-line argument redundant. So,
remove it from the command line and from the KeyStoreManager API.
Also updates the comment for KeyStoreManager.ImportRootKey, and changes
(notary key import-root) to refuse unexpected arguments instead of
silently ignoring them.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
-c was recently taken over by --configFile; using it for
--change-passphrase as well results in
panic: shorthand redefinition
So, move --change-passphrase to -p.
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
over the root keys directory from non-root keys directory from keystoremanager
to keystore, since we're eliminating keystoremanager.
Maintain the two separate directories, though, because one can't tell whether
there is an old-style separate-directories structure, or if someone has a GUN
that starts with tuf_keys.
Signed-off-by: Ying Li <ying.li@docker.com>
- Export symlinks by encoding them in the zip file.
- Detect symlinks in a zip file on import and create them on the local
filesystem.
- Add test coverage.
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
This makes the full subcommand names smoother; for example "notary key
generate" instead of "notary keys generate".
Add a "notary key list" subcommand to list keys, so "notary key"
lists the possible subcommands, instead of needing to use "notary key
-h".
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
This adds four commands:
- notary keys export: export all keys, or keys for a particular GUN
(with -g)
- notary keys export-root: export root key by ID
- notary keys import: import a zip file of keys
- notary keys import-root: import a single root key
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>