Browse Source

Changed addkey arguments

pull/10/head
Dennis Schwerdel 5 years ago
parent
commit
1cd58e180d
  1. 1
      .gitignore
  2. 5
      CHANGELOG.md
  3. 8
      docs/man/zvault-addkey.1.md
  4. 10
      src/cli/args.rs

1
.gitignore

@ -6,3 +6,4 @@ restored
excludes
._*
.~*
docs/logo

5
CHANGELOG.md

@ -3,6 +3,11 @@
This project follows [semantic versioning](http://semver.org).
### UNRELEASED
* [modifed] Changed order of arguments in `addkey` to match src-dst scheme
* [fixed] Fixed `addkey` subcommand
### v0.3.1 (2017-05-09)
* [added] Derive key pairs from passwords
* [modified] Added root repository to exclude list

8
docs/man/zvault-addkey.1.md

@ -3,7 +3,7 @@ zvault-addkey(1) -- Add a key pair to the repository
## SYNOPSIS
`zvault addkey [OPTIONS] <REPO> [FILE]`
`zvault addkey [OPTIONS] [FILE] <REPO>`
## DESCRIPTION
@ -14,7 +14,8 @@ If `FILE` is given, the key pair is read from the file and added to the
repository.
If `--generate` is set, a new key pair is generated, printed to console and
added to the repository.
added to the repository. If `--password` is also set, the key pair will be
derived from the given password instead of creating a random one.
If `--default` is set, encryption will be enabled (if not already) and the new
key will be set as default encryption key.
@ -35,7 +36,8 @@ key will be set as default encryption key.
* `-p`, `--password <PASSWORD>`:
Derive the key pair from the given password instead of randomly creating it.
This setting requires that `--generate` is set too.
* `-h`, `--help`:

10
src/cli/args.rs

@ -405,14 +405,14 @@ pub fn parse() -> Result<(LogLevel, Arguments), ErrorCode> {
.arg(Arg::from_usage("[FILE] 'Destination file for the keypair'")))
.subcommand(SubCommand::with_name("addkey").about("Add a key pair to the repository")
.arg(Arg::from_usage("-g --generate 'Generate a new key pair'")
.conflicts_with_all(&["FILE", "PASSWORD"]))
.conflicts_with("FILE"))
.arg(Arg::from_usage("[set_default] --default -d 'Set the key pair as default'"))
.arg(Arg::from_usage("-p --password [PASSWORD] 'Derive the key pair from the given password'")
.conflicts_with("FILE"))
.arg(Arg::from_usage("<REPO> 'Path of the repository'")
.validator(|val| validate_repo_path(val, true, Some(false), Some(false))))
.requires("generate"))
.arg(Arg::from_usage("[FILE] 'File containing the keypair'")
.validator(validate_existing_path)))
.validator(validate_existing_path))
.arg(Arg::from_usage("<REPO> 'Path of the repository'")
.validator(|val| validate_repo_path(val, true, Some(false), Some(false)))))
.subcommand(SubCommand::with_name("algotest").about("Test a specific algorithm combination")
.arg(Arg::from_usage("[bundle_size] --bundle-size [SIZE] 'Set the target bundle size in MiB'")
.default_value(DEFAULT_BUNDLE_SIZE_STR).validator(validate_num))

Loading…
Cancel
Save