diff --git a/src/chain.rs b/src/chain.rs index 8fae9c0..bb7792b 100644 --- a/src/chain.rs +++ b/src/chain.rs @@ -140,7 +140,7 @@ impl Certificate { Ok(result) } - pub fn to_plain(&self) -> Result { + pub fn to_pem(&self) -> Result { match self.cert.to_pem() { Ok(pem) => String::from_utf8(pem).map_err(|_| ()), Err(_) => Err(()), diff --git a/src/main.rs b/src/main.rs index 263f112..564e196 100644 --- a/src/main.rs +++ b/src/main.rs @@ -131,7 +131,7 @@ fn main() -> Result<(), ()> { return Err(()); } for cert in chain.certs() { - match cert.to_plain() { + match cert.to_pem() { Ok(plain) => print!("{}", plain), Err(_) => { eprintln!(