From 256690d97c7f5141eee9fcf974a1a5aace1a220e Mon Sep 17 00:00:00 2001 From: Heiko Schaefer Date: Sun, 19 Sep 2021 19:13:51 +0200 Subject: [PATCH] Print RSA import format in Display for Algo --- openpgp-card/src/algorithm.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openpgp-card/src/algorithm.rs b/openpgp-card/src/algorithm.rs index da03e64..c802ec2 100644 --- a/openpgp-card/src/algorithm.rs +++ b/openpgp-card/src/algorithm.rs @@ -161,7 +161,11 @@ impl fmt::Display for Algo { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { Self::Rsa(rsa) => { - write!(f, "RSA {}, {} ", rsa.len_n, rsa.len_e) + write!( + f, + "RSA {}, {} [format {}]", + rsa.len_n, rsa.len_e, rsa.import_format + ) } Self::Ecc(ecc) => { write!(f, "{:?} ({:?})", ecc.curve, ecc.ecc_type)