diff --git a/NEWS b/NEWS index 8265d930..d10a1e4d 100644 --- a/NEWS +++ b/NEWS @@ -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 diff --git a/sq-subplot.md b/sq-subplot.md index 6d251518..f43ada79 100644 --- a/sq-subplot.md +++ b/sq-subplot.md @@ -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 ~~~ diff --git a/src/cli/verify.rs b/src/cli/verify.rs index a9a82166..45d0327c 100644 --- a/src/cli/verify.rs +++ b/src/cli/verify.rs @@ -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" )] diff --git a/tests/integration/sq_sign.rs b/tests/integration/sq_sign.rs index 2c37df96..b81b5a16 100644 --- a/tests/integration/sq_sign.rs +++ b/tests/integration/sq_sign.rs @@ -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();