mirror of
https://github.com/pcvolkmer/cert-tools.git
synced 2025-04-19 09:06:49 +00:00
chore: return error string
This commit is contained in:
parent
8e898cf4bb
commit
7905603aad
@ -107,10 +107,10 @@ impl Certificate {
|
||||
Ok(result)
|
||||
}
|
||||
|
||||
pub fn to_pem(&self) -> Result<String, ()> {
|
||||
pub fn to_pem(&self) -> Result<String, String> {
|
||||
match self.cert.to_pem() {
|
||||
Ok(pem) => String::from_utf8(pem).map_err(|_| ()),
|
||||
Err(_) => Err(()),
|
||||
Ok(pem) => String::from_utf8(pem).map_err(|err| err.to_string()),
|
||||
Err(err) => Err(err.to_string()),
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user