Make sq key adopt's positional parameter a named parameter.
- In `sq key adopt`, change the certifier file parameter from a positional parameter to a named parameter, `--cert-file`.
This commit is contained in:
parent
d76d0fcd52
commit
cb13f883be
2
NEWS
2
NEWS
@ -56,6 +56,8 @@
|
||||
- In `sq pki certify`, change the certifier file parameter from a
|
||||
positional parameter to a named parameter, `--certifier-file`.
|
||||
- `sq pki certify` can now use the cert store and the key store.
|
||||
- In `sq key adopt`, change the certificate file parameter from a
|
||||
positional parameter to a named parameter, `--cert-file`.
|
||||
* Changes in 0.36.0
|
||||
- Missing
|
||||
* Changes in 0.35.0
|
||||
|
@ -1025,11 +1025,12 @@ pub struct AdoptCommand {
|
||||
)]
|
||||
pub allow_broken_crypto: bool,
|
||||
#[clap(
|
||||
long,
|
||||
default_value_t = FileOrStdin::default(),
|
||||
value_name = "TARGET-KEY",
|
||||
help = "Add keys to TARGET-KEY or reads keys from stdin if omitted",
|
||||
)]
|
||||
pub certificate: FileOrStdin,
|
||||
pub cert_file: FileOrStdin,
|
||||
#[clap(
|
||||
default_value_t = FileOrStdout::default(),
|
||||
help = FileOrStdout::HELP_OPTIONAL,
|
||||
|
@ -25,7 +25,7 @@ use crate::decrypt_key;
|
||||
|
||||
pub fn adopt(sq: Sq, command: cli::key::AdoptCommand) -> Result<()>
|
||||
{
|
||||
let input = command.certificate.open()?;
|
||||
let input = command.cert_file.open()?;
|
||||
let cert = Cert::from_buffered_reader(input)?;
|
||||
let mut wanted: Vec<(
|
||||
KeyHandle,
|
||||
|
@ -399,7 +399,7 @@ impl Sq {
|
||||
cmd.arg("--keyring").arg(k.as_ref());
|
||||
}
|
||||
|
||||
cmd.arg(target);
|
||||
cmd.arg("--cert-file").arg(target);
|
||||
|
||||
assert!(! keys.is_empty());
|
||||
for k in keys.into_iter() {
|
||||
|
Loading…
Reference in New Issue
Block a user