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:
parent
5127cf168d
commit
b1fe6c0be5
@ -140,7 +140,7 @@ impl Certificate {
|
||||
Ok(result)
|
||||
}
|
||||
|
||||
pub fn to_plain(&self) -> Result<String, ()> {
|
||||
pub fn to_pem(&self) -> Result<String, ()> {
|
||||
match self.cert.to_pem() {
|
||||
Ok(pem) => String::from_utf8(pem).map_err(|_| ()),
|
||||
Err(_) => Err(()),
|
||||
|
@ -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!(
|
||||
|
Loading…
x
Reference in New Issue
Block a user