cryptenroll,cryptsetup: clean up unlock credential for TPM2 + FIDO2
Let's make sure that when cryptenroll asks for the TPM2 or FIDO2 token PIN it uses cryptenroll.* credential namespace, and cryptsetup uses cryptsetup.*.
This commit is contained in:
@@ -34,9 +34,10 @@ int load_volume_key_fido2(
|
||||
device,
|
||||
/* until= */ 0,
|
||||
/* headless= */ false,
|
||||
"cryptenroll.fido2-pin",
|
||||
ASK_PASSWORD_PUSH_CACHE|ASK_PASSWORD_ACCEPT_CACHED,
|
||||
&decrypted_key,
|
||||
&decrypted_key_size,
|
||||
ASK_PASSWORD_PUSH_CACHE|ASK_PASSWORD_ACCEPT_CACHED);
|
||||
&decrypted_key_size);
|
||||
if (r == -EAGAIN)
|
||||
return log_error_errno(r, "FIDO2 token does not exist, or UV is blocked. Please try again.");
|
||||
if (r < 0)
|
||||
|
||||
@@ -211,7 +211,8 @@ int load_volume_key_tpm2(
|
||||
tpm2_flags,
|
||||
/* until= */ 0,
|
||||
/* headless= */ false,
|
||||
/* ask_password_flags= */ 0,
|
||||
"cryptenroll.tpm2-pin",
|
||||
/* askpw_flags= */ 0,
|
||||
&decrypted_key);
|
||||
if (IN_SET(r, -EACCES, -ENOLCK))
|
||||
return log_notice_errno(SYNTHETIC_ERRNO(EAGAIN), "TPM2 PIN unlock failed");
|
||||
|
||||
Reference in New Issue
Block a user