Load a delegation certificate by base32 id.
(&self, id: &str)
| 853 | |
| 854 | /// Load a delegation certificate by base32 id. |
| 855 | pub fn load_delegation(&self, id: &str) -> Result<String, IdentityError> { |
| 856 | let path = self.delegation_path(id); |
| 857 | if !path.exists() { |
| 858 | return Err(IdentityError::DelegationNotFound { id: id.to_string() }); |
| 859 | } |
| 860 | Ok(fs::read_to_string(path)?) |
| 861 | } |
| 862 | |
| 863 | /// Is a certificate stored under this id? |
| 864 | pub fn delegation_exists(&self, id: &str) -> bool { |