Store a signed revocation for a delegation.
(&self, id: &str, document: &str)
| 823 | |
| 824 | /// Store a signed revocation for a delegation. |
| 825 | pub fn save_revocation(&self, id: &str, document: &str) -> Result<(), IdentityError> { |
| 826 | let dir = self.delegations_dir(); |
| 827 | if !dir.exists() { |
| 828 | fs::create_dir_all(&dir)?; |
| 829 | } |
| 830 | fs::write(self.revocation_path(id), document)?; |
| 831 | Ok(()) |
| 832 | } |
| 833 | |
| 834 | /// The stored revocation for a delegation, if one exists. |
| 835 | pub fn load_revocation(&self, id: &str) -> Result<Option<String>, IdentityError> { |