Rename sq verify --detached to sq verify --signature-file.

- Fixes #255.
This commit is contained in:
Justus Winter 2024-10-02 17:34:08 +02:00
parent 535164b7af
commit 63ae7dbb8c
No known key found for this signature in database
GPG Key ID: 686F55B4AB2B3386
4 changed files with 11 additions and 8 deletions

3
NEWS
View File

@ -20,6 +20,9 @@
has been introduced. `sq network dane generate --type generic`
replaces the old `--generic` flag.
- `sq key adopt` is now called `sq key subkey bind`.
- The option to verify a detached signature has been renamed from
`--detached` to `--signature-file`: `sq verify --signature-file
foo.sig foo.txt`.
* Changes in 0.38.0
** Notable changes
- New subcommand `sq key subkey delete` to delete secret key

View File

@ -1329,7 +1329,7 @@ when I run sq --no-cert-store --no-key-store toolbox extract-cert key.pgp --outp
when I run sq --no-cert-store --no-key-store sign --detached --signer-file key.pgp hello.txt --output sig.txt
then file sig.txt contains "-----BEGIN PGP SIGNATURE-----"
then file sig.txt contains "-----END PGP SIGNATURE-----"
when I run sq --no-cert-store --no-key-store verify --detached=sig.txt --signer-file=cert.pgp hello.txt
when I run sq --no-cert-store --no-key-store verify --signature-file=sig.txt --signer-file=cert.pgp hello.txt
then stdout doesn't contain "hello, world"
then exit code is 0
~~~
@ -1349,7 +1349,7 @@ when I run sq --no-cert-store --no-key-store toolbox extract-cert key.pgp --outp
when I run sq --no-cert-store --no-key-store sign --detached --signer-file key.pgp hello.txt --output sig.txt
when I run sh sed-in-place s/hello/HELLO/ hello.txt
when I try to run sq verify --detached=sig.txt --signer-file=cert.pgp hello.txt
when I try to run sq verify --signature-file=sig.txt --signer-file=cert.pgp hello.txt
then exit code is 1
~~~

View File

@ -40,7 +40,7 @@ Verify a signed message.",
comment: "\
Verify a detached message.",
command: &[
"sq", "verify", "--detached", "document.sig", "document.txt",
"sq", "verify", "--signature-file", "document.sig", "document.txt",
],
}),
Action::Example(Example {
@ -109,7 +109,7 @@ pub struct Command {
)]
pub output: FileOrStdout,
#[clap(
long = "detached",
long = "signature-file",
value_name = "SIG",
help = "Verify a detached signature"
)]

View File

@ -426,7 +426,7 @@ fn sq_sign_detached() {
sq.command()
.arg("verify")
.args(["--signer-file", &artifact("keys/dennis-simon-anton.pgp")])
.args(["--detached", &sig.to_string_lossy()])
.args(["--signature-file", &sig.to_string_lossy()])
.arg(&artifact("messages/a-cypherpunks-manifesto.txt"))
.assert()
.success();
@ -465,7 +465,7 @@ fn sq_sign_detached_append() {
sq.command()
.arg("verify")
.args(["--signer-file", &artifact("keys/dennis-simon-anton.pgp")])
.args(["--detached", &sig.to_string_lossy()])
.args(["--signature-file", &sig.to_string_lossy()])
.arg(&artifact("messages/a-cypherpunks-manifesto.txt"))
.assert()
.success();
@ -513,7 +513,7 @@ fn sq_sign_detached_append() {
sq.command()
.arg("verify")
.args(["--signer-file", &artifact("keys/dennis-simon-anton.pgp")])
.args(["--detached", &sig.to_string_lossy()])
.args(["--signature-file", &sig.to_string_lossy()])
.arg(&artifact("messages/a-cypherpunks-manifesto.txt"))
.assert()
.success();
@ -521,7 +521,7 @@ fn sq_sign_detached_append() {
sq.command()
.arg("verify")
.args(["--signer-file", &artifact("keys/erika-corinna-daniela-simone-antonia-nistp256.pgp")])
.args(["--detached", &sig.to_string_lossy()])
.args(["--signature-file", &sig.to_string_lossy()])
.arg(&artifact("messages/a-cypherpunks-manifesto.txt"))
.assert()
.success();