Commit Graph

2621 Commits

Author SHA1 Message Date
Milan Broz
7d475266b6 Simplify internal tokens handling. 2020-08-09 13:17:40 +02:00
Ondrej Kozina
367cb7a761 Fix API mistake in crypt_reencrypt.
Introducing new version of crypt_reencrypt symbol including
previously missing usrptr parameter. This change should be
backward compatible for existing libcryptsetup users
until next recompilation where it needs to be fixed.
2020-08-09 13:16:57 +02:00
Ondrej Kozina
4604f00218 Remove unreachable code in cryptsetup-reencrypt.
opt_key_size variable can't be zero at that specific
code path.
2020-08-09 13:16:32 +02:00
Ondrej Kozina
8eff9151ac Set proper debug level defined in API. 2020-08-09 13:16:27 +02:00
Ondrej Kozina
50797c7948 Make total_keyfiles counter global variable. 2020-08-09 13:16:23 +02:00
Ondrej Kozina
c34a3e2c5b Add initial arguments compat test. 2020-08-09 11:31:27 +02:00
Ondrej Kozina
35211cdc8f Add --test-args option. 2020-08-09 11:30:20 +02:00
Milan Broz
4a8a1f2dde Do not use /tmp for test images.
Keep all temporary files in local test directory.
2020-08-09 11:24:53 +02:00
Milan Broz
f2ab443cca Fix a problem in integritysetup if a hash algorithm has dash in the name.
If users want to use blake2b/blake2s, the kernel algorithm name
includes dash - like "blake2s-256".

Because we use dash as a separator, this patch adds an exception
for this case.

Fixes: #581.
2020-07-27 12:50:46 +02:00
Milan Broz
abc15094c6 tcrypt: Support activation of devices with a larger sector.
TrueCrypt/VeraCrypt always use 512-bytes sector for encryption,
but for devices with a larger native sector it stores this value in header.

This patch allows activating of such devices, basically ignoring
the mentioned sector size in header (it only must be multiple
of 512-bytes sector).

Fixes: #580.
2020-07-26 21:13:55 +02:00
Milan Broz
f390695767 Fix crypto backend to properly handle ECB mode.
Despite it should be never used, it should still work :)

Bug introduced in version 2.3.2.
2020-07-21 14:14:54 +02:00
Milan Broz
f092bcdfdb Use the most recent image in travis.yml. 2020-07-12 08:14:25 +02:00
Milan Broz
1633f030e8 Rename reenc_keyslot_update to reencrypt_keyslot_update. 2020-07-07 14:20:39 +02:00
Milan Broz
4451df15b4 Rename luks2_reenc_context to luks2_reecrypt. 2020-07-07 14:20:39 +02:00
Milan Broz
f50062517e Rename crypt_get/set reenc_context to luks2_reencrypt. 2020-07-07 14:20:39 +02:00
Milan Broz
967e3de552 Rename LUKS2_reenc_status to LUKS2_reencrypt_status. 2020-07-07 14:20:39 +02:00
Milan Broz
d95472e757 Rename LUKS2_reencrypt_status to LUKS2_reencrypt_get_params to avoid confusion. 2020-07-07 14:20:39 +02:00
Milan Broz
3e0e5bac2a Use LUKS2_reencrypt prefix for function defined in luks2.h.
This should clean up prefixes a little bit.
2020-07-07 14:20:39 +02:00
Milan Broz
08cb76bbfd Do not expose json_object in luks2.h.
Later we can use different implementation of JSON parser.
Also define structs in one place.
2020-07-07 14:20:39 +02:00
Milan Broz
281dd51f5a Remove json_object argument from area size checks.
These functions are internal to LUKS2 implementation.
2020-07-07 14:20:39 +02:00
Milan Broz
1c7c815108 Move LUKS2 internal functions to internal header.
This is the first step to remove json_object from internal API.
2020-07-07 14:20:39 +02:00
Ondrej Kozina
d177af8842 Do not create excessively large headers.
When creating LUKS2 header with specified --offset much larger
then LUKS2 header size we needlessly also wipe (allocate up to
--offset) much larger file than needed.
2020-07-07 14:20:19 +02:00
Francesco Turco
544129d240 fix capitalization 2020-07-04 16:43:40 +02:00
Francesco Turco
9f79678723 fix typos 2020-07-04 16:43:27 +02:00
Francesco Turco
a491b938ba use HTTPS for URLs 2020-07-04 16:43:23 +02:00
Vojtech Trefny
588c8cf5b3 bitlk: Fix reading key data size in the decrypted key material
We've assumed that first 4 bytes of the decrypted key data is the
size of the key + metadata. Looks like this isn't true and only
first two bytes contain the size and the other two bytes are
unknown data, possibly related to reencryption and/or passphrase
change.

Fixes: #575
2020-07-03 13:18:42 +02:00
Milan Broz
876ca59234 Set devel version. 2020-05-31 20:26:20 +02:00
Milan Broz
f5910d83c4 Add option for large IV to storage wrapper.
Also implement some test vectors and use the same limits
as in dm-crypt (IV offset alignnment).
2020-05-29 10:59:24 +02:00
Ondrej Kozina
e43a22abcf Allow bitlk tests to run with valgrind. 2020-05-29 10:59:24 +02:00
Ondrej Kozina
2a7aa8992b Remove bogus valgrind suppressions. 2020-05-29 10:59:24 +02:00
Ondrej Kozina
e36597e2c6 Fix popt string related memory leaks.
All POPT_ARG_STRING pointers must be free'd manually
in calling application. This is unfortunately not documented
well behaviour of popt and we were having memory leaks due to
it.
2020-05-29 10:59:23 +02:00
Ondrej Kozina
6403de2109 Add utilities cleanup routine. 2020-05-29 10:59:23 +02:00
Ondrej Kozina
9b49e47b13 Drop unreachable code and useless conditions.
integrity_alg variable can not be NULL.
2020-05-29 10:59:23 +02:00
Ondrej Kozina
8540be5b82 Remove const from all opt_ string declarations.
Those variables contain pointers to dynamically alocated memory.
2020-05-29 10:59:23 +02:00
Ondrej Kozina
ae6d6261a1 Do not pass constant strings to option string variables.
This is part of effort to eliminate all memory leaks related
to options parsing in popt but for that to work we must avoid
passing constant strings to free().
2020-05-29 10:59:23 +02:00
Ondrej Kozina
ce4fcd2009 Group all string options variables together. 2020-05-29 10:59:23 +02:00
Ondrej Kozina
76620881f4 Properly prefix all popt variables in veritysetup. 2020-05-29 10:59:23 +02:00
Milan Broz
f99efd6166 Update Readme.md. 2020-05-28 11:42:58 +02:00
Milan Broz
74e94e7bdd Prepare version 2.3.3. v2.3.3 2020-05-28 11:26:27 +02:00
Milan Broz
72cd628357 Update cryptsetup.pot. 2020-05-24 23:37:31 +02:00
Yuri Chornoivan
45367e4a34 po: update uk.po (from translationproject.org) 2020-05-24 23:22:15 +02:00
Yuri Kozlov
7d76831250 po: update ru.po (from translationproject.org) 2020-05-24 23:22:15 +02:00
Jakub Bogusz
d2ff3fc2ee po: update pl.po (from translationproject.org) 2020-05-24 23:22:15 +02:00
Hiroshi Takekawa
537b8454a4 po: update ja.po (from translationproject.org) 2020-05-24 23:22:15 +02:00
Frédéric Marchal
a7c71b90b1 po: update fr.po (from translationproject.org) 2020-05-24 23:22:15 +02:00
Antonio Ceballos
e0be3deb3a po: update es.po (from translationproject.org) 2020-05-24 23:22:15 +02:00
Roland Illig
5490476d84 po: update de.po (from translationproject.org) 2020-05-24 23:22:15 +02:00
Petr Pisar
90865eb887 po: update cs.po (from translationproject.org) 2020-05-24 23:22:15 +02:00
Milan Broz
157f71d78e Add IV vector tests.
This test checks IV wrapper implemented in userspace.
2020-05-24 23:19:46 +02:00
Milan Broz
176fee54e4 Require both keyslot cipher ane key size options.
If not specified together, cryptsetup silently fail.
2020-05-15 22:07:52 +02:00