}
#endif
-static int attach_luks2_by_fido2(
+static int attach_luks2_by_fido2_via_plugin(
struct crypt_device *cd,
const char *name,
usec_t until,
for (;;) {
if (use_libcryptsetup_plugin && !arg_fido2_cid) {
- r = attach_luks2_by_fido2(cd, name, until, arg_headless, arg_fido2_device, flags);
+ r = attach_luks2_by_fido2_via_plugin(cd, name, until, arg_headless, arg_fido2_device, flags);
if (IN_SET(r, -ENOTUNIQ, -ENXIO, -ENOENT))
return log_debug_errno(SYNTHETIC_ERRNO(EAGAIN),
"Automatic FIDO2 metadata discovery was not possible because missing or not unique, falling back to traditional unlocking.");
return 0;
}
-static int attach_luks2_by_pkcs11(
+static int attach_luks2_by_pkcs11_via_plugin(
struct crypt_device *cd,
const char *name,
const char *friendly_name,
for (;;) {
if (use_libcryptsetup_plugin && arg_pkcs11_uri_auto)
- r = attach_luks2_by_pkcs11(cd, name, friendly, until, arg_headless, flags);
+ r = attach_luks2_by_pkcs11_via_plugin(cd, name, friendly, until, arg_headless, flags);
else {
r = decrypt_pkcs11_key(
name,
return 0;
}
-static int attach_luks2_by_tpm2(
+static int attach_luks2_by_tpm2_via_plugin(
struct crypt_device *cd,
const char *name,
uint32_t flags) {
if (r != -EAGAIN) /* EAGAIN means: no tpm2 chip found */
return r;
} else {
- r = attach_luks2_by_tpm2(cd, name, flags);
+ r = attach_luks2_by_tpm2_via_plugin(cd, name, flags);
/* EAGAIN means: no tpm2 chip found
* EOPNOTSUPP means: no libcryptsetup plugins support */
if (r == -ENXIO)
return r;
}
- if (r == -EOPNOTSUPP) {
+ if (r == -EOPNOTSUPP) { /* Plugin not available, let's process TPM2 stuff right here instead */
_cleanup_free_ void *blob = NULL, *policy_hash = NULL;
size_t blob_size, policy_hash_size;
bool found_some = false;