summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorJungmin Park2022-08-24 14:37:06 +0200
committerDaniel P. Berrangé2022-10-26 14:32:08 +0200
commitbf98afc75efedf10965a3f2d98aa43c234cf69ed (patch)
treeadfbfbd27b58073102a0b00fc42adaf9070c88d8 /util
parentMerge tag 'pull-9p-20221024' of https://github.com/cschoenebeck/qemu into sta... (diff)
downloadqemu-bf98afc75efedf10965a3f2d98aa43c234cf69ed.tar.gz
qemu-bf98afc75efedf10965a3f2d98aa43c234cf69ed.tar.xz
qemu-bf98afc75efedf10965a3f2d98aa43c234cf69ed.zip
crypto/luks: Support creating LUKS image on Darwin
When the user creates a LUKS-encrypted qcow2 image using the qemu-img program, the passphrase is hashed using PBKDF2 with a dynamic number of iterations. The number of iterations is determined by measuring thread cpu time usage, such that it takes approximately 2 seconds to compute the hash. Because Darwin doesn't implement getrusage(RUSAGE_THREAD), we get an error message: > qemu-img: test.qcow2: Unable to calculate thread CPU usage on this platform for this command: > qemu-img create --object secret,id=key,data=1234 -f qcow2 -o 'encrypt.format=luks,encrypt.key-secret=key' test.qcow2 100M This patch implements qcrypto_pbkdf2_get_thread_cpu() for Darwin so that the above command works. Signed-off-by: Jungmin Park <pjm0616@gmail.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'util')
0 files changed, 0 insertions, 0 deletions