Return -EINVAL if keyslot context can not access keyring key.

This commit is contained in:
Ondrej Kozina
2025-05-27 13:44:32 +02:00
parent b6f43890f2
commit a6c9c28208

View File

@@ -516,8 +516,8 @@ static int get_key_by_vk_in_keyring(struct crypt_device *cd,
&key, &key_size);
if (r < 0) {
log_err(cd, _("Failed to read volume key candidate from keyring."));
kc->error = r;
return r;
kc->error = -EINVAL;
return -EINVAL;
}
*r_vk = crypt_alloc_volume_key_by_safe_alloc((void **)&key);