Milan Broz
fd02dca60e
Add crypt_set_metadata_size / crypt_get_metadata_size API.
2018-12-11 21:59:59 +01:00
Milan Broz
2a1d58ed22
Check data device offset if it fits data device size in luksFormat.
2018-12-11 21:59:49 +01:00
Milan Broz
03edcd2bfd
Add crypt_set_data_offset API function.
...
The crypt_set_data_offset sets the data offset for LUKS and LUKS2 devices
to specified value in 512-byte sectors.
This value should replace alignment calculation in LUKS param structures.
2018-12-06 11:10:21 +01:00
Milan Broz
0fed68dd16
Introduce crypt_init_data_device and crypt_get_metadata_device_name.
...
For some formats we need to separate metadata and data device before
format is called.
2018-12-05 12:33:16 +01:00
Milan Broz
0b10d877b0
Some more gcc warnings fixes.
2018-09-29 17:32:33 +02:00
Ondrej Kozina
114356ad2e
Properly load new device context after header restore.
2018-09-25 08:53:26 +02:00
Milan Broz
f1d5b94762
Run API tests without verbose flag by default.
...
And rename some tests.
2018-08-10 12:36:15 +02:00
Milan Broz
7aaf1eeb1b
Fix bz2->xz untar api-test option.
2018-08-06 15:16:39 +02:00
Milan Broz
e53fe70668
Use only xz archives in tests.
...
Bzip2 is sometimesmissing and we use xz already.
Seems xz produces slightly larger archives (despite the best mode)
but it is not worth to keep bz2 here.
2018-08-06 13:48:54 +02:00
Milan Broz
1fe014dbae
Update copyright year.
2018-01-20 17:55:21 +01:00
Milan Broz
f34ce81f25
Introduce new 64bit *keyfile_device_offset functions.
...
The keyfile interface was designed, well, for keyfiles.
Unfortunately, a keyfile can be placed on a device and the size_t offset
can overflow.
We have to introduce new set of fucntions that allows 64bit offsets even on 32bit systems:
- crypt_resume_by_keyfile_device_offset
- crypt_keyslot_add_by_keyfile_device_offset
- crypt_activate_by_keyfile_device_offset
- crypt_keyfile_device_read
The new functions have added _device_ in name.
Old functions are just internall wrappers around these.
Also cryptsetup --keyfile-offset and --new-keyfile-offset must now
process 64bit offsets.
For more info see issue 359.
2018-01-17 22:07:23 +01:00
Andrea Gelmini
a97de38b6b
Fix typos.
2017-11-08 10:22:49 +01:00
Milan Broz
6e3622e0f1
Fix some warning and leaks in api test code.
2017-10-28 11:59:06 +02:00
Milan Broz
892b80ffa4
Do not depend in test on loop code from library sources.
...
This patch duplicates part of the code because following
switch to non-recursive automake is not easily fixable without this change.
(Automake cannot use top_srcdir anymore in this context.)
2017-10-12 11:46:26 +02:00
Milan Broz
c6d4ebd80c
Add libLUKS2 tests.
2017-09-24 19:50:17 +02:00
Milan Broz
64e91951b2
Add generic LUKS format define.
...
It means "load any LUKS version".
2017-09-24 19:49:56 +02:00
Milan Broz
e7de19fe1d
Split utils from API test.
2017-09-24 19:49:51 +02:00
Milan Broz
a8347d2820
Add integrity intefrace test stub.
2017-09-24 19:49:40 +02:00
Milan Broz
a0880b64f2
Add magic exit code for automake to count skipped tests.
2017-08-23 16:54:04 +02:00
Milan Broz
9ade110a25
Fix typo in tests.
2017-06-29 15:55:35 +02:00
Milan Broz
86f327d0f5
Add dmsetup remove retry to api test.
2017-06-27 14:14:20 +02:00
Ondrej Kozina
6682e6b663
tests: add test for overlaping keyslots in luks1 image
2017-06-15 11:17:36 +02:00
Milan Broz
8c5760fee7
Fix API test for FIPS mode.
2017-04-21 09:32:13 +02:00
Milan Broz
ef7ecb5567
Fix race while allocating free loop device.
...
Fixes Issue #314 .
Thanks to Martin Jeřábek for the report.
2017-01-20 15:27:40 +01:00
Milan Broz
4d3a501b83
Force test to read device to detect corrupted blocks.
...
(If udev scanning is switched off, there is no real activity on device yet.)
2016-06-23 09:45:06 +02:00
Milan Broz
8da37ce4b0
Update test (removal of get_last_error).
2015-11-20 09:18:58 +01:00
Milan Broz
4aea3b81ee
Remove password callback interface.
...
This was a design mistake and should not be handled inside libcryptsetup code.
2015-11-20 09:18:31 +01:00
Milan Broz
49335b600f
Allow luksSuspend without explicitly specify detached header.
...
If LUKS device was configured to use detached header, suspend operation
required --header option. For now it is enough that active device in-kernel
UUID type is set properly.
FIxes issue#229.
2015-01-15 10:40:17 +01:00
Milan Broz
0614ab6b07
Allow simple status of crypt device without providing metadata header.
...
If device is activated, we can provide some information from
active kernel parameters instead of header.
2014-06-14 17:42:57 +02:00
Milan Broz
5206543902
Fix api test keyfile write.
2014-01-12 13:39:15 +01:00
Ondrej Kozina
f30bbbffe7
Fix minimal size expectations failure for backup header file
...
- backup header file must be page size aligned
- fix for https://bugzilla.redhat.com/show_bug.cgi?id=1030288
- add regression test to api-tests
2013-11-21 19:48:12 +01:00
Ondrej Kozina
6b88461553
modify fips detection also in api-test
2013-11-21 19:48:03 +01:00
Milan Broz
700b558fb6
Fix api test to use proper key size.
...
LUKS format now reuires correct kernel parameters always,
so validation test must use different but still correct key size.
2013-11-20 22:20:15 +01:00
Milan Broz
ce23225e46
Check if provided cipher and mode is usable before writing LUKS header to disk.
...
If user provided unusable cipher-mode string, LUKS header was written and
keyslot creation failed later.
Better check early (by creating fake dmcrypt device) if cipher is usable
and fail early (without writing LUKS header to device).
Fixes Issue#176
2013-11-10 22:11:00 +01:00
Milan Broz
b2283f045a
Version 1.6.2.
2013-08-04 19:01:55 +02:00
Milan Broz
6127b6959f
Update copyright year on changed files.
2013-03-24 09:05:33 +01:00
Milan Broz
f2521889c2
Deactivate whole device TCRYPT tree if context is NULL
...
API (unfortunately) supports NULL argument for crypt_deactivate,
with new chained TCRYPT devices it must deactivate all
chained devices as well.
Fixes issue#147.
2013-03-17 19:20:42 +01:00
Milan Broz
2780ccdd62
Properly cleanup on interrupt in api-test.
2013-01-16 15:28:12 +01:00
Milan Broz
fdcabdfd28
Support test run in kernel FIPS mode.
2013-01-15 14:53:19 +01:00
Milan Broz
df8fb84723
Workaround api-test compilation on some very old systems.
2013-01-08 17:41:06 +01:00
Milan Broz
29f21208a0
Change License from GPLv2 only to GPLv2+ ("or any later").
...
Agreed by all copyright authors.
2012-12-29 11:33:54 +01:00
Milan Broz
83f02e6682
Add copyright line for files I have written or modified.
2012-12-21 16:40:33 +01:00
Milan Broz
069ba220d2
Add crypt_keyslot_change_by_passphrase() api test.
2012-12-21 16:27:55 +01:00
Milan Broz
d05f020d5a
Add keyfiles tcrypt test.
2012-12-01 13:43:59 +01:00
Milan Broz
dde57477fc
And skip tcrypt api test if there is no af_alf kernel interface.
2012-11-30 18:53:32 +01:00
Milan Broz
ffb6ecc488
Add TCRYPT api test, fix some minor problems found.
2012-11-30 18:41:10 +01:00
Milan Broz
15442c1747
Modprobe kernel modules early in api-test.
2012-08-14 15:54:31 +02:00
Milan Broz
a47ebccf9a
Add module load to test.
2012-07-10 10:15:40 +02:00
Milan Broz
5f7309bfa0
Add some verity api test.
...
Fix set_data_device bug it uncovered.
Fix api-test for nonFIPS hash.
2012-07-09 18:09:51 +02:00
Milan Broz
5c7954a0c7
Require only up to last keyslot area for header device (ignore data offset).
...
Fix header backup and restore to work on files with large data offset.
2012-06-11 12:20:19 +02:00