1
0
mirror of https://github.com/pcvolkmer/cert-tools.git synced 2025-04-19 17:06:49 +00:00

refactor: change method name

This commit is contained in:
Paul-Christian Volkmer 2025-01-03 13:26:36 +01:00
parent 5127cf168d
commit b1fe6c0be5
2 changed files with 2 additions and 2 deletions

View File

@ -140,7 +140,7 @@ impl Certificate {
Ok(result) Ok(result)
} }
pub fn to_plain(&self) -> Result<String, ()> { pub fn to_pem(&self) -> Result<String, ()> {
match self.cert.to_pem() { match self.cert.to_pem() {
Ok(pem) => String::from_utf8(pem).map_err(|_| ()), Ok(pem) => String::from_utf8(pem).map_err(|_| ()),
Err(_) => Err(()), Err(_) => Err(()),

View File

@ -131,7 +131,7 @@ fn main() -> Result<(), ()> {
return Err(()); return Err(());
} }
for cert in chain.certs() { for cert in chain.certs() {
match cert.to_plain() { match cert.to_pem() {
Ok(plain) => print!("{}", plain), Ok(plain) => print!("{}", plain),
Err(_) => { Err(_) => {
eprintln!( eprintln!(