util: detect LUKS encryption scheme in qcow2 files

Crypt method number 2 indicates LUKS format.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2020-09-16 18:00:35 +01:00
parent 2a1b0e51dd
commit 285fdf373d

View File

@ -290,6 +290,22 @@ static struct FileEncryptionInfo const qcow2EncryptionInfo[] = {
.payloadOffset = -1,
},
{
.format = VIR_STORAGE_ENCRYPTION_FORMAT_LUKS,
.magicOffset = 0,
.magic = NULL,
.endian = LV_BIG_ENDIAN,
.versionOffset = -1,
.versionSize = 0,
.versionNumbers = {},
.modeOffset = QCOW2_HDR_CRYPT,
.modeValue = 2,
.payloadOffset = -1,
},
{ 0 }
};