From 036ed529994c83c2d653a21a663edc509e4163f5 Mon Sep 17 00:00:00 2001 From: Ondrej Kozina Date: Tue, 4 Feb 2025 16:04:49 +0100 Subject: [PATCH] Remove volume key internals from internal API. --- lib/internal.h | 11 +---------- lib/volumekey.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/internal.h b/lib/internal.h index eea6c75d8..4473ab045 100644 --- a/lib/internal.h +++ b/lib/internal.h @@ -48,16 +48,7 @@ struct crypt_device; struct luks2_reencrypt; - -struct volume_key { - int id; - size_t keylength; /* length in bytes */ - const char *key_description; /* keyring key name/description */ - key_type_t keyring_key_type; /* kernel keyring key type */ - bool uploaded; /* uploaded to keyring, can drop it */ - struct volume_key *next; - char *key; -}; +struct volume_key; typedef enum { KEY_QUALITY_KEY = 0, diff --git a/lib/volumekey.c b/lib/volumekey.c index 8ed72ea1f..ac60ee85b 100644 --- a/lib/volumekey.c +++ b/lib/volumekey.c @@ -13,6 +13,16 @@ #include "internal.h" +struct volume_key { + int id; + size_t keylength; /* length in bytes */ + const char *key_description; /* keyring key name/description */ + key_type_t keyring_key_type; /* kernel keyring key type */ + bool uploaded; /* uploaded to keyring, can drop it */ + struct volume_key *next; + char *key; +}; + struct volume_key *crypt_alloc_volume_key(size_t keylength, const char *key) { struct volume_key *vk;