summaryrefslogtreecommitdiffstats
path: root/sqv
diff options
context:
space:
mode:
authorWiktor Kwapisiewicz <wiktor@metacode.biz>2020-03-20 15:14:05 +0100
committerWiktor Kwapisiewicz <wiktor@metacode.biz>2020-03-20 15:36:58 +0100
commit857845f523ab090638693d5498c8753e1e41cf36 (patch)
tree589fe471f65f98f3438633d83894fb160aa04f6f /sqv
parent8905aabfa245754426bd67ba5319024e61fc39db (diff)
openpgp: Remove `to_hex` in KeyHandle, KeyID and Fingerprint.
- Replace all usages of `to_hex` with formatting string with :X specifier. - Fixes #456.
Diffstat (limited to 'sqv')
-rw-r--r--sqv/src/sqv.rs26
1 files changed, 13 insertions, 13 deletions
diff --git a/sqv/src/sqv.rs b/sqv/src/sqv.rs
index dfa6042b..cb458797 100644
--- a/sqv/src/sqv.rs
+++ b/sqv/src/sqv.rs
@@ -152,14 +152,14 @@ impl<'a> VerificationHelper for VHelper<'a> {
(Some(t), Some(not_before), not_after) => {
if t < not_before {
eprintln!(
- "Signature by {} was created before \
+ "Signature by {:X} was created before \
the --not-before date.",
- ka.key().fingerprint().to_hex());
+ ka.key().fingerprint());
} else if t > not_after {
eprintln!(
- "Signature by {} was created after \
+ "Signature by {:X} was created after \
the --not-after date.",
- ka.key().fingerprint().to_hex());
+ ka.key().fingerprint());
} else {
signers.push(ka.cert().fingerprint());
}
@@ -167,9 +167,9 @@ impl<'a> VerificationHelper for VHelper<'a> {
(Some(t), None, not_after) => {
if t > not_after {
eprintln!(
- "Signature by {} was created after \
+ "Signature by {:X} was created after \
the --not-after date.",
- ka.key().fingerprint().to_hex());
+ ka.key().fingerprint());
} else {
signers.push(ka.cert().fingerprint());
}
@@ -181,17 +181,17 @@ impl<'a> VerificationHelper for VHelper<'a> {
}
Err(MissingKey { sig, .. }) => {
let issuers = sig.get_issuers();
- eprintln!("Missing key {}, which is needed to \
+ eprintln!("Missing key {:X}, which is needed to \
verify signature.",
- issuers.first().unwrap().to_hex());
+ issuers.first().unwrap());
}
Err(UnboundKey { cert, error, .. }) => {
- eprintln!("Signing key on {} is not bound: {}",
- cert.fingerprint().to_hex(), error);
+ eprintln!("Signing key on {:X} is not bound: {}",
+ cert.fingerprint(), error);
}
Err(BadKey { ka, error, .. }) => {
- eprintln!("Signing key on {} is bad: {}",
- ka.cert().fingerprint().to_hex(),
+ eprintln!("Signing key on {:X} is bad: {}",
+ ka.cert().fingerprint(),
error);
}
Err(BadSignature { error, .. }) => {
@@ -215,7 +215,7 @@ impl<'a> VerificationHelper for VHelper<'a> {
self.good = signers.len();
for signer in signers {
- println!("{}", signer.to_hex());
+ println!("{:X}", signer);
}
Ok(())