mirror of
https://github.com/pcvolkmer/cert-tools.git
synced 2025-07-01 22:12:55 +00:00
chore: return error string
This commit is contained in:
@ -107,10 +107,10 @@ impl Certificate {
|
|||||||
Ok(result)
|
Ok(result)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn to_pem(&self) -> Result<String, ()> {
|
pub fn to_pem(&self) -> Result<String, 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.to_string()),
|
||||||
Err(_) => Err(()),
|
Err(err) => Err(err.to_string()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user