]> git.ipfire.org Git - thirdparty/grub.git/commit
disk/cryptodisk: Add options to cryptomount to support keyfiles
authorJohn Lane <john@lane.uk.net>
Fri, 20 May 2022 19:32:17 +0000 (14:32 -0500)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 7 Jun 2022 11:22:14 +0000 (13:22 +0200)
commit81b2f625f54cb670e36739e3a599daafd34bc44a
tree463c9e2b495031d8faab23dccbe5741e6f58c85b
parent100e410e9c7ea00e088510e0d356cb7be2f9f134
disk/cryptodisk: Add options to cryptomount to support keyfiles

Add the options --key-file, --keyfile-offset, and --keyfile-size to
cryptomount and code to put read the requested key file data and pass
via the cargs struct. Note, key file data is for all intents and purposes
equivalent to a password given to cryptomount. So there is no need to
enable support for key files in the various crypto backends (e.g. LUKS1)
because the key data is passed just as if it were a password.

Signed-off-by: John Lane <john@lane.uk.net>
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/disk/cryptodisk.c
include/grub/cryptodisk.h
include/grub/file.h