Milan Broz
7213d5a76b
Fix verbose message about key removal in luksKillSlot,luksErase and luksKremoveKey.
...
The crypt_keyslot_destroy() does not return keyslot number,
so return value 0 was always used as a keyslot reference.
2018-10-27 17:44:38 +02:00
Milan Broz
202aeece3c
Fix test module inclusion in tarball.
2018-10-14 20:54:06 +02:00
Milan Broz
a46733e701
Reintroduce error message if LUKS device is not detected.
...
Older cryptsetup printed this message through library,
later it disappeared even in cryptsetup binary.
2018-10-13 10:13:29 +02:00
Ondrej Kozina
61305a50c1
Add delay=0 parameter to scsi_debug in all tests.
...
Speed up tests significantly.
2018-10-11 16:21:36 +02:00
Ondrej Kozina
a771460dbd
Add validation tests for optional segment flags section.
2018-10-11 11:55:26 +02:00
Ondrej Kozina
37e0150f70
Do not use fallocate in blockwise tests.
...
fs driver may skip some sanity checks if it's aware the content
of file is uninitialized.
Fixes warnings for xfs in kernel 4.19+
2018-10-04 11:20:03 +02:00
Milan Broz
294e4cbcb7
Fix tcrypt test on very old distros.
2018-10-02 13:56:57 +02:00
Milan Broz
952716afe1
Report versions in test run.
2018-10-02 13:46:03 +02:00
Milan Broz
24aba9a514
tcrypt: Support additional Veracrypt modes.
...
Add support for Camellia and Kuznyechik ciphers and Streebog hash functions,
introduced in recent Veracrypt.
Note, that Kuznyechik requires out-of-tree kernel module and Streebog
hash function is available only with gcrypt backend.
2018-10-02 10:47:38 +02:00
Milan Broz
0b10d877b0
Some more gcc warnings fixes.
2018-09-29 17:32:33 +02:00
Milan Broz
506f3f7b57
Decrease memory limit for pbkdf test.
2018-09-26 10:48:31 +02:00
Ondrej Kozina
cd1c36ef94
Allow passphrase change for unbound keyslots.
...
Also fixes small typo in API.
Fixes #409 .
2018-09-25 13:13:31 +02:00
Ondrej Kozina
ee689d88b4
Add blkid scan when attemting to open plain device.
...
Warn user about existing device signatures on candidate ciphertext
device and prompt for action confirmation.
Fixes #411 .
2018-09-25 13:13:18 +02:00
Ondrej Kozina
114356ad2e
Properly load new device context after header restore.
2018-09-25 08:53:26 +02:00
Milan Broz
3f73d448f3
Retry temporary device removal in align test.
2018-09-10 15:53:27 +02:00
Milan Broz
a1b606803f
Fix HMAC vector test exit value.
2018-09-05 14:38:16 +02:00
Michal Virgovič
b2c7b40568
Add test vectors for HMAC - sha1, sha256, sha512.
2018-09-05 14:17:25 +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
Ondrej Kozina
6fc2e7c774
Skip pbkdf benchmark in align-test (test speedup).
2018-08-10 08:20:00 +02:00
Ondrej Kozina
3b39c1d1ef
Fix data alignment test in compat-test2.
...
Alignment should not expected failure when --align-payload is not
aligned to encryption sector size.
2018-08-10 08:19:49 +02:00
Ondrej Kozina
5a3e4abf71
Add basic LUKS2 align test.
2018-08-10 08:19:38 +02:00
Milan Broz
0270fc66a1
Fix align test.
...
Seems that the forced alignment value was never properly used...
2018-08-09 13:53:48 +02:00
Ondrej Kozina
5b5a64361f
Update blockwise-compat test.
...
Issue warning in case of failure with file-systems based
tests.
Mute the test so that it prints out messages only for 'warning'
and 'fail' results.
2018-08-08 21:48:10 +02:00
Milan Broz
26f6d1cb10
Create --master-key-file in luksDump and fail if file already exists.
...
For some reason the volume key file have to exists.
Let's change the logic to the same as for luksBackupHeader
(a file is created and operation fails if it already exists).
2018-08-08 14:32:15 +02:00
Ondrej Kozina
f87eb1668a
Allow compat-test2 to run with larger LUKS2 header size.
2018-08-08 12:55:29 +02:00
Milan Broz
3114abfd55
Remove not needed -Z option from diff that is not present on older systems.
2018-08-08 10:43:03 +02:00
Ondrej Kozina
5a94cff91e
Do not fail device-test with larger LUKS2 header.
2018-08-08 10:13:40 +02:00
Milan Broz
0e7b068061
Add sector-size & payload align test.
2018-08-08 08:45:26 +02:00
Ondrej Kozina
b30ba41d6a
Fix typo in blockwise-compat test.
2018-08-08 07:44:07 +02:00
Ondrej Kozina
a0bf790892
Fix FAST_PBKDF typos in LUKS2 reencrypt tests.
2018-08-08 07:43:56 +02:00
Ondrej Kozina
caefc4eb8e
Add basic test for token import and export.
2018-08-08 07:42:58 +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
Ondrej Kozina
39d6b94835
Add test for reencryption after format conversion.
2018-08-03 11:15:43 +02:00
Ondrej Kozina
4fdce0695d
Add test for LUKS2 detached header with non-default alignment.
2018-08-03 11:15:33 +02:00
Ondrej Kozina
b24a46ad8f
Add tests for updated segments validation.
...
Tests commit c1777cfb8
2018-08-02 09:21:23 +02:00
Ondrej Kozina
974072bdae
Add segment validation tests.
2018-08-01 13:53:14 +02:00
Michal Virgovič
3c1c5ef281
Add vector tests for hash algorithms.
2018-08-01 09:16:44 +02:00
Rafael Fontenelle
f35ec9771e
Fix typos
...
A bunch of typos reported by codespell, most of them comments in the code
2018-07-21 07:24:25 -03:00
Ondrej Kozina
de4fe99e34
Silence empty stdin error message in tests.
2018-07-21 11:28:46 +02:00
Ondrej Kozina
deb8e49483
Cleanup test files after failure.
...
'missing-file' must be removed if test failes. Otherwise
the test fails even after regression is fixed :)
2018-07-18 11:55:53 +02:00
Milan Broz
6244b4d00f
Use LANG=C in interactive tests.
2018-07-13 08:58:38 +02:00
Milan Broz
ee167b1a43
Fix offset parsing in unit test.
2018-07-11 22:41:15 +02:00
Ondrej Kozina
50f5593ffc
Update dm-crypt version check in device-test.
...
Test is now able to detect backported sector_size feature
in RHEL7 kernels.
2018-07-11 22:24:26 +02:00
Ondrej Kozina
7f6f8ec386
Test fixes for pbkdf verifications.
2018-07-11 22:23:53 +02:00
Ondrej Kozina
3e9d603f0b
Add cryptsetup repair tests.
2018-07-11 22:23:24 +02:00
Ondrej Kozina
71a8fd3106
Test basic LUKS2 repair capabilities.
...
a) checks crypt_load() fails when single LUKS2 header is corrupted and
blkid detect other device signature from LUKS or none.
b) check explicit crypt_repair is able to override blkid restriction
and fix corrupted primary header
c) check a) and b) with disabled locks
2018-07-11 22:23:10 +02:00
Ondrej Kozina
4d110d4c82
Silence luksFormat in tests.
2018-07-07 10:26:32 +02:00
Milan Broz
cd2a1a169f
Skip test if scsi_debug is not available.
2018-07-07 10:24:35 +02:00
Ondrej Kozina
d7b9ed05f0
Add scsi_debug_teardown loop in blockwise tests.
...
scsi_debug module sometimes fails to remove due to
open references from udev scans.
2018-06-20 16:58:25 +02:00