213 Commits

Author SHA1 Message Date
Milan Broz
c9fd8b5ed4 Set devel version. 2025-11-17 13:55:40 +01:00
Ondrej Kozina
3a8feb8be7 Improve check for a function attribute support.
The compiler may advertise function attribute support
with __has_attribute operator even though it does
not implement the feature on some architecture.

This fixes the issue with  GCC 11 on ppc64le with
__attribute__((zero_call_used_regs("used"))).

Fixes: #959.
2025-09-11 14:18:39 +02:00
Milan Broz
9cfdd6ba06 Version 2.8.1. 2025-08-19 10:57:12 +02:00
Milan Broz
b8d3ff3b1a Version 2.8.1-rc0 (for translation). 2025-08-13 15:25:39 +02:00
Milan Broz
80a1ebe93e Define EXTERNAL_LUKS2_TOKENS_PATH even for autoconf
Meson already uses config.h here, do the seame instead of commandline
define option.

Expanding the variable is tricky, though...
2025-08-01 15:27:27 +02:00
Milan Broz
32e9bed060 Fix wrongly generated config.h paths
For some reason, external token path and tmpfilesdir uses a macro
that generates entry in config.h, producing these #defines:
  DEFAULT_LUKS2_EXTERNAL_TOKENS_PATH
  DEFAULT_TMPFILESDIR

Neiter one is used in C code, moreover, definitions are wrong,
as variables are modified after entry is pushed to config.

Remove the macro call and use AC_ARG_WITH directly.
2025-08-01 15:27:27 +02:00
Milan Broz
12eaacaaaf Do not try to install tmpfiles in system path if $prefix is set
If cryptsetup is being installed to different directory using --prefix
configure switch, it tyries to use absolute system path (and fails).

Let's instruct pkgconfig to return proper prefixed tmpfiles variable.
2025-08-01 15:27:27 +02:00
Milan Broz
eb9f0a63b8 Set devel version. 2025-06-25 21:09:33 +02:00
Milan Broz
13306948c8 Version 2.8.0. 2025-06-24 09:30:17 +02:00
Milan Broz
a8105ef9bb Version 2.8.0-rc1. 2025-06-16 14:10:18 +02:00
Milan Broz
f221de22b6 Fix libcryptsetup version. 2025-06-03 11:41:30 +02:00
Milan Broz
30ede1be36 Test version 2.8.0-rc0. 2025-06-03 09:21:07 +02:00
Yiyuan Zhong
939b7c0a9e Mbed-TLS: implement PBKDF2
PBKDF2 has been implemented since 2.0.0 and a new API was introduced in 3.3.0
deprecating the old one. This implementation will use the new API if detected.
2024-10-08 20:21:21 +00:00
Yiyuan Zhong
cb7b7fd863 Add Mbed-TLS crypto backend
Mbed-TLS is a tiny TLS implementation designed for embedded environment which
can greatly reduce the disk space requirement compared to OpenSSL. While we
already have crypto_kernel for this purpose and Mbed-TLS lacking hash/cipher
support can cause reduced functionality, there're situations where AF_ALG is
not available but we're fine with limited scenarios like LUKS2 only.
2024-07-14 17:12:03 +08:00
Milan Broz
94f37efb57 Remove obsolete AC_PROG_GCC_TRADITIONAL macro.
As it causes warnings and does nothing for many years already.
2024-07-10 10:32:27 +02:00
Milan Broz
41755b71b6 Set devel version. 2024-03-06 09:51:10 +01:00
Sergei Ilinykh
349572e69e Fix compilation with libargon2 argon when internal disabled
This fixes a regression introduced somewhere on the way to 2.7.0.
A specific set of options led to complete lack of Argon2
regardless of --enable-libargon2 option.
2024-02-22 20:43:35 +03:00
Milan Broz
b417154e71 Fix configure Argon2 OpenSSL detection to not compile internal Argon2.
Code is not called anyway, but should be completely disabled.
Note: there is intentionally no way to disable OpenSSL Argon2 if present.
2024-02-09 12:51:34 +01:00
Milan Broz
4dde8f078f Version 2.7.0. 2024-01-24 10:47:32 +01:00
Milan Broz
3323690cbc Version 2.7.0-rc1. 2023-12-20 15:21:01 +01:00
Milan Broz
d3a8393476 Set version 2.7.0-rc0. 2023-11-28 18:53:45 +00:00
Daniel Zatovic
7d4628e379 Remove obsolate AC_C_CONST macro.
The AC_C_CONST test program fails to compile under latest clang with
-Wall -Werror, which results in erroneously defining "const" keyword to
an empty string. The AC_C_CONST is considered obsolate.
2023-11-15 10:21:04 +01:00
Milan Broz
84682f6271 plain: Set default cipher to aes-xts-plain64 and hash to sha256.
These are configurable in build time, to force default backward compatibility use
--with-plain-hash=ripemd160 --with-plain-cipher=aes --with-plain-mode=cbc-essiv:sha256
configure options.

Fixes #758.
2023-10-05 10:31:20 +02:00
Luca Boccassi
b9cc0129c9 libcryptsetup: add OPAL type and params
Signed-off-by: Luca Boccassi <bluca@debian.org>
Co-authored-by: Ondrej Kozina <okozina@redhat.com>
2023-07-17 13:14:52 +02:00
Milan Broz
7859673bd2 Support OpenSSL 3.2 Argon2 implementation. 2023-04-19 07:16:08 +00:00
Milan Broz
34953cb10f Add support for Argon2 from libgcrypt.
Argon2 is available since version 1.10, but we need version
that allows empty passwords (1.11).
2023-04-19 07:15:35 +00:00
Alex Xu (Hello71)
234ca010e2 Link only libcrypto from openssl
Reduces initramfs dependencies. libcrypto.pc is available in openssl
0.9.8+
2023-04-18 07:49:28 +00:00
Alex Xu (Hello71)
32febb4483 configure.ac: remove += bashism
Fixes: c1302555b7 ("Provide pkgconfig Require.private.")
2023-04-17 12:31:55 -04:00
Milan Broz
045ed9d485 Update devel version. 2023-03-03 14:50:55 +01:00
Milan Broz
4fc619853d Version 2.6.1. 2023-02-09 17:12:17 +01:00
Milan Broz
5da3fd8622 Prepare 2.6.1-rc0 version. 2023-02-01 16:03:00 +01:00
Milan Broz
4bede447c8 Set devel version. 2022-12-08 11:48:28 +01:00
Milan Broz
b08212ea45 Version 2.6.0. 2022-11-28 12:27:33 +01:00
Milan Broz
e7eab5fec2 Prepare version 2.6.0-rc0. 2022-11-18 22:02:44 +01:00
daniel.zatovic
57d4c677bd CI: add systemd-tpm2 token integration test. 2022-10-26 15:19:25 +02:00
Milan Broz
e1a84607cc Rework build of fuzzers.
- Do not require any libraries installed, download everything
from upstream git, statically compile (use include, libs and pkg-config
from local directory under tests/fuzz).
Script should work both from OSS-Fuzz and locally.

- Do not require local protobuf (only staticallly compiled, see above).

- Add README.md (TBD, still not finished).

- Fix make dist and distcheck.

- Remove common.[ch] as we can use internal function.
  This makes fuzzers also C++ only (remove CFLAGS from Makefile).
2022-10-04 13:00:10 +02:00
daniel.zatovic
99e8ee6b7e Add checks for compiler when building fuzz targets. 2022-10-04 12:59:04 +02:00
daniel.zatovic
f58aff21a9 Add fuzz targets, custom mutator and fuzzing dictionary 2022-10-04 12:58:59 +02:00
Milan Broz
c1302555b7 Provide pkgconfig Require.private.
While we do not completely provides static build on udev
systems, having theses modules in pkgconfig can be useful otherwise.
2022-08-23 12:06:07 +00:00
Milan Broz
a009614191 Set devel version. 2022-07-30 09:29:00 +02:00
Milan Broz
75111d382b Version 2.5.0. 2022-07-28 17:32:33 +02:00
Milan Broz
d96dcff883 Set 2.5.0-rc1 version. 2022-07-13 21:13:07 +02:00
daniel.zatovic
a2afe0396f Split manual pages into per-action page and use AsciiDoc format
Use pre-generated man pages in make dist.

[Added fixes and updates from Ondrej Kozina and Milan Broz]
2022-07-13 21:08:02 +02:00
Milan Broz
8f8703f1c3 Update cryptsetup.pot. 2022-06-17 19:58:31 +02:00
Milan Broz
6ac27f50ad Print output of symver attribute check in autoconf. 2022-06-06 07:29:38 +00:00
Fabrice Fontaine
fe3878199c configure.ac: replace argp_usage check
Replace check for argp_usage by argp_parse as argp_usage is not used by
cryptsetup. Moreover, this will fix the following build failure raised
with argp-standalone in version 1.4.0 and
e7ff8d9787:

/home/autobuild/autobuild/instance-10/output-1/host/lib/gcc/i686-buildroot-linux-musl/10.3.0/../../../../i686-buildroot-linux-musl/bin/ld: tokens/ssh/cryptsetup_ssh-cryptsetup-ssh.o: in function `parse_opt':
cryptsetup-ssh.c:(.text+0x14c): undefined reference to `argp_state_help'
/home/autobuild/autobuild/instance-10/output-1/host/lib/gcc/i686-buildroot-linux-musl/10.3.0/../../../../i686-buildroot-linux-musl/bin/ld: tokens/ssh/cryptsetup_ssh-cryptsetup-ssh.o: in function `main':
cryptsetup-ssh.c:(.text+0x7db): undefined reference to `argp_parse'

Fixes:
 - http://autobuild.buildroot.org/results/cb3fdae4e0da603f304501f65127800346cb3915

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2022-04-28 17:24:35 +00:00
Milan Broz
ab6762b849 Fix possible missing uchar.h. 2022-04-15 21:43:45 +02:00
Ondrej Kozina
7ab7365020 Add check program for symver attribute.
Fixes: #709.
2022-02-02 21:30:48 +00:00
Vojtech Trefny
6e47fb6d85 Use custom utf8/16 conversion instead of iconv
We can avoid the additional dependency by using few functions from
systemd.
2022-01-19 17:09:32 +00:00
Milan Broz
139d663541 Add disable-luks2 reencryption configure option.
The option --disable-luks2-reencryption completely disable
LUKS2 reencryption code.

When used, the libcryptsetup library can read metadata with
reencryption code, but all reencryption API calls and cryptsetup
reencrypt commands are disabled.

Devices with online reencryption in progress cannot be activated.

This option can cause some incompatibilities. Please use with care.
2022-01-12 13:58:35 +01:00