]> git.ipfire.org Git - thirdparty/systemd.git/commit
cryptenroll: Save primary algorithm type to the LUKS token
authorVitaly Kuznetsov <vkuznets@redhat.com>
Fri, 27 Feb 2026 12:46:07 +0000 (13:46 +0100)
committerVitaly Kuznetsov <vkuznets@redhat.com>
Fri, 27 Feb 2026 13:01:10 +0000 (14:01 +0100)
commit295affa3f7b74fb8bc680db2d7539e110e6d9130
tree4020798a40cac914050d5190153f3ebdc9ab9baa
parent13167bfc2f7b747d23494f5d878ddacfe237ac1c
cryptenroll: Save primary algorithm type to the LUKS token

'tpm2-primary-alg' field is currently unset in LUKS JSON token both for the
case when SRK was used for enrolling (--tpm2-device-key=) and for the case when
SRK was obtained/generated (--tpm2-device=). While this information is not
really needed for unsealing (the sealed object itself has key type in it), it
may be convenient to see key type in e.g. 'cryptsetup luksDump' in the
situations where key type matters. Since 'tpm2-primary-alg' is already defined,
just set it properly in all cases.
src/cryptenroll/cryptenroll-tpm2.c