Store a signed revocation for a delegation.
(&self, id: &str, document: &str)
| 844 | |
| 845 | /// Store a signed revocation for a delegation. |
| 846 | pub fn save_revocation(&self, id: &str, document: &str) -> Result<(), IdentityError> { |
| 847 | let dir = self.delegations_dir(); |
| 848 | if !dir.exists() { |
| 849 | fs::create_dir_all(&dir)?; |
| 850 | } |
| 851 | fs::write(self.revocation_path(id), document)?; |
| 852 | Ok(()) |
| 853 | } |
| 854 | |
| 855 | /// The stored revocation for a delegation, if one exists. |
| 856 | pub fn load_revocation(&self, id: &str) -> Result<Option<String>, IdentityError> { |