Skip to content

Commit a53551f

Browse files
committed
linux: filter out key errors when looking up identity
The lookup should only fail for non key related operations. If the identity is not available the identity will be created after this operations. Fixes: f4c6eee ("rrc: return error codes directly") Signed-off-by: Daniel Wagner <[email protected]>
1 parent dbe6236 commit a53551f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libnvme/src/nvme/linux.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1813,7 +1813,7 @@ int __nvme_import_keys_from_config(nvme_host_t h, nvme_ctrl_t c,
18131813
identity = nvme_ctrl_get_tls_key_identity(c);
18141814
if (identity) {
18151815
ret = nvme_lookup_key("psk", identity, &id);
1816-
if (ret) {
1816+
if (ret && !(ret == -ENOKEY || ret == -EKEYREVOKED)) {
18171817
nvme_msg(h->ctx, LOG_ERR,
18181818
"Failed to lookup key for identity %s, error %d\n",
18191819
identity, ret);

0 commit comments

Comments
 (0)