Skip to content

tor-keymgr: Add a top-level Error enum

gabi-250 requested to merge gabi-250/arti:keymgr-errors into main

Previously, the tor_keymgr::Error type was Box<dyn KeystoreError>. This forced us to impl KeystoreError for any error returned by the keymgr (including those that were not coming from a Keystore impl).

Now, tor_keymgr::Error is an non-exhaustive enum and the Box<dyn KeystoreError> opaque error type is only returned from Keystore impls. The reason we're keeping the dyn KeystoreError error type is because it enables Keystore implementors to use their own error types. Without it, they would have to choose from our (closed) set of error variants, which may not be suitable for their keystore. See #901 (closed).

Closes #1113 (closed)

Merge request reports

Loading