From c8a128cc598273165384b726a920a37ad5e397e6 Mon Sep 17 00:00:00 2001 From: Gabriela Moldovan Date: Tue, 27 Jun 2023 11:25:23 +0100 Subject: [PATCH] tor-error: Add KeystoreCorrupted to ErrorKind. --- crates/tor-error/semver.md | 1 + crates/tor-error/src/lib.rs | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/crates/tor-error/semver.md b/crates/tor-error/semver.md index e467e7aa0..59b3b1eec 100644 --- a/crates/tor-error/semver.md +++ b/crates/tor-error/semver.md @@ -1 +1,2 @@ ADDED: LooseCmpRetryTime +ADDED: `ErrorKind::KeystoreCorrupted` diff --git a/crates/tor-error/src/lib.rs b/crates/tor-error/src/lib.rs index f4880b18b..60fa82b09 100644 --- a/crates/tor-error/src/lib.rs +++ b/crates/tor-error/src/lib.rs @@ -207,6 +207,16 @@ pub enum ErrorKind { #[display(fmt = "cache access problem")] CacheAccessFailed, + /// The keystore has been corrupted + /// + /// This could be because of a bug in the Tor code, or because something else has been messing + /// with the data. + /// + /// Note that this kind of error only applies to problems in your `keystore_dir`: + /// problems with your cache or persistent state are another kind. + #[display(fmt = "corrupted data in keystore")] + KeystoreCorrupted, + /// Tor client's Rust async reactor is shutting down. /// /// This likely indicates that the reactor has encountered a fatal error, or