Skip to content

Draft: tor-keymgr: Add traits providing keystore access.

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

The reason for this change is twofold:

  • it helps us keep the dummy KeyMgr implementation in sync with the "real" one: if we add new functions to any of these traits, we are forced to implement them for the dummy KeyMgr too, because otherwise the --no-default-features build of arti will fail to compile (when adding new functions to KeyMgr, it's currently very easy to forget to add a corresponding implementation to the dummy KeyMgr. In fact, the dummy implementation is currently missing a lot of the functions we have on the fully-featured KeyMgr).
  • it enables us to extend the keymgr with the ability to retrieve non-key items, such as certificates, using accessors that have the same name as the accessors for keys (i.e. KeyMgr will have two get functions: KeyMgr::get<K: ToEncodableKey>, for retrieving keys, and KeyMgr::get<K::ToEncodableCert>, for retrieving certs)

Merge request reports

Loading