Unlink only volume keys that were previously stored in keyring.

This is only preparation for an extension later, however, the volume
keys should not be unloaded unconditionally from keyring.

Note that all other places dropping keys already check that keys
were uploaded through key ID setting.
(And for suspend unconditional unlink make sense too.)
This commit is contained in:
Milan Broz
2024-11-22 11:32:03 +01:00
parent 9575dadc8b
commit ae4b4ff4d7
4 changed files with 23 additions and 17 deletions

View File

@@ -27,6 +27,7 @@ struct volume_key *crypt_alloc_volume_key(size_t keylength, const char *key)
vk->key_description = NULL;
vk->keyring = INVALID_KEY;
vk->keylength = keylength;
vk->uploaded = false;
vk->id = KEY_NOT_VERIFIED;
vk->next = NULL;