Ondrej Kozina
5f5ffcd48a
Remove logging from keyring utilities.
...
Reduce bloated code in low level keyring utilities code.
Move log messages higher the library code.
Also return -ENOTSUP when code was compiled out by configure
option.
2018-01-04 09:20:14 +01:00
Ondrej Kozina
cc76f3746f
Remove unused digests handling code.
...
Remove code for handling multiple digests per single keyslot.
Same would apply to segments with the only exception of segment
in-reencryption. We need that exception so that we will not lose
old key digests too early.
2018-01-04 09:17:34 +01:00
Yuri Chornoivan
982da4d20c
Fix minor typos
2018-01-04 09:13:58 +01:00
Ondrej Kozina
286c2960c8
silence signed/unsigned compiler warnings
...
any array with item count close to INT32_MAX would
not fit LUKS2 header json area anyway
2017-12-13 12:06:58 +01:00
Ondrej Kozina
a12e374a04
harden checks of json_object_array_length return values
...
with json-c until 0.12.x json_object_array_length returned signed
integer. json-c 0.13.x and later changed return type to unsigned
size_t.
Consider return values less or equal to zero as empty array, otherwise
array is non-empty.
2017-12-13 12:06:54 +01:00
Ondrej Kozina
c740324636
Derive VK kernel key description from digest id
...
Originally the key description for VK was derived
from segment id. This could lead to ambiguity when
keyslot key is verified and loaded in kernel keyring
using activation functions with CRYPT_ACTIVATE_KEYRING_KEY
flag raised.
2017-12-10 19:56:14 +01:00
Ondrej Kozina
c188654ebd
simplify kernel keyring key removal path
...
simplify crypt_drop_keyring_key
also do not search for keyring keys when we know
we haven't loaded any
2017-12-09 14:55:23 +01:00
Ondrej Kozina
82d81b9e86
extend use of lseek_blockwise functions
2017-12-07 13:01:04 +01:00
Milan Broz
767ed40b75
Use better "time cost" for Argon than time.
2017-12-05 15:41:24 +01:00
Ondrej Kozina
92b41e4935
more return NULL instead of 0 cleanups
2017-12-01 13:17:32 +01:00
Ondrej Kozina
6edae6ddef
return NULL instead of 0
2017-12-01 13:10:37 +01:00
Ondrej Kozina
3c839f44d8
luks2: fix off-by-one error in uint64 validation
2017-11-23 16:18:19 +01:00
Ondrej Kozina
304bdd7d0d
luks2: add json_object_new_uint64 wrapper
...
json doesn't support 64 bits integers. We workaround it by storing
large numbers as string and validate the value internally.
2017-11-23 16:18:14 +01:00
Ondrej Kozina
382d27b4dc
remove unused function
2017-11-23 16:17:07 +01:00
Andrea Gelmini
a97de38b6b
Fix typos.
2017-11-08 10:22:49 +01:00
Ondrej Kozina
1f01c76fa5
fix memory leak on failed luks2 activation
2017-11-03 17:30:14 +01:00
Ondrej Kozina
76947fa835
luks2: add offline reencrypt requriement
2017-10-28 22:29:28 +02:00
Milan Broz
f7dadfb646
Fix some benign compiler warnings.
2017-10-28 14:12:25 +02:00
Milan Broz
31779c0763
Fix memory leak in LUKS2 requirements handling for restore context.
2017-10-28 12:01:02 +02:00
Milan Broz
d77bbe93c1
Use non-recursive automake.
...
This change also causes that now binaries and libraries are placed in
build root directory.
Now we can use subdir-objects for automake.
2017-10-12 11:48:17 +02:00
Milan Broz
b42d183b08
Create LUKS header file in luksFormat if it does not exist.
2017-10-10 13:52:50 +02:00
Milan Broz
de2f07b82f
Do not try to load LUKS2 header if backup_file is LUKS1.
...
Also do not allow header restore if a different version is requested.
2017-10-06 12:28:59 +02:00
Milan Broz
948006561a
Yet another fix for header strings.
2017-09-27 10:54:03 +02:00
Milan Broz
3ccbb8fe84
Fix some problems found by Coverity analysis.
2017-09-27 10:18:38 +02:00
Ondrej Kozina
b4782809d4
luks2: allow masking of requirements internaly
...
before this patch any LUKS2 requirement defined in header
would stop a restricted operation from proceeding further.
This patch adds ability to mask requirements (internal only).
2017-09-27 07:48:53 +02:00
Ondrej Kozina
b3feae5474
luks2: unify naming for requirements flags
2017-09-27 07:47:41 +02:00
Ondrej Kozina
c015aeca4e
luks2: move pre-activation requirements check lower
2017-09-27 07:47:13 +02:00
Milan Broz
9f2727bb77
Add libLUKS2.
2017-09-24 19:50:12 +02:00