cryptsetup-pkcs11: also plug credential name to use to credential plugin

This commit is contained in:
Lennart Poettering
2024-02-20 16:50:00 +01:00
parent b3a635841a
commit 1c12daa46f
3 changed files with 12 additions and 1 deletions
+10 -1
View File
@@ -1492,6 +1492,7 @@ static int attach_luks2_by_pkcs11_via_plugin(
const char *friendly_name,
usec_t until,
bool headless,
const char *askpw_credential,
uint32_t flags) {
#if HAVE_LIBCRYPTSETUP_PLUGINS
@@ -1504,6 +1505,7 @@ static int attach_luks2_by_pkcs11_via_plugin(
.friendly_name = friendly_name,
.until = until,
.headless = headless,
.askpw_credential = askpw_credential,
.askpw_flags = arg_ask_password_flags,
};
@@ -1567,7 +1569,14 @@ static int attach_luks_or_plain_or_bitlk_by_pkcs11(
for (;;) {
if (use_libcryptsetup_plugin && arg_pkcs11_uri_auto)
r = attach_luks2_by_pkcs11_via_plugin(cd, name, friendly, until, arg_headless, flags);
r = attach_luks2_by_pkcs11_via_plugin(
cd,
name,
friendly,
until,
arg_headless,
"cryptsetup.pkcs11-pin",
flags);
else {
r = decrypt_pkcs11_key(
name,