KeyStore

Persistent storage for cryptographic keys.

Inherits QObject and QEnableSharedFromThis
Group security

Declared in src/libs/libsec/security/KeyStore.hpp.

Detailed description

KeyStore manages the node's local private key and a collection of associate public keys. It provides async loading/saving via AsyncStore, key bootstrapping on first run, and lookup of associate keys by ID.

See also ISigningKey, AsyncStore, KeySecurityPolicy.

Member function documentation

dtor.KeyStore

[override virtual noexcept] KeyStore::~KeyStore()

Close the AsyncStore: run the events that are still in its queue, save the last changes, and end its worker. Done when it returns.

The queued events need this KeyStore, and the weak lock of the frontend fails now. So the frontend gets this KeyStore for the close. A save that the owner queued before it let go is written. Before 2026-10-15 no KeyStore was freed (see OwnerFrontend), and its worker ran the queue at some later time.

The destructor does not run on the worker, which cannot wait for itself: a reference that the worker held last is released on the application thread, see OwnerFrontend.

In this section