Make sq key attest-certifications' positional parameter a named parameter.
- In `sq key attest-certifications`, change the certificate file parameter from a positional parameter to a named parameter, `--cert-file`.
This commit is contained in:
parent
90bad2927a
commit
6dcfb270ad
3
NEWS
3
NEWS
@ -59,6 +59,9 @@
|
||||
- In `sq key adopt`, change the certificate file parameter from a
|
||||
positional parameter to a named parameter, `--cert-file`.
|
||||
- `sq key adopt` can now use the cert store and the key store.
|
||||
- In `sq key attest-certifications`, 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
|
||||
|
@ -1073,10 +1073,10 @@ distributed, e.g. by uploading it to a key server.
|
||||
"EXAMPLES:
|
||||
|
||||
# Attest to all certifications present on the key
|
||||
$ sq key attest-certifications juliet.pgp
|
||||
$ sq key attest-certifications --cert-file juliet.pgp
|
||||
|
||||
# Retract prior attestations on the key
|
||||
$ sq key attest-certifications --none juliet.pgp
|
||||
$ sq key attest-certifications --none --cert-file juliet.pgp
|
||||
",
|
||||
)]
|
||||
pub struct AttestCertificationsCommand {
|
||||
@ -1093,11 +1093,11 @@ pub struct AttestCertificationsCommand {
|
||||
)]
|
||||
pub all: bool,
|
||||
#[clap(
|
||||
default_value_t = FileOrStdin::default(),
|
||||
value_name = "KEY",
|
||||
long,
|
||||
value_name = "CERT",
|
||||
help = "Change attestations on KEY or reads from stdin if omitted",
|
||||
)]
|
||||
pub key: FileOrStdin,
|
||||
pub cert_file: FileOrStdin,
|
||||
#[clap(
|
||||
default_value_t = FileOrStdout::default(),
|
||||
help = FileOrStdout::HELP_OPTIONAL,
|
||||
@ -1112,7 +1112,6 @@ pub struct AttestCertificationsCommand {
|
||||
help = "Emit binary data",
|
||||
)]
|
||||
pub binary: bool,
|
||||
|
||||
}
|
||||
|
||||
#[derive(Debug, Subcommand)]
|
||||
|
@ -15,7 +15,7 @@ pub fn attest_certifications(
|
||||
// Attest to all certifications?
|
||||
let all = !command.none; // All is the default.
|
||||
|
||||
let input = command.key.open()?;
|
||||
let input = command.cert_file.open()?;
|
||||
let key = Cert::from_buffered_reader(input)?;
|
||||
|
||||
// Get a signer.
|
||||
|
@ -465,7 +465,8 @@ impl Sq {
|
||||
let output_file = output_file.into();
|
||||
|
||||
let mut cmd = self.command();
|
||||
cmd.arg("key").arg("attest-certifications").arg(cert);
|
||||
cmd.arg("key").arg("attest-certifications")
|
||||
.arg("--cert-file").arg(cert);
|
||||
if attest_all {
|
||||
cmd.arg("--all");
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user