Print RSA import format in Display for Algo

This commit is contained in:
Heiko Schaefer 2021-09-19 19:13:51 +02:00
parent 0bf59c7e51
commit 256690d97c

View file

@ -161,7 +161,11 @@ impl fmt::Display for Algo {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self { match self {
Self::Rsa(rsa) => { 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) => { Self::Ecc(ecc) => {
write!(f, "{:?} ({:?})", ecc.curve, ecc.ecc_type) write!(f, "{:?} ({:?})", ecc.curve, ecc.ecc_type)