Load a delegation certificate by base32 id.
(&self, id: &str)
| 787 | |
| 788 | /// Load a delegation certificate by base32 id. |
| 789 | pub fn load_delegation(&self, id: &str) -> Result<String, IdentityError> { |
| 790 | let path = self.delegation_path(id); |
| 791 | if !path.exists() { |
| 792 | return Err(IdentityError::DelegationNotFound { id: id.to_string() }); |
| 793 | } |
| 794 | Ok(fs::read_to_string(path)?) |
| 795 | } |
| 796 | |
| 797 | /// Is a certificate stored under this id? |
| 798 | pub fn delegation_exists(&self, id: &str) -> bool { |