/systemd-251/src/cryptenroll/ |
D | cryptenroll-tpm2.c | 29 int keyslot; in search_policy_hash() local 38 keyslot = cryptsetup_get_keyslot_from_token(v); in search_policy_hash() 39 if (keyslot < 0) { in search_policy_hash() 42 … log_warning_errno(keyslot, "Failed to determine keyslot of JSON token %i, skipping: %m", token); in search_policy_hash() 57 return keyslot; /* Found entry with same hash. */ in search_policy_hash() 144 int r, keyslot; in enroll_tpm2() local 193 keyslot = crypt_keyslot_add_by_volume_key( in enroll_tpm2() 200 if (keyslot < 0) in enroll_tpm2() 201 return log_error_errno(keyslot, "Failed to add new TPM2 key to %s: %m", node); in enroll_tpm2() 203 …r = tpm2_make_luks2_json(keyslot, pcr_mask, pcr_bank, primary_alg, blob, blob_size, hash, hash_siz… in enroll_tpm2() [all …]
|
D | cryptenroll-recovery.c | 19 int keyslot, r, q; in enroll_recovery() local 36 keyslot = crypt_keyslot_add_by_volume_key( in enroll_recovery() 43 if (keyslot < 0) in enroll_recovery() 44 return log_error_errno(keyslot, "Failed to add new recovery key to %s: %m", node); in enroll_recovery() 72 if (asprintf(&keyslot_as_string, "%i", keyslot) < 0) { in enroll_recovery() 92 log_info("New recovery key enrolled as key slot %i.", keyslot); in enroll_recovery() 93 return keyslot; in enroll_recovery() 96 q = crypt_keyslot_destroy(cd, keyslot); in enroll_recovery()
|
D | cryptenroll-fido2.c | 25 int r, keyslot; in enroll_fido2() local 64 keyslot = crypt_keyslot_add_by_volume_key( in enroll_fido2() 71 if (keyslot < 0) in enroll_fido2() 72 return log_error_errno(keyslot, "Failed to add new FIDO2 key to %s: %m", node); in enroll_fido2() 74 if (asprintf(&keyslot_as_string, "%i", keyslot) < 0) in enroll_fido2() 94 log_info("New FIDO2 token enrolled as key slot %i.", keyslot); in enroll_fido2() 95 return keyslot; in enroll_fido2()
|
D | cryptenroll-pkcs11.c | 26 int keyslot, r; in enroll_pkcs11() local 71 keyslot = crypt_keyslot_add_by_volume_key( in enroll_pkcs11() 78 if (keyslot < 0) in enroll_pkcs11() 79 return log_error_errno(keyslot, "Failed to add new PKCS#11 key to %s: %m", node); in enroll_pkcs11() 81 if (asprintf(&keyslot_as_string, "%i", keyslot) < 0) in enroll_pkcs11() 97 log_info("New PKCS#11 token enrolled as key slot %i.", keyslot); in enroll_pkcs11() 98 return keyslot; in enroll_pkcs11()
|
D | cryptenroll-password.c | 19 int r, keyslot; in enroll_password() local 86 keyslot = crypt_keyslot_add_by_volume_key( in enroll_password() 93 if (keyslot < 0) in enroll_password() 94 return log_error_errno(keyslot, "Failed to add new password to %s: %m", node); in enroll_password() 96 log_info("New password enrolled as key slot %i.", keyslot); in enroll_password() 97 return keyslot; in enroll_password()
|
/systemd-251/src/shared/ |
D | cryptsetup-util.c | 12 int (*sym_crypt_activate_by_passphrase)(struct crypt_device *cd, const char *name, int keyslot, con… 31 int (*sym_crypt_keyslot_add_by_volume_key)(struct crypt_device *cd, int keyslot, const char *volume… 32 int (*sym_crypt_keyslot_destroy)(struct crypt_device *cd, int keyslot); 36 int (*sym_crypt_resume_by_passphrase)(struct crypt_device *cd, const char *name, int keyslot, const… 51 int (*sym_crypt_volume_key_get)(struct crypt_device *cd, int keyslot, char *volume_key, size_t *vol… 228 int keyslot, r; in cryptsetup_get_keyslot_from_token() local 247 r = safe_atoi(json_variant_string(w), &keyslot); in cryptsetup_get_keyslot_from_token() 250 if (keyslot < 0) in cryptsetup_get_keyslot_from_token() 253 return keyslot; in cryptsetup_get_keyslot_from_token()
|
D | cryptsetup-util.h | 18 …t_activate_by_passphrase)(struct crypt_device *cd, const char *name, int keyslot, const char *pass… 37 extern int (*sym_crypt_keyslot_add_by_volume_key)(struct crypt_device *cd, int keyslot, const char … 38 extern int (*sym_crypt_keyslot_destroy)(struct crypt_device *cd, int keyslot); 42 extern int (*sym_crypt_resume_by_passphrase)(struct crypt_device *cd, const char *name, int keyslot… 65 extern int (*sym_crypt_volume_key_get)(struct crypt_device *cd, int keyslot, char *volume_key, size…
|
D | tpm2-util.h | 57 int tpm2_make_luks2_json(int keyslot, uint32_t pcr_mask, uint16_t pcr_bank, uint16_t primary_alg, c…
|
D | tpm2-util.c | 1365 int keyslot, in tpm2_make_luks2_json() argument 1385 if (asprintf(&keyslot_as_string, "%i", keyslot) < 0) in tpm2_make_luks2_json() 1423 return keyslot; in tpm2_make_luks2_json()
|
/systemd-251/src/cryptsetup/ |
D | cryptsetup-pkcs11.c | 100 int r, keyslot = -1; in find_pkcs11_auto_data() local 134 assert(keyslot < 0); in find_pkcs11_auto_data() 135 keyslot = ks; in find_pkcs11_auto_data() 171 *ret_keyslot = keyslot; in find_pkcs11_auto_data()
|
D | cryptsetup-fido2.c | 137 int r, keyslot = -1; in find_fido2_auto_data() local 173 assert(keyslot < 0); in find_fido2_auto_data() 174 keyslot = ks; in find_fido2_auto_data() 259 *ret_keyslot = keyslot; in find_fido2_auto_data()
|
D | cryptsetup-tpm2.c | 178 int r, keyslot = -1, token = -1; in find_tpm2_auto_data() local 230 assert(keyslot < 0); in find_tpm2_auto_data() 231 keyslot = ks; in find_tpm2_auto_data() 317 *ret_keyslot = keyslot; in find_tpm2_auto_data()
|
D | cryptsetup.c | 926 int keyslot = arg_key_slot, r; in attach_luks_or_plain_or_bitlk_by_fido2() local 958 &keyslot, in attach_luks_or_plain_or_bitlk_by_fido2() 1045 …r = crypt_activate_by_passphrase(cd, name, keyslot, base64_encoded, strlen(base64_encoded), flags); in attach_luks_or_plain_or_bitlk_by_fido2() 1103 int keyslot = arg_key_slot, r; in attach_luks_or_plain_or_bitlk_by_pkcs11() local 1113 … r = find_pkcs11_auto_data(cd, &discovered_uri, &discovered_key, &discovered_key_size, &keyslot); in attach_luks_or_plain_or_bitlk_by_pkcs11() 1198 …r = crypt_activate_by_passphrase(cd, name, keyslot, base64_encoded, strlen(base64_encoded), flags); in attach_luks_or_plain_or_bitlk_by_pkcs11() 1291 int keyslot = arg_key_slot, r; in attach_luks_or_plain_or_bitlk_by_tpm2() local 1371 &keyslot, in attach_luks_or_plain_or_bitlk_by_tpm2() 1459 …r = crypt_activate_by_passphrase(cd, name, keyslot, base64_encoded, strlen(base64_encoded), flags); in attach_luks_or_plain_or_bitlk_by_tpm2()
|
/systemd-251/src/partition/ |
D | repart.c | 2641 int keyslot; in partition_encrypt() local 2655 keyslot = sym_crypt_keyslot_add_by_volume_key( in partition_encrypt() 2662 if (keyslot < 0) in partition_encrypt() 2663 … return log_error_errno(keyslot, "Failed to add new TPM2 key to %s: %m", node); in partition_encrypt() 2665 …r = tpm2_make_luks2_json(keyslot, arg_tpm2_pcr_mask, pcr_bank, primary_alg, blob, blob_size, hash,… in partition_encrypt()
|