summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-02-06 15:53:46 +0100
committerJustus Winter <justus@sequoia-pgp.org>2020-02-06 16:19:48 +0100
commit5b95ceeb0109e5036d9b403fcff689f4e29f107e (patch)
treeae0b34e088fb9b28f0994d41b3fbe0e27f353d4b
parent537765aea0e34dda98d8038b339162f75a4ff76d (diff)
sqv: Print fingerprints and keyids without whitespace.
- This improves usability, e.g. when copy&pasting. - Fixes #422.
-rw-r--r--sqv/src/sqv.rs10
-rw-r--r--sqv/tests/bad-subkey.rs2
-rw-r--r--sqv/tests/not-before-after.rs4
3 files changed, 8 insertions, 8 deletions
diff --git a/sqv/src/sqv.rs b/sqv/src/sqv.rs
index c23f4b38..44dad359 100644
--- a/sqv/src/sqv.rs
+++ b/sqv/src/sqv.rs
@@ -154,12 +154,12 @@ impl<'a> VerificationHelper for VHelper<'a> {
eprintln!(
"Signature by {} was created before \
the --not-before date.",
- ka.key().fingerprint());
+ ka.key().fingerprint().to_hex());
} else if t > not_after {
eprintln!(
"Signature by {} was created after \
the --not-after date.",
- ka.key().fingerprint());
+ ka.key().fingerprint().to_hex());
} else {
signers.push(ka.cert().fingerprint());
}
@@ -169,7 +169,7 @@ impl<'a> VerificationHelper for VHelper<'a> {
eprintln!(
"Signature by {} was created after \
the --not-after date.",
- ka.key().fingerprint());
+ ka.key().fingerprint().to_hex());
} else {
signers.push(ka.cert().fingerprint());
}
@@ -183,7 +183,7 @@ impl<'a> VerificationHelper for VHelper<'a> {
if let Some(issuer) = sig.get_issuers().first() {
eprintln!("Missing {}, which is needed to \
verify signature.",
- issuer);
+ issuer.to_hex());
} else {
eprintln!("Signature has no Issuer or \
Issuer Fingerprint subpacket. \
@@ -212,7 +212,7 @@ impl<'a> VerificationHelper for VHelper<'a> {
self.good = signers.len();
for signer in signers {
- println!("{}", signer);
+ println!("{}", signer.to_hex());
}
Ok(())
diff --git a/sqv/tests/bad-subkey.rs b/sqv/tests/bad-subkey.rs
index 436648bd..bf83e2dc 100644
--- a/sqv/tests/bad-subkey.rs
+++ b/sqv/tests/bad-subkey.rs
@@ -12,7 +12,7 @@ mod integration {
.current_dir(path::Path::new("tests").join("data"))
.with_args(&["--keyring", "bad-subkey-keyring.pgp",
"bad-subkey.txt.sig", "bad-subkey.txt"])
- .stdout().is("8F17 7771 18A3 3DDA 9BA4 8E62 AACB 3243 6300 52D9")
+ .stdout().is("8F17777118A33DDA9BA48E62AACB3243630052D9")
.unwrap();
}
}
diff --git a/sqv/tests/not-before-after.rs b/sqv/tests/not-before-after.rs
index 0295dbd9..8279f41d 100644
--- a/sqv/tests/not-before-after.rs
+++ b/sqv/tests/not-before-after.rs
@@ -16,7 +16,7 @@ mod integration {
&p("keys/emmelie-dorothea-dina-samantha-awina-ed25519.pgp"),
&p("messages/a-cypherpunks-manifesto.txt.ed25519.sig"),
&p("messages/a-cypherpunks-manifesto.txt")])
- .stdout().is("8E8C 33FA 4626 3379 76D9 7978 069C 0C34 8DD8 2C19")
+ .stdout().is("8E8C33FA4626337976D97978069C0C348DD82C19")
.unwrap();
}
@@ -30,7 +30,7 @@ mod integration {
"--not-after", "2018-08-15",
&p("messages/a-cypherpunks-manifesto.txt.ed25519.sig"),
&p("messages/a-cypherpunks-manifesto.txt")])
- .stdout().is("8E8C 33FA 4626 3379 76D9 7978 069C 0C34 8DD8 2C19")
+ .stdout().is("8E8C33FA4626337976D97978069C0C348DD82C19")
.unwrap();
}