From: Yu Watanabe Date: Sat, 27 Jun 2026 06:49:31 +0000 (+0900) Subject: test-journal-verify: replace HAVE_GCRYPT ifdef with journal_auth_supported() X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e8d21b76f0dddd44fca734a8132f58dd2fca6367;p=thirdparty%2Fsystemd.git test-journal-verify: replace HAVE_GCRYPT ifdef with journal_auth_supported() --- diff --git a/src/libsystemd/sd-journal/test-journal-verify.c b/src/libsystemd/sd-journal/test-journal-verify.c index 413f8ce05c6..6a1401764bd 100644 --- a/src/libsystemd/sd-journal/test-journal-verify.c +++ b/src/libsystemd/sd-journal/test-journal-verify.c @@ -190,10 +190,9 @@ int main(int argc, char *argv[]) { ASSERT_OK_ERRNO(setenv("SYSTEMD_JOURNAL_COMPACT", "1", 1)); run_test(verification_key, max_iterations); -#if HAVE_GCRYPT - /* If we're running without any arguments and we're compiled with gcrypt + /* If we're running without any arguments and journal sealing support is enabled, * check the journal verification stuff with a valid key as well */ - if (argc <= 1) { + if (argc <= 1 && journal_auth_supported()) { verification_key = "c262bd-85187f-0b1b04-877cc5/1c7af8-35a4e900"; ASSERT_OK_ERRNO(setenv("SYSTEMD_JOURNAL_COMPACT", "0", 1)); @@ -202,7 +201,6 @@ int main(int argc, char *argv[]) { ASSERT_OK_ERRNO(setenv("SYSTEMD_JOURNAL_COMPACT", "1", 1)); run_test(verification_key, max_iterations); } -#endif return 0; }