+5
−1
+75
−5
Loading
This callback makes it possible to implement keyring modules that instantiate the keys only once they're requested by the user. For instance, a module can check if the key is available in a remote key server and fetch it over the network. Since probed keys are added to the keyring implicitly, they're removed once the last reference to a key is released. Users can still explicitly remove such keys while they're still in use - in this case the references are still valid, but they cannot be used to retrieve the keying material. To make it possible to add a key from within the probe_key() callback, g_keyring.mutex was changed to be recursive. That's because probe_key() is called with the mutex held, and spdk_keyring_add_key() takes it again. Signed-off-by:Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I4852c8371c076bdf0f6cfce16cd86619ac4b8c7a Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/21758 Reviewed-by:
Aleksey Marchuk <alexeymar@nvidia.com> Community-CI: Mellanox Build Bot Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Jim Harris <jim.harris@samsung.com>