From 47b425de0c1788266e105bf88190c4cb3c8a6d1e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gabr=C3=ADel=20Arth=C3=BAr=20P=C3=A9tursson?= Date: Wed, 3 Jan 2024 15:55:18 +0000 Subject: [PATCH] shared: Move cryptsetup-tpm2.[ch] from systemd-cryptsetup --- src/cryptsetup/meson.build | 4 ---- src/{cryptsetup => shared}/cryptsetup-tpm2.c | 0 src/{cryptsetup => shared}/cryptsetup-tpm2.h | 0 src/shared/meson.build | 4 ++++ 4 files changed, 4 insertions(+), 4 deletions(-) rename src/{cryptsetup => shared}/cryptsetup-tpm2.c (100%) rename src/{cryptsetup => shared}/cryptsetup-tpm2.h (100%) diff --git a/src/cryptsetup/meson.build b/src/cryptsetup/meson.build index 90e2be7a91..9ccc0982b5 100644 --- a/src/cryptsetup/meson.build +++ b/src/cryptsetup/meson.build @@ -11,10 +11,6 @@ if conf.get('HAVE_P11KIT') == 1 systemd_cryptsetup_sources += files('cryptsetup-pkcs11.c') endif -if conf.get('HAVE_TPM2') == 1 - systemd_cryptsetup_sources += files('cryptsetup-tpm2.c') -endif - executables += [ executable_template + { 'name' : 'systemd-cryptsetup', diff --git a/src/cryptsetup/cryptsetup-tpm2.c b/src/shared/cryptsetup-tpm2.c similarity index 100% rename from src/cryptsetup/cryptsetup-tpm2.c rename to src/shared/cryptsetup-tpm2.c diff --git a/src/cryptsetup/cryptsetup-tpm2.h b/src/shared/cryptsetup-tpm2.h similarity index 100% rename from src/cryptsetup/cryptsetup-tpm2.h rename to src/shared/cryptsetup-tpm2.h diff --git a/src/shared/meson.build b/src/shared/meson.build index 2a39bb04df..dc9adeddc1 100644 --- a/src/shared/meson.build +++ b/src/shared/meson.build @@ -250,6 +250,10 @@ if conf.get('HAVE_LIBFIDO2') == 1 and conf.get('HAVE_LIBCRYPTSETUP') == 1 shared_sources += files('cryptsetup-fido2.c') endif +if conf.get('HAVE_TPM2') == 1 and conf.get('HAVE_LIBCRYPTSETUP') == 1 + shared_sources += files('cryptsetup-tpm2.c') +endif + generate_ip_protocol_list = find_program('generate-ip-protocol-list.sh') ip_protocol_list_txt = custom_target( 'ip-protocol-list.txt', -- 2.25.1