summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock74
-rw-r--r--sq/Cargo.toml2
-rw-r--r--sq/tests/sq-key-adopt.rs208
-rw-r--r--sq/tests/sq-sign.rs124
4 files changed, 134 insertions, 274 deletions
diff --git a/Cargo.lock b/Cargo.lock
index efc41e05..4862e19a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -90,19 +90,6 @@ dependencies = [
]
[[package]]
-name = "assert_cmd"
-version = "1.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3dc1679af9a1ab4bea16f228b05d18f8363f8327b1fa8db00d2760cfafc6b61e"
-dependencies = [
- "doc-comment",
- "predicates",
- "predicates-core",
- "predicates-tree",
- "wait-timeout",
-]
-
-[[package]]
name = "atty"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -719,15 +706,6 @@ dependencies = [
]
[[package]]
-name = "float-cmp"
-version = "0.8.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e1267f4ac4f343772758f7b1bdcbe767c218bbab93bb432acbf5162bbf85a6c4"
-dependencies = [
- "num-traits",
-]
-
-[[package]]
name = "fnv"
version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1345,12 +1323,6 @@ dependencies = [
]
[[package]]
-name = "normalize-line-endings"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be"
-
-[[package]]
name = "num-bigint-dig"
version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1571,35 +1543,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
[[package]]
-name = "predicates"
-version = "1.0.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "96bfead12e90dccead362d62bb2c90a5f6fc4584963645bc7f71a735e0b0735a"
-dependencies = [
- "difference",
- "float-cmp",
- "normalize-line-endings",
- "predicates-core",
- "regex",
-]
-
-[[package]]
-name = "predicates-core"
-version = "1.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "06075c3a3e92559ff8929e7a280684489ea27fe44805174c3ebd9328dcb37178"
-
-[[package]]
-name = "predicates-tree"
-version = "1.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e63c4859013b38a76eca2414c64911fba30def9e3202ac461a2d22831220124"
-dependencies = [
- "predicates-core",
- "treeline",
-]
-
-[[package]]
name = "proc-macro-hack"
version = "0.5.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1969,12 +1912,10 @@ version = "0.22.0"
dependencies = [
"anyhow",
"assert_cli",
- "assert_cmd",
"buffered-reader",
"chrono",
"clap",
"itertools",
- "predicates",
"rpassword",
"sequoia-autocrypt",
"sequoia-net",
@@ -2390,12 +2331,6 @@ dependencies = [
]
[[package]]
-name = "treeline"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41"
-
-[[package]]
name = "try-lock"
version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2474,15 +2409,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed"
[[package]]
-name = "wait-timeout"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6"
-dependencies = [
- "libc",
-]
-
-[[package]]
name = "want"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/sq/Cargo.toml b/sq/Cargo.toml
index 7c347482..c6e85dd7 100644
--- a/sq/Cargo.toml
+++ b/sq/Cargo.toml
@@ -40,8 +40,6 @@ clap = "2.33"
[dev-dependencies]
assert_cli = "0.6"
-assert_cmd = "1.0.1"
-predicates = "1.0.5"
[[bin]]
name = "sq"
diff --git a/sq/tests/sq-key-adopt.rs b/sq/tests/sq-key-adopt.rs
index b3097f14..5bb40f32 100644
--- a/sq/tests/sq-key-adopt.rs
+++ b/sq/tests/sq-key-adopt.rs
@@ -2,8 +2,7 @@
mod integration {
use std::path;
- use assert_cmd::Command;
- use predicates::prelude::*;
+ use assert_cli::Assert;
use sequoia_openpgp as openpgp;
@@ -141,15 +140,15 @@ mod integration {
#[test]
fn adopt_encryption() -> Result<()> {
// Adopt an encryption subkey.
- Command::cargo_bin("sq").unwrap().arg("key").arg("adopt")
- .arg(bob())
- .arg("--keyring").arg(alice())
- .arg("--key").arg(alice_encryption().0.to_hex())
- .assert()
- .code(0)
- .stdout(predicate::function(|output: &[u8]| -> bool {
- check(output, 2, (bob_primary(), &[alice_encryption()])).is_ok()
- }));
+ Assert::cargo_binary("sq").with_args(&[
+ "key", "adopt",
+ bob().to_str().unwrap(),
+ "--keyring", alice().to_str().unwrap(),
+ "--key", &alice_encryption().0.to_hex(),
+ ]).stdout().satisfies(|output| {
+ check(output.as_bytes(), 2, (bob_primary(), &[alice_encryption()]))
+ .is_ok()
+ }, "check failed").unwrap();
Ok(())
}
@@ -157,15 +156,15 @@ mod integration {
#[test]
fn adopt_signing() -> Result<()> {
// Adopt a signing subkey (subkey has secret key material).
- Command::cargo_bin("sq").unwrap().arg("key").arg("adopt")
- .arg(bob())
- .arg("--keyring").arg(alice())
- .arg("--key").arg(alice_signing().0.to_hex())
- .assert()
- .code(0)
- .stdout(predicate::function(|output: &[u8]| -> bool {
- check(output, 2, (bob_primary(), &[alice_signing()])).is_ok()
- }));
+ Assert::cargo_binary("sq").with_args(&[
+ "key", "adopt",
+ bob().to_str().unwrap(),
+ "--keyring", alice().to_str().unwrap(),
+ "--key", &alice_signing().0.to_hex(),
+ ]).stdout().satisfies(|output| {
+ check(output.as_bytes(), 2, (bob_primary(), &[alice_signing()]))
+ .is_ok()
+ }, "check failed").unwrap();
Ok(())
}
@@ -173,15 +172,15 @@ mod integration {
#[test]
fn adopt_certification() -> Result<()> {
// Adopt a certification subkey (subkey has secret key material).
- Command::cargo_bin("sq").unwrap().arg("key").arg("adopt")
- .arg(carol())
- .arg("--keyring").arg(alice())
- .arg("--key").arg(alice_primary().0.to_hex())
- .assert()
- .code(0)
- .stdout(predicate::function(|output: &[u8]| -> bool {
- check(output, 4, (carol_primary(), &[alice_primary()])).is_ok()
- }));
+ Assert::cargo_binary("sq").with_args(&[
+ "key", "adopt",
+ carol().to_str().unwrap(),
+ "--keyring", alice().to_str().unwrap(),
+ "--key", &alice_primary().0.to_hex(),
+ ]).stdout().satisfies(|output| {
+ check(output.as_bytes(), 4, (carol_primary(), &[alice_primary()]))
+ .is_ok()
+ }, "check failed").unwrap();
Ok(())
}
@@ -189,19 +188,18 @@ mod integration {
#[test]
fn adopt_encryption_and_signing() -> Result<()> {
// Adopt an encryption subkey and a signing subkey.
- Command::cargo_bin("sq").unwrap().arg("key").arg("adopt")
- .arg(bob())
- .arg("--keyring").arg(alice())
- .arg("--key").arg(alice_signing().0.to_hex())
- .arg("--key").arg(alice_encryption().0.to_hex())
- .assert()
- .code(0)
- .stdout(predicate::function(|output: &[u8]| -> bool {
- check(output, 3,
- (bob_primary(),
- &[alice_signing(), alice_encryption()]))
- .is_ok()
- }));
+ Assert::cargo_binary("sq").with_args(&[
+ "key", "adopt",
+ bob().to_str().unwrap(),
+ "--keyring", alice().to_str().unwrap(),
+ "--key", &alice_signing().0.to_hex(),
+ "--key", &alice_encryption().0.to_hex(),
+ ]).stdout().satisfies(|output| {
+ check(output.as_bytes(), 3,
+ (bob_primary(),
+ &[alice_signing(), alice_encryption()]))
+ .is_ok()
+ }, "check failed").unwrap();
Ok(())
}
@@ -209,16 +207,16 @@ mod integration {
#[test]
fn adopt_twice() -> Result<()> {
// Adopt the same an encryption subkey twice.
- Command::cargo_bin("sq").unwrap().arg("key").arg("adopt")
- .arg(bob())
- .arg("--keyring").arg(alice())
- .arg("--key").arg(alice_encryption().0.to_hex())
- .arg("--key").arg(alice_encryption().0.to_hex())
- .assert()
- .code(0)
- .stdout(predicate::function(|output: &[u8]| -> bool {
- check(output, 2, (bob_primary(), &[alice_encryption()])).is_ok()
- }));
+ Assert::cargo_binary("sq").with_args(&[
+ "key", "adopt",
+ bob().to_str().unwrap(),
+ "--keyring", alice().to_str().unwrap(),
+ "--key", &alice_encryption().0.to_hex(),
+ "--key", &alice_encryption().0.to_hex(),
+ ]).stdout().satisfies(|output| {
+ check(output.as_bytes(), 2, (bob_primary(), &[alice_encryption()]))
+ .is_ok()
+ }, "check failed").unwrap();
Ok(())
}
@@ -226,16 +224,16 @@ mod integration {
#[test]
fn adopt_key_appears_twice() -> Result<()> {
// Adopt the an encryption subkey that appears twice.
- Command::cargo_bin("sq").unwrap().arg("key").arg("adopt")
- .arg(bob())
- .arg("--keyring").arg(alice())
- .arg("--keyring").arg(alice())
- .arg("--key").arg(alice_encryption().0.to_hex())
- .assert()
- .code(0)
- .stdout(predicate::function(|output: &[u8]| -> bool {
- check(output, 2, (bob_primary(), &[alice_encryption()])).is_ok()
- }));
+ Assert::cargo_binary("sq").with_args(&[
+ "key", "adopt",
+ bob().to_str().unwrap(),
+ "--keyring", alice().to_str().unwrap(),
+ "--keyring", alice().to_str().unwrap(),
+ "--key", &alice_encryption().0.to_hex(),
+ ]).stdout().satisfies(|output| {
+ check(output.as_bytes(), 2, (bob_primary(), &[alice_encryption()]))
+ .is_ok()
+ }, "check failed").unwrap();
Ok(())
}
@@ -243,15 +241,16 @@ mod integration {
#[test]
fn adopt_own_encryption() -> Result<()> {
// Adopt its own encryption subkey. This should be a noop.
- Command::cargo_bin("sq").unwrap().arg("key").arg("adopt")
- .arg(alice())
- .arg("--keyring").arg(alice())
- .arg("--key").arg(alice_encryption().0.to_hex())
- .assert()
- .code(0)
- .stdout(predicate::function(|output: &[u8]| -> bool {
- check(output, 3, (alice_primary(), &[alice_encryption()])).is_ok()
- }));
+ Assert::cargo_binary("sq").with_args(&[
+ "key", "adopt",
+ alice().to_str().unwrap(),
+ "--keyring", alice().to_str().unwrap(),
+ "--key", &alice_encryption().0.to_hex(),
+ ]).stdout().satisfies(|output| {
+ check(output.as_bytes(), 3, (alice_primary(),
+ &[alice_encryption()]))
+ .is_ok()
+ }, "check failed").unwrap();
Ok(())
}
@@ -259,15 +258,15 @@ mod integration {
#[test]
fn adopt_own_primary() -> Result<()> {
// Adopt own primary key.
- Command::cargo_bin("sq").unwrap().arg("key").arg("adopt")
- .arg(bob())
- .arg("--keyring").arg(bob())
- .arg("--key").arg(bob_primary().0.to_hex())
- .assert()
- .code(0)
- .stdout(predicate::function(|output: &[u8]| -> bool {
- check(output, 2, (bob_primary(), &[bob_primary()])).is_ok()
- }));
+ Assert::cargo_binary("sq").with_args(&[
+ "key", "adopt",
+ bob().to_str().unwrap(),
+ "--keyring", bob().to_str().unwrap(),
+ "--key", &bob_primary().0.to_hex(),
+ ]).stdout().satisfies(|output| {
+ check(output.as_bytes(), 2, (bob_primary(), &[bob_primary()]))
+ .is_ok()
+ }, "check failed").unwrap();
Ok(())
}
@@ -275,12 +274,12 @@ mod integration {
#[test]
fn adopt_missing() -> Result<()> {
// Adopt a key that is not present.
- Command::cargo_bin("sq").unwrap().arg("key").arg("adopt")
- .arg(bob())
- .arg("--keyring").arg(bob())
- .arg("--key").arg("1234 5678 90AB CDEF 1234 5678 90AB CDEF")
- .assert()
- .code(1);
+ Assert::cargo_binary("sq").with_args(&[
+ "key", "adopt",
+ bob().to_str().unwrap(),
+ "--keyring", bob().to_str().unwrap(),
+ "--key", "1234 5678 90AB CDEF 1234 5678 90AB CDEF"
+ ]).fails().unwrap();
Ok(())
}
@@ -288,25 +287,24 @@ mod integration {
#[test]
fn adopt_from_multiple() -> Result<()> {
// Adopt from multiple certificates simultaneously.
- Command::cargo_bin("sq").unwrap().arg("key").arg("adopt")
- .arg(bob())
- .arg("--keyring").arg(alice())
- .arg("--key").arg(alice_signing().0.to_hex())
- .arg("--key").arg(alice_encryption().0.to_hex())
- .arg("--keyring").arg(carol())
- .arg("--key").arg(carol_signing().0.to_hex())
- .arg("--key").arg(carol_encryption().0.to_hex())
- .assert()
- .code(0)
- .stdout(predicate::function(|output: &[u8]| -> bool {
- check(output, 5,
- (bob_primary(),
- &[
- alice_signing(), alice_encryption(),
- carol_signing(), carol_encryption()
- ]))
- .is_ok()
- }));
+ Assert::cargo_binary("sq").with_args(&[
+ "key", "adopt",
+ bob().to_str().unwrap(),
+ "--keyring", alice().to_str().unwrap(),
+ "--key", &alice_signing().0.to_hex(),
+ "--key", &alice_encryption().0.to_hex(),
+ "--keyring", carol().to_str().unwrap(),
+ "--key", &carol_signing().0.to_hex(),
+ "--key", &carol_encryption().0.to_hex(),
+ ]).stdout().satisfies(|output| {
+ check(output.as_bytes(), 5,
+ (bob_primary(),
+ &[
+ alice_signing(), alice_encryption(),
+ carol_signing(), carol_encryption()
+ ]))
+ .is_ok()
+ }, "check failed").unwrap();
Ok(())
}
diff --git a/sq/tests/sq-sign.rs b/sq/tests/sq-sign.rs
index f75d5b9e..2f40d137 100644
--- a/sq/tests/sq-sign.rs
+++ b/sq/tests/sq-sign.rs
@@ -26,9 +26,7 @@ fn sq_sign() {
// Sign message.
Assert::cargo_binary("sq")
.with_args(
- &["--home",
- &tmp_dir.path().to_string_lossy(),
- "sign",
+ &["sign",
"--secret-key-file",
&artifact("keys/dennis-simon-anton-private.pgp"),
"--output",
@@ -63,9 +61,7 @@ fn sq_sign() {
// Verify signed message.
Assert::cargo_binary("sq")
.with_args(
- &["--home",
- &tmp_dir.path().to_string_lossy(),
- "verify",
+ &["verify",
"--sender-cert-file",
&artifact("keys/dennis-simon-anton.pgp"),
&sig.to_string_lossy()])
@@ -80,9 +76,7 @@ fn sq_sign_append() {
// Sign message.
Assert::cargo_binary("sq")
.with_args(
- &["--home",
- &tmp_dir.path().to_string_lossy(),
- "sign",
+ &["sign",
"--secret-key-file",
&artifact("keys/dennis-simon-anton-private.pgp"),
"--output",
@@ -117,9 +111,7 @@ fn sq_sign_append() {
// Verify signed message.
Assert::cargo_binary("sq")
.with_args(
- &["--home",
- &tmp_dir.path().to_string_lossy(),
- "verify",
+ &["verify",
"--sender-cert-file",
&artifact("keys/dennis-simon-anton.pgp"),
&sig0.to_string_lossy()])
@@ -129,9 +121,7 @@ fn sq_sign_append() {
let sig1 = tmp_dir.path().join("sig1");
Assert::cargo_binary("sq")
.with_args(
- &["--home",
- &tmp_dir.path().to_string_lossy(),
- "sign",
+ &["sign",
"--append",
"--secret-key-file",
&artifact("keys/erika-corinna-daniela-simone-antonia-nistp256-private.pgp"),
@@ -180,18 +170,14 @@ fn sq_sign_append() {
// Verify both signatures of the signed message.
Assert::cargo_binary("sq")
.with_args(
- &["--home",
- &tmp_dir.path().to_string_lossy(),
- "verify",
+ &["verify",
"--sender-cert-file",
&artifact("keys/dennis-simon-anton.pgp"),
&sig1.to_string_lossy()])
.unwrap();
Assert::cargo_binary("sq")
.with_args(
- &["--home",
- &tmp_dir.path().to_string_lossy(),
- "verify",
+ &["verify",
"--sender-cert-file",
&artifact("keys/erika-corinna-daniela-simone-antonia-nistp256.pgp"),
&sig1.to_string_lossy()])
@@ -255,9 +241,7 @@ fn sq_sign_append_on_compress_then_sign() {
// Verify signed message.
Assert::cargo_binary("sq")
.with_args(
- &["--home",
- &tmp_dir.path().to_string_lossy(),
- "verify",
+ &["verify",
"--sender-cert-file",
&artifact("keys/dennis-simon-anton.pgp"),
&sig0.to_string_lossy()])
@@ -267,9 +251,7 @@ fn sq_sign_append_on_compress_then_sign() {
let sig1 = tmp_dir.path().join("sig1");
Assert::cargo_binary("sq")
.with_args(
- &["--home",
- &tmp_dir.path().to_string_lossy(),
- "sign",
+ &["sign",
"--append",
"--secret-key-file",
&artifact("keys/erika-corinna-daniela-simone-antonia-nistp256-private.pgp"),
@@ -322,18 +304,14 @@ fn sq_sign_append_on_compress_then_sign() {
// Verify both signatures of the signed message.
Assert::cargo_binary("sq")
.with_args(
- &["--home",
- &tmp_dir.path().to_string_lossy(),
- "verify",
+ &["verify",
"--sender-cert-file",
&artifact("keys/dennis-simon-anton.pgp"),
&sig0.to_string_lossy()])
.unwrap();
Assert::cargo_binary("sq")
.with_args(
- &["--home",
- &tmp_dir.path().to_string_lossy(),
- "verify",
+ &["verify",
"--sender-cert-file",
&artifact("keys/erika-corinna-daniela-simone-antonia-nistp256.pgp"),
&sig0.to_string_lossy()])
@@ -348,9 +326,7 @@ fn sq_sign_detached() {
// Sign detached.
Assert::cargo_binary("sq")
.with_args(
- &["--home",
- &tmp_dir.path().to_string_lossy(),
- "sign",
+ &["sign",
"--detached",
"--secret-key-file",
&artifact("keys/dennis-simon-anton-private.pgp"),
@@ -375,9 +351,7 @@ fn sq_sign_detached() {
// Verify detached.
Assert::cargo_binary("sq")
.with_args(
- &["--home",
- &tmp_dir.path().to_string_lossy(),
- "verify",
+ &["verify",
"--sender-cert-file",
&artifact("keys/dennis-simon-anton.pgp"),
"--detached",
@@ -394,9 +368,7 @@ fn sq_sign_detached_append() {
// Sign detached.
Assert::cargo_binary("sq")
.with_args(
- &["--home",
- &tmp_dir.path().to_string_lossy(),
- "sign",
+ &["sign",
"--detached",
"--secret-key-file",
&artifact("keys/dennis-simon-anton-private.pgp"),
@@ -421,9 +393,7 @@ fn sq_sign_detached_append() {
// Verify detached.
Assert::cargo_binary("sq")
.with_args(
- &["--home",
- &tmp_dir.path().to_string_lossy(),
- "verify",
+ &["verify",
"--sender-cert-file",
&artifact("keys/dennis-simon-anton.pgp"),
"--detached",
@@ -434,9 +404,7 @@ fn sq_sign_detached_append() {
// Check that we don't blindly overwrite signatures.
Assert::cargo_binary("sq")
.with_args(
- &["--home",
- &tmp_dir.path().to_string_lossy(),
- "sign",
+ &["sign",
"--detached",
"--secret-key-file",
&artifact("keys/erika-corinna-daniela-simone-antonia-nistp256-private.pgp"),
@@ -449,9 +417,7 @@ fn sq_sign_detached_append() {
// Now add a second signature with --append.
Assert::cargo_binary("sq")
.with_args(
- &["--home",
- &tmp_dir.path().to_string_lossy(),
- "sign",
+ &["sign",
"--detached",
"--append",
"--secret-key-file",
@@ -482,9 +448,7 @@ fn sq_sign_detached_append() {
// Verify both detached signatures.
Assert::cargo_binary("sq")
.with_args(
- &["--home",
- &tmp_dir.path().to_string_lossy(),
- "verify",
+ &["verify",
"--sender-cert-file",
&artifact("keys/dennis-simon-anton.pgp"),
"--detached",
@@ -493,9 +457,7 @@ fn sq_sign_detached_append() {
.unwrap();
Assert::cargo_binary("sq")
.with_args(
- &["--home",
- &tmp_dir.path().to_string_lossy(),
- "verify",
+ &["verify",
"--sender-cert-file",
&artifact("keys/erika-corinna-daniela-simone-antonia-nistp256.pgp"),
"--detached",
@@ -507,9 +469,7 @@ fn sq_sign_detached_append() {
// goes wrong.
Assert::cargo_binary("sq")
.with_args(
- &["--home",
- &tmp_dir.path().to_string_lossy(),
- "sign",
+ &["sign",
"--detached",
"--append",
"--secret-key-file",
@@ -547,9 +507,7 @@ fn sq_sign_append_a_notarization() {
// Now add a third signature with --append to a notarized message.
Assert::cargo_binary("sq")
.with_args(
- &["--home",
- &tmp_dir.path().to_string_lossy(),
- "sign",
+ &["sign",
"--append",
"--secret-key-file",
&artifact("keys/erika-corinna-daniela-simone-antonia-nistp256-private.pgp"),
@@ -610,27 +568,21 @@ fn sq_sign_append_a_notarization() {
// Verify both notarizations and the signature.
Assert::cargo_binary("sq")
.with_args(
- &["--home",
- &tmp_dir.path().to_string_lossy(),
- "verify",
+ &["verify",
"--sender-cert-file",
&artifact("keys/neal.pgp"),
&sig0.to_string_lossy()])
.unwrap();
Assert::cargo_binary("sq")
.with_args(
- &["--home",
- &tmp_dir.path().to_string_lossy(),
- "verify",
+ &["verify",
"--sender-cert-file",
&artifact("keys/emmelie-dorothea-dina-samantha-awina-ed25519.pgp"),
&sig0.to_string_lossy()])
.unwrap();
Assert::cargo_binary("sq")
.with_args(
- &["--home",
- &tmp_dir.path().to_string_lossy(),
- "verify",
+ &["verify",
"--sender-cert-file",
&artifact("keys/erika-corinna-daniela-simone-antonia-nistp256.pgp"),
&sig0.to_string_lossy()])
@@ -645,9 +597,7 @@ fn sq_sign_notarize() {
// Now add a third signature with --append to a notarized message.
Assert::cargo_binary("sq")
.with_args(
- &["--home",
- &tmp_dir.path().to_string_lossy(),
- "sign",
+ &["sign",
"--notarize",
"--secret-key-file",
&artifact("keys/erika-corinna-daniela-simone-antonia-nistp256-private.pgp"),
@@ -696,18 +646,14 @@ fn sq_sign_notarize() {
// Verify both notarizations and the signature.
Assert::cargo_binary("sq")
.with_args(
- &["--home",
- &tmp_dir.path().to_string_lossy(),
- "verify",
+ &["verify",
"--sender-cert-file",
&artifact("keys/neal.pgp"),
&sig0.to_string_lossy()])
.unwrap();
Assert::cargo_binary("sq")
.with_args(
- &["--home",
- &tmp_dir.path().to_string_lossy(),
- "verify",
+ &["verify",
"--sender-cert-file",
&artifact("keys/erika-corinna-daniela-simone-antonia-nistp256.pgp"),
&sig0.to_string_lossy()])
@@ -722,9 +668,7 @@ fn sq_sign_notarize_a_notarization() {
// Now add a third signature with --append to a notarized message.
Assert::cargo_binary("sq")
.with_args(
- &["--home",
- &tmp_dir.path().to_string_lossy(),
- "sign",
+ &["sign",
"--notarize",
"--secret-key-file",
&artifact("keys/erika-corinna-daniela-simone-antonia-nistp256-private.pgp"),
@@ -785,27 +729,21 @@ fn sq_sign_notarize_a_notarization() {
// Verify both notarizations and the signature.
Assert::cargo_binary("sq")
.with_args(
- &["--home",
- &tmp_dir.path().to_string_lossy(),
- "verify",
+ &["verify",
"--sender-cert-file",
&artifact("keys/neal.pgp"),
&sig0.to_string_lossy()])
.unwrap();
Assert::cargo_binary("sq")
.with_args(
- &["--home",
- &tmp_dir.path().to_string_lossy(),
- "verify",
+ &["verify",
"--sender-cert-file",
&artifact("keys/emmelie-dorothea-dina-samantha-awina-ed25519.pgp"),
&sig0.to_string_lossy()])
.unwrap();
Assert::cargo_binary("sq")
.with_args(
- &["--home",
- &tmp_dir.path().to_string_lossy(),
- "verify",
+ &["verify",
"--sender-cert-file",
&artifact("keys/erika-corinna-daniela-simone-antonia-nistp256.pgp"),
&sig0.to_string_lossy()])