aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Jackson <iwj@torproject.org>2024-02-01 15:15:47 +0000
committerGabriela Moldovan <gabi@torproject.org>2024-02-01 20:51:18 +0000
commit301982b71b46126e064553d86b5948dead6953f1 (patch)
treef4921a1db6be53b0ac5f463609e9ab2e24da43be
parent37a73f13b952be05fd95c8fbe2e577488012bc74 (diff)
downloadarti-301982b71b46126e064553d86b5948dead6953f1.tar.gz
arti-301982b71b46126e064553d86b5948dead6953f1.zip
tor-keymgr: Expand the KeyAlreadyExists docs.
-rw-r--r--crates/tor-keymgr/src/err.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/tor-keymgr/src/err.rs b/crates/tor-keymgr/src/err.rs
index 1c7817346..c0ea2366b 100644
--- a/crates/tor-keymgr/src/err.rs
+++ b/crates/tor-keymgr/src/err.rs
@@ -24,6 +24,13 @@ pub enum Error {
Keystore(#[from] Arc<dyn KeystoreError>),
/// An error returned when the [`KeyMgr`] is asked to generate a key that already exists.
+ ///
+ /// Note that because there is no locking of the keystore,
+ /// this situation is not reliably detected
+ /// in the presence of concurrent tasks trying to generate the same key.
+ ///
+ /// So this error is provided to help the human user,
+ /// but mustn't be relied on for correctness.
#[error("Key already exists")]
KeyAlreadyExists,